Package kr.toxicity.model.api.tracker
Record Class TrackerUpdateAction.Composite
java.lang.Object
java.lang.Record
kr.toxicity.model.api.tracker.TrackerUpdateAction.Composite
- Record Components:
actions- the list of actions
- All Implemented Interfaces:
BiPredicate<RenderedBone,,BonePredicate> TrackerUpdateAction
- Enclosing interface:
TrackerUpdateAction
public static record TrackerUpdateAction.Composite(@NotNull @Unmodifiable List<TrackerUpdateAction> actions)
extends Record
implements TrackerUpdateAction
Composite action.
- Since:
- 1.15.2
-
Nested Class Summary
Nested classes/interfaces inherited from interface kr.toxicity.model.api.tracker.TrackerUpdateAction
TrackerUpdateAction.Billboard, TrackerUpdateAction.Brightness, TrackerUpdateAction.Composite, TrackerUpdateAction.Enchant, TrackerUpdateAction.Glow, TrackerUpdateAction.GlowColor, TrackerUpdateAction.ItemMapping, TrackerUpdateAction.ItemStack, TrackerUpdateAction.MoveDuration, TrackerUpdateAction.None, TrackerUpdateAction.PerBone, TrackerUpdateAction.PreviousTint, TrackerUpdateAction.Tint, TrackerUpdateAction.TogglePart, TrackerUpdateAction.ViewRange -
Constructor Summary
ConstructorsConstructorDescriptionComposite(@NotNull @Unmodifiable List<TrackerUpdateAction> actions) Creates an instance of aCompositerecord class. -
Method Summary
Modifier and TypeMethodDescription@NotNull @Unmodifiable List<TrackerUpdateAction> actions()Returns the value of theactionsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.@NotNull Stream<TrackerUpdateAction> stream()Returns a stream of actions (useful for flattening composites).booleantest(@NotNull RenderedBone bone, @NotNull BonePredicate predicate) Applies the action to a bone if it matches the predicate.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.BiPredicate
and, negate, orMethods inherited from interface kr.toxicity.model.api.tracker.TrackerUpdateAction
then
-
Constructor Details
-
Composite
Creates an instance of aCompositerecord class.- Parameters:
actions- the value for theactionsrecord component
-
-
Method Details
-
test
Description copied from interface:TrackerUpdateActionApplies the action to a bone if it matches the predicate.- Specified by:
testin interfaceBiPredicate<RenderedBone,BonePredicate> - Specified by:
testin interfaceTrackerUpdateAction- Parameters:
bone- the target bonepredicate- the predicate to check against- Returns:
- true if the bone was updated
-
stream
Description copied from interface:TrackerUpdateActionReturns a stream of actions (useful for flattening composites).- Specified by:
streamin interfaceTrackerUpdateAction- Returns:
- the stream
-
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). -
actions
Returns the value of theactionsrecord component.- Returns:
- the value of the
actionsrecord component
-