Record Class CustomFlag
java.lang.Object
java.lang.Record
io.github.lijinhong11.protector.api.flag.CustomFlag
- Record Components:
namespace
- the namespace for verifyid
- the flag IDdefaultValue
- the default valuedisplayName
- the display name of the flag (optional)description
- the description about the flag (optional)
public record CustomFlag(@NotNull String namespace, @NotNull String id, boolean defaultValue, @Nullable String displayName, @Nullable String description)
extends Record
The custom flag object
-
Constructor Summary
ConstructorsConstructorDescriptionCustomFlag
(@NotNull String namespace, @NotNull String id, boolean defaultValue, @Nullable String displayName, @Nullable String description) Creates an instance of aCustomFlag
record class. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns the value of thedefaultValue
record component.@Nullable String
Returns the value of thedescription
record component.@Nullable String
Returns the value of thedisplayName
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.@NotNull String
id()
Returns the value of theid
record component.@NotNull String
Returns the value of thenamespace
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
CustomFlag
public CustomFlag(@NotNull @NotNull String namespace, @NotNull @NotNull String id, boolean defaultValue, @Nullable @Nullable String displayName, @Nullable @Nullable String description) Creates an instance of aCustomFlag
record class.- Parameters:
namespace
- the value for thenamespace
record componentid
- the value for theid
record componentdefaultValue
- the value for thedefaultValue
record componentdisplayName
- the value for thedisplayName
record componentdescription
- the value for thedescription
record component
-
-
Method Details
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object)
; primitive components are compared with thecompare
method from their corresponding wrapper classes. -
namespace
-
id
-
defaultValue
public boolean defaultValue()Returns the value of thedefaultValue
record component.- Returns:
- the value of the
defaultValue
record component
-
displayName
Returns the value of thedisplayName
record component.- Returns:
- the value of the
displayName
record component
-
description
Returns the value of thedescription
record component.- Returns:
- the value of the
description
record component
-