public abstract class TriggerSequence
extends java.lang.Object
A sequence of one or more triggers. None of these triggers may be
null.
| Modifier and Type | Field and Description |
|---|---|
protected int |
hashCode
The hash code for this object.
|
protected Trigger[] |
triggers
The list of trigger in this sequence.
|
| Constructor and Description |
|---|
TriggerSequence(Trigger[] triggers)
Constructs a new instance of
TriggerSequence. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
endsWith(TriggerSequence triggerSequence,
boolean equals)
Returns whether or not this key sequence ends with the given key
sequence.
|
boolean |
equals(java.lang.Object object) |
abstract java.lang.String |
format()
Formats this trigger sequence into the current default look.
|
abstract TriggerSequence[] |
getPrefixes()
Returns a list of prefixes for the current sequence.
|
Trigger[] |
getTriggers()
Returns the list of triggers.
|
int |
hashCode() |
boolean |
isEmpty()
Returns whether or not this trigger sequence is empty.
|
boolean |
startsWith(TriggerSequence triggerSequence,
boolean equals)
Returns whether or not this trigger sequence starts with the given
trigger sequence.
|
protected transient int hashCode
HASH_CODE_NOT_COMPUTED iff the hash code has not
yet been computed.protected final Trigger[] triggers
null, and never contains null elements.public TriggerSequence(Trigger[] triggers)
TriggerSequence.triggers - The triggers contained within this sequence; must not be
null or contain null elements.
May be empty.public final boolean endsWith(TriggerSequence triggerSequence, boolean equals)
triggerSequence - a trigger sequence. Must not be null.equals - whether or not an identical trigger sequence should be
considered as a possible match.true, iff the given trigger sequence ends with
this trigger sequence.public final boolean equals(java.lang.Object object)
equals in class java.lang.Objectpublic abstract java.lang.String format()
null.public abstract TriggerSequence[] getPrefixes()
Returns a list of prefixes for the current sequence. A prefix is any
leading subsequence in a TriggerSequence. A prefix is
also an instance of TriggerSequence.
For example, consider a trigger sequence that consists of four triggers: A, B, C and D. The prefixes would be "", "A", "A B", and "A B C". The list of prefixes must always be the same as the size of the trigger list.
null, but may be empty. It must only
contains instances of TriggerSequence.public final Trigger[] getTriggers()
null and guaranteed to only
contain instances of Trigger.public final int hashCode()
hashCode in class java.lang.Objectpublic final boolean isEmpty()
true, iff the trigger sequence is empty.public final boolean startsWith(TriggerSequence triggerSequence, boolean equals)
triggerSequence - a trigger sequence. Must not be null.equals - whether or not an identical trigger sequence should be
considered as a possible match.true, iff the given trigger sequence starts with
this key sequence.
Copyright (c) 2000, 2018 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.