Record Class BlockProperty.Flag
java.lang.Object
java.lang.Record
fr.fidorial.world.block.BlockProperty.Flag
- Record Components:
name- the property name
- All Implemented Interfaces:
BlockProperty<Boolean>
- Enclosing interface:
BlockProperty<T>
public static record BlockProperty.Flag(String name)
extends Record
implements BlockProperty<Boolean>
A property that is either
true or false.- Since:
- 0.1.0
-
Nested Class Summary
Nested classes/interfaces inherited from interface BlockProperty
BlockProperty.Choice<E>, BlockProperty.Flag, BlockProperty.Range -
Field Summary
Fields inherited from interface BlockProperty
NAME -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.name()Returns the value of thenamerecord component.Returns the name a value is written as.Returns the value written as a name,nullif none is.final StringtoString()Returns a string representation of this record class.values()Returns the accepted values, at least two, in state order.Methods inherited from interface BlockProperty
indexOf
-
Constructor Details
-
Flag
-
-
Method Details
-
values
Description copied from interface:BlockPropertyReturns the accepted values, at least two, in state order.- Specified by:
valuesin interfaceBlockProperty<Boolean>- Returns:
- the accepted values, at least two, in state order
-
nameOf
Description copied from interface:BlockPropertyReturns the name a value is written as.- Specified by:
nameOfin interfaceBlockProperty<Boolean>- Parameters:
value- an accepted value- Returns:
- the name a value is written as
-
parse
Description copied from interface:BlockPropertyReturns the value written as a name,nullif none is.- Specified by:
parsein interfaceBlockProperty<Boolean>- Parameters:
name- the written value- Returns:
- the value written as a name,
nullif none is
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
name
-