Package kr.toxicity.model.api.tracker
Record Class ModelRotator.SourcedRotator
java.lang.Object
java.lang.Record
kr.toxicity.model.api.tracker.ModelRotator.SourcedRotator
- All Implemented Interfaces:
BiFunction<Tracker,,ModelRotation, ModelRotation> ModelRotator
- Enclosing interface:
ModelRotator
public static record ModelRotator.SourcedRotator(@NotNull ModelRotator source, @NotNull ModelRotator delegate)
extends Record
implements ModelRotator
-
Nested Class Summary
Nested classes/interfaces inherited from interface kr.toxicity.model.api.tracker.ModelRotator
ModelRotator.Builder, ModelRotator.BuiltInDeserializer, ModelRotator.Deserializer, ModelRotator.Getter, ModelRotator.SourcedRotator -
Field Summary
Fields inherited from interface kr.toxicity.model.api.tracker.ModelRotator
DEFAULT, DESERIALIZER, EMPTY, PITCH, YAW -
Constructor Summary
ConstructorsConstructorDescriptionSourcedRotator(@NotNull ModelRotator source, @NotNull ModelRotator delegate) Creates an instance of aSourcedRotatorrecord class. -
Method Summary
Modifier and TypeMethodDescription@NotNull ModelRotationapply(@NotNull Tracker tracker, @NotNull ModelRotation rotation) @Nullable com.google.gson.JsonElementdata()@NotNull ModelRotatordelegate()Returns the value of thedelegaterecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.@NotNull Stringname()@NotNull ModelRotatorsource()Returns the value of thesourcerecord component.final StringtoString()Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.function.BiFunction
andThenMethods inherited from interface kr.toxicity.model.api.tracker.ModelRotator
apply, root, serialize, then
-
Constructor Details
-
SourcedRotator
public SourcedRotator(@NotNull @NotNull ModelRotator source, @NotNull @NotNull ModelRotator delegate) Creates an instance of aSourcedRotatorrecord class.- Parameters:
source- the value for thesourcerecord componentdelegate- the value for thedelegaterecord component
-
-
Method Details
-
name
- Specified by:
namein interfaceModelRotator
-
data
@Nullable public @Nullable com.google.gson.JsonElement data()- Specified by:
datain interfaceModelRotator
-
apply
@NotNull public @NotNull ModelRotation apply(@NotNull @NotNull Tracker tracker, @NotNull @NotNull ModelRotation rotation) - Specified by:
applyin interfaceBiFunction<Tracker,ModelRotation, ModelRotation> - Specified by:
applyin interfaceModelRotator
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
source
Returns the value of thesourcerecord component.- Specified by:
sourcein interfaceModelRotator- Returns:
- the value of the
sourcerecord component
-
delegate
Returns the value of thedelegaterecord component.- Returns:
- the value of the
delegaterecord component
-