FlagSet.Builder
class FlagSet.Builder
A builder for FlagSet instances.
Summary
Public constructors |
|---|
Builder()Creates a builder. |
Public functions |
|
|---|---|
FlagSet.Builder! |
@CanIgnoreReturnValueAdds a flag. |
FlagSet.Builder! |
@CanIgnoreReturnValueAdds flags. |
FlagSet.Builder! |
@CanIgnoreReturnValueAdds |
FlagSet.Builder! |
@CanIgnoreReturnValueAdds a flag if the provided condition is true. |
FlagSet! |
build()Builds an |
FlagSet.Builder! |
@CanIgnoreReturnValueRemoves a flag. |
FlagSet.Builder! |
@CanIgnoreReturnValueRemoves flags. |
FlagSet.Builder! |
@CanIgnoreReturnValueRemoves a flag if the provided condition is true. |
Public constructors
Public functions
add
@CanIgnoreReturnValue
fun add(flag: Int): FlagSet.Builder!
Adds a flag.
| Parameters | |
|---|---|
flag: Int |
A flag. |
| Returns | |
|---|---|
FlagSet.Builder! |
This builder. |
| Throws | |
|---|---|
java.lang.IllegalStateException |
If |
addAll
@CanIgnoreReturnValue
fun addAll(flags: IntArray!): FlagSet.Builder!
Adds flags.
| Parameters | |
|---|---|
flags: IntArray! |
The flags to add. |
| Returns | |
|---|---|
FlagSet.Builder! |
This builder. |
| Throws | |
|---|---|
java.lang.IllegalStateException |
If |
addAll
@CanIgnoreReturnValue
fun addAll(flags: FlagSet!): FlagSet.Builder!
Adds flags.
| Parameters | |
|---|---|
flags: FlagSet! |
The set of flags to add. |
| Returns | |
|---|---|
FlagSet.Builder! |
This builder. |
| Throws | |
|---|---|
java.lang.IllegalStateException |
If |
addIf
@CanIgnoreReturnValue
fun addIf(flag: Int, condition: Boolean): FlagSet.Builder!
Adds a flag if the provided condition is true. Does nothing otherwise.
| Returns | |
|---|---|
FlagSet.Builder! |
This builder. |
| Throws | |
|---|---|
java.lang.IllegalStateException |
If |
build
fun build(): FlagSet!
Builds an FlagSet instance.
| Throws | |
|---|---|
java.lang.IllegalStateException |
If this method has already been called. |
remove
@CanIgnoreReturnValue
fun remove(flag: Int): FlagSet.Builder!
Removes a flag.
| Parameters | |
|---|---|
flag: Int |
A flag. |
| Returns | |
|---|---|
FlagSet.Builder! |
This builder. |
| Throws | |
|---|---|
java.lang.IllegalStateException |
If |
removeAll
@CanIgnoreReturnValue
fun removeAll(flags: IntArray!): FlagSet.Builder!
Removes flags.
| Parameters | |
|---|---|
flags: IntArray! |
The flags to remove. |
| Returns | |
|---|---|
FlagSet.Builder! |
This builder. |
| Throws | |
|---|---|
java.lang.IllegalStateException |
If |
removeIf
@CanIgnoreReturnValue
fun removeIf(flag: Int, condition: Boolean): FlagSet.Builder!
Removes a flag if the provided condition is true. Does nothing otherwise.
| Returns | |
|---|---|
FlagSet.Builder! |
This builder. |
| Throws | |
|---|---|
java.lang.IllegalStateException |
If |