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 aCustomFlagrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the value of thedefaultValuerecord component.@Nullable StringReturns the value of thedescriptionrecord component.@Nullable StringReturns the value of thedisplayNamerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.@NotNull Stringid()Returns the value of theidrecord component.@NotNull StringReturns the value of thenamespacerecord component.final StringtoString()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 aCustomFlagrecord class.- Parameters:
namespace- the value for thenamespacerecord componentid- the value for theidrecord componentdefaultValue- the value for thedefaultValuerecord componentdisplayName- the value for thedisplayNamerecord componentdescription- the value for thedescriptionrecord component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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 '=='. -
namespace
Returns the value of thenamespacerecord component.- Returns:
- the value of the
namespacerecord component
-
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
defaultValue
public boolean defaultValue()Returns the value of thedefaultValuerecord component.- Returns:
- the value of the
defaultValuerecord component
-
displayName
Returns the value of thedisplayNamerecord component.- Returns:
- the value of the
displayNamerecord component
-
description
Returns the value of thedescriptionrecord component.- Returns:
- the value of the
descriptionrecord component
-