Record Class ModelRotator.SourcedRotator
java.lang.Object
java.lang.Record
kr.toxicity.model.api.tracker.ModelRotator.SourcedRotator
- Record Components:
source- source rotatordelegate- delegated rotator
- 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
Implementation of a chained rotator.
- Since:
- 1.15.2
-
Nested Class Summary
Nested classes/interfaces inherited from interface ModelRotator
ModelRotator.Builder, ModelRotator.BuiltInDeserializer, ModelRotator.Deserializer, ModelRotator.Getter, ModelRotator.SourcedRotator -
Field Summary
Fields inherited from interface 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) Applies the rotator to a tracker with a base rotation.@Nullable com.google.gson.JsonElementdata()Returns the configuration data for this rotator.@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()Returns the name of this rotator type.@NotNull ModelRotatorsource()Returns the value of thesourcerecord component.final StringtoString()Returns a string representation of this record class.Methods inherited from interface BiFunction
andThenMethods inherited from interface ModelRotator
apply, root, serialize, then
-
Constructor Details
-
SourcedRotator
public SourcedRotator(@NotNull @NotNull ModelRotator source, @NotNull @NotNull ModelRotator delegate) Creates an instance of aSourcedRotatorrecord class.
-
-
Method Details
-
name
Description copied from interface:ModelRotatorReturns the name of this rotator type.- Specified by:
namein interfaceModelRotator- Returns:
- the name
-
data
@Nullable public @Nullable com.google.gson.JsonElement data()Description copied from interface:ModelRotatorReturns the configuration data for this rotator.- Specified by:
datain interfaceModelRotator- Returns:
- the data, or null
-
apply
@NotNull public @NotNull ModelRotation apply(@NotNull @NotNull Tracker tracker, @NotNull @NotNull ModelRotation rotation) Description copied from interface:ModelRotatorApplies the rotator to a tracker with a base rotation.- Specified by:
applyin interfaceBiFunction<Tracker, ModelRotation, ModelRotation>- Specified by:
applyin interfaceModelRotator- Parameters:
tracker- the trackerrotation- the base rotation- Returns:
- the calculated rotation
-
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). -
source
Returns the value of thesourcerecord component.- Specified by:
sourcein interfaceModelRotator- Returns:
- the value of the
sourcerecord component
-
delegate
-