Package org.eclipse.jface.bindings
Class TriggerSequence
java.lang.Object
org.eclipse.jface.bindings.TriggerSequence
- Direct Known Subclasses:
- KeySequence
 A sequence of one or more triggers. None of these triggers may be
 null.
 
- Since:
- 3.1
- 
Field SummaryFields
- 
Constructor SummaryConstructorsConstructorDescriptionTriggerSequence(Trigger[] triggers) Constructs a new instance ofTriggerSequence.
- 
Method SummaryModifier and TypeMethodDescriptionfinal booleanendsWith(TriggerSequence triggerSequence, boolean equals) Returns whether or not this key sequence ends with the given key sequence.final booleanabstract Stringformat()Formats this trigger sequence into the current default look.abstract TriggerSequence[]Returns a list of prefixes for the current sequence.final Trigger[]Returns the list of triggers.final inthashCode()final booleanisEmpty()Returns whether or not this trigger sequence is empty.final booleanstartsWith(TriggerSequence triggerSequence, boolean equals) Returns whether or not this trigger sequence starts with the given trigger sequence.
- 
Field Details- 
hashCodeprotected transient int hashCodeThe hash code for this object. This value is computed lazily, and marked as invalid when one of the values on which it is based changes. This values isHASH_CODE_NOT_COMPUTEDiff the hash code has not yet been computed.
- 
triggersThe list of trigger in this sequence. This value is nevernull, and never containsnullelements.
 
- 
- 
Constructor Details- 
TriggerSequenceConstructs a new instance ofTriggerSequence.- Parameters:
- triggers- The triggers contained within this sequence; must not be- nullor contain- nullelements. May be empty.
 
 
- 
- 
Method Details- 
endsWithReturns whether or not this key sequence ends with the given key sequence.- Parameters:
- triggerSequence- a trigger sequence. Must not be- null.
- equals- whether or not an identical trigger sequence should be considered as a possible match.
- Returns:
- true, iff the given trigger sequence ends with this trigger sequence.
 
- 
equals
- 
formatFormats this trigger sequence into the current default look.- Returns:
- A string representation for this trigger sequence using the
         default look; never null.
 
- 
getPrefixesReturns a list of prefixes for the current sequence. A prefix is any leading subsequence in a TriggerSequence. A prefix is also an instance ofTriggerSequence.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. - Returns:
- The array of possible prefixes for this sequence. This array must
         not be null, but may be empty. It must only contains instances ofTriggerSequence.
 
- 
getTriggersReturns the list of triggers.- Returns:
- The triggers; never nulland guaranteed to only contain instances ofTrigger.
 
- 
hashCodepublic final int hashCode()
- 
isEmptypublic final boolean isEmpty()Returns whether or not this trigger sequence is empty.- Returns:
- true, iff the trigger sequence is empty.
 
- 
startsWithReturns whether or not this trigger sequence starts with the given trigger sequence.- Parameters:
- triggerSequence- a trigger sequence. Must not be- null.
- equals- whether or not an identical trigger sequence should be considered as a possible match.
- Returns:
- true, iff the given trigger sequence starts with this key sequence.
 
 
-