public class Sequence extends Element
Modifier and Type | Field and Description |
---|---|
protected java.util.List<Event> |
events
The sequence of events.
|
protected int |
path
The length of the path to explore from the covered State.
|
protected java.lang.String |
state
The name of the State to be covered by this Sequence.
|
Constructor and Description |
---|
Sequence()
Creates an empty sequence.
|
Sequence(Sequence other)
Copies another sequence.
|
Modifier and Type | Method and Description |
---|---|
Sequence |
addEvent(Event event)
Adds an event to the end of this sequence.
|
Sequence |
addSequence(Sequence other)
Concatenates another sequence onto the end of this sequence.
|
boolean |
equals(java.lang.Object other)
Reports whether this sequence is equal to another object.
|
java.util.List<Event> |
getEvents()
Returns the ordered list of events.
|
Event |
getFirstEvent()
Returns the first event in this Sequence.
|
Event |
getLastEvent()
Returns the last event in this Sequence.
|
int |
getPath()
Returns the length of the path explored from the covered State.
|
java.lang.String |
getState()
Returns the name of the state covered by this Sequence.
|
int |
hashCode()
Returns a quasi-unique hash code for this sequence.
|
boolean |
isEmpty()
Reports whether this is the empty Sequence.
|
Sequence |
setPath(int path)
Sets the length of the path explored from the covered State.
|
Sequence |
setState(java.lang.String state)
Sets the name of the state covered by this Sequence.
|
int |
size()
Returns the size of this sequence.
|
safeEquals, safeHashCode, semanticError
protected java.util.List<Event> events
protected java.lang.String state
protected int path
public Sequence()
public Sequence(Sequence other)
other
- the other sequence.public boolean equals(java.lang.Object other)
equals
in class java.lang.Object
other
- the other object.public int hashCode()
hashCode
in class java.lang.Object
public int size()
public boolean isEmpty()
public Sequence addEvent(Event event)
event
- a named event.public Sequence addSequence(Sequence other)
other
- the other sequence.public java.util.List<Event> getEvents()
public Event getFirstEvent()
public Event getLastEvent()
public java.lang.String getState()
public Sequence setState(java.lang.String state)
state
- the name of the State to set.public int getPath()
public Sequence setPath(int path)
path
- the path length to set.