Class TetherEvent
java.lang.Object
gg.xp.reevent.events.BaseEvent
gg.xp.xivsupport.events.actlines.events.TetherEvent
- All Implemented Interfaces:
Event
,HasPrimaryValue
,HasSourceEntity
,HasTargetEntity
,Serializable
public class TetherEvent
extends BaseEvent
implements HasSourceEntity, HasTargetEntity, HasPrimaryValue
Event representing a tether. Rather than relying on tether events always ordering the two targets in a particular
way, consider using order-agnostic methods, such as
eitherTargetMatches(gg.xp.xivsupport.models.XivCombatant)
, getTargetMatching(java.util.function.Predicate<gg.xp.xivsupport.models.XivCombatant>)
,
and getTargets()
. In addition, for computing multiple tethers, there is a getUnitsTetheredTo(gg.xp.xivsupport.models.XivCombatant, java.util.Collection<gg.xp.xivsupport.events.actlines.events.TetherEvent>)
method
which you may find convenient.- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
boolean
eitherTargetMatches
(Predicate<XivCombatant> targetCondition) long
getId()
@Nullable XivCombatant
getTargetMatching
(Predicate<XivCombatant> targetCondition) static Set<XivCombatant>
getUnitsTetheredTo
(XivCombatant combatant, Collection<TetherEvent> tethers) boolean
tetherIdMatches
(long... expected) toString()
Methods inherited from class gg.xp.reevent.events.BaseEvent
delayedEnqueueAt, effectiveTimeNow, getCreatedAt, getEffectiveHappenedAt, getEffectiveTimeSince, getEnqueuedAt, getHappenedAt, getParent, getPumpedAt, getPumpFinishedAt, getSourceEventHandler, isImported, setDelayedEnqueueAt, setDelayedEnqueueOffset, setDelayedEnqueueOffset, setEnqueuedAt, setHappenedAt, setImported, setParent, setPumpedAt, setPumpFinishedAt, setSourceEventHandler, setTimeSource
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface gg.xp.reevent.events.Event
combineWith, delayedEnqueueAtFront, dumpFields, getThisOrParentOfType, shouldSave
-
Constructor Details
-
TetherEvent
-
-
Method Details
-
getSource
- Specified by:
getSource
in interfaceHasSourceEntity
- Returns:
- The source of this action. Note that this is a snapshot of the source at the point in time when the
action occurred. To see the current data, use
XivState.getLatestCombatantData(XivCombatant)
.
-
getTarget
- Specified by:
getTarget
in interfaceHasTargetEntity
- Returns:
- The target of this action. Note that this is a snapshot of the target at the point in time when the
action occurred. To see the current data, use
XivState.getLatestCombatantData(XivCombatant)
.
-
getId
public long getId() -
tetherIdMatches
public boolean tetherIdMatches(long... expected) -
eitherTargetMatches
-
getTargets
-
getTargetMatching
-
eitherTargetMatches
-
getUnitsTetheredTo
public static Set<XivCombatant> getUnitsTetheredTo(XivCombatant combatant, Collection<TetherEvent> tethers) -
toString
-
getPrimaryValue
- Specified by:
getPrimaryValue
in interfaceHasPrimaryValue
- Returns:
- A text description of this object. Should be user-friendly and not over-the-top technical (fine-grained
details belong in other fields, or in the
Object.toString()
method).
-