Record Class SimpleState
java.lang.Object
java.lang.Record
de.luckymcdev.foundryengine.common.game.SimpleState
- All Implemented Interfaces:
GameState
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final SimpleStatestatic final SimpleStatestatic final SimpleStatestatic final SimpleState -
Constructor Summary
ConstructorsConstructorDescriptionSimpleState(String name, boolean active) Creates an instance of aSimpleStaterecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanactive()Returns the value of theactiverecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanisActive()name()Returns the value of thenamerecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
LOBBY
-
PLAYING
-
FINISHED
-
STOPPED
-
-
Constructor Details
-
SimpleState
Creates an instance of aSimpleStaterecord class.- Parameters:
name- the value for thenamerecord componentactive- the value for theactiverecord component
-
-
Method Details
-
isActive
-
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 thecomparemethod from their corresponding wrapper classes. -
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
active
public boolean active()Returns the value of theactiverecord component.- Returns:
- the value of the
activerecord component
-