Package kr.toxicity.model.api.script
Record Class TimeScript
java.lang.Object
java.lang.Record
kr.toxicity.model.api.script.TimeScript
- Record Components:
time- timescript- source script
- All Implemented Interfaces:
Comparable<Timed>,Consumer<ScriptSource>,Timed,AnimationScript
public record TimeScript(float time, @NotNull AnimationScript script)
extends Record
implements AnimationScript, Timed
Script with time
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionTimeScript(float time, @NotNull AnimationScript script) Creates an instance of aTimeScriptrecord class. -
Method Summary
Modifier and TypeMethodDescriptionvoidaccept(@NotNull ScriptSource trigger) booleanIndicates whether some other object is "equal to" this one.inthashCode()Returns a hash code value for this object.booleanisSync()@NotNull AnimationScriptscript()Returns the value of thescriptrecord component.floattime()Returns the value of thetimerecord component.@NotNull TimeScripttime(float time) Creates a timed scriptfinal StringtoString()Returns a string representation of this record class.
-
Field Details
-
EMPTY
-
-
Constructor Details
-
Method Details
-
isSync
public boolean isSync()- Specified by:
isSyncin interfaceAnimationScript
-
accept
- Specified by:
acceptin interfaceAnimationScript- Specified by:
acceptin interfaceConsumer<ScriptSource>
-
time
Description copied from interface:AnimationScriptCreates a timed script- Specified by:
timein interfaceAnimationScript- Parameters:
time- time- Returns:
- timed script
-
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 '=='. -
hashCode
public int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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. -
time
public float time()Returns the value of thetimerecord component. -
script
Returns the value of thescriptrecord component.- Returns:
- the value of the
scriptrecord component
-