public class Vector
extends java.lang.Object
Transaction
,
EventList
Constructor and Description |
---|
Vector()
Constructs an empty vector.
|
Vector(java.util.Collection<Transaction> transactions,
EventList events)
Constructs a vector containing the specified transactions and events.
|
Vector(Transaction transaction)
Constructs a vector containing the specified transaction.
|
Modifier and Type | Method and Description |
---|---|
void |
addEvent(Event event)
Adds the specified event to the vector.
|
void |
addEvents(EventList events)
Adds the specified events to this vector.
|
void |
addTransaction(Transaction transaction)
Adds the specified transaction to this vector.
|
boolean |
containsVariable(java.lang.String name)
Checks if the specified variable is in this vector.
|
boolean |
equals(java.lang.Object obj)
Compares the specified object with this vector for equality.
|
java.util.Map<java.lang.String,ru.ispras.fortress.expression.NodeValue> |
getAssignments()
Returns assignments.
|
EventList |
getEventList()
Returns an
EventList associated with this vector. |
java.util.Set<Transaction> |
getTransactions()
Returns all transactions included in this vector.
|
ru.ispras.fortress.expression.Node |
getValue(java.lang.String variableName)
Returns a value of the specified variable from this vector.
|
boolean |
hasEvents()
Checks whether this object has events.
|
int |
hashCode() |
boolean |
isEmpty()
Checks if this vector is empty.
|
void |
removeEvents()
Clears all the internal events for this objects.
|
java.lang.String |
toString() |
public Vector()
public Vector(Transaction transaction)
transaction
- the transaction to be placed in the vectorpublic Vector(java.util.Collection<Transaction> transactions, EventList events)
transactions
- a collection of the transactionsevents
- the eventspublic void addTransaction(Transaction transaction)
transaction
- the transaction to be addedpublic void addEvent(Event event)
event
- the event to be addedpublic void addEvents(EventList events)
events
- the events to be addedpublic void removeEvents()
public boolean hasEvents()
true
when this object has events, false
otherwise.public EventList getEventList()
EventList
associated with this vector.public java.util.Set<Transaction> getTransactions()
public boolean isEmpty()
true
if this vector contains neither any non-empty transactions nor any
events. Otherwise returns false
public boolean containsVariable(java.lang.String name)
name
- a name of the variable.true
if this vector contains the specified variable. Otherwise returns
false
public java.util.Map<java.lang.String,ru.ispras.fortress.expression.NodeValue> getAssignments()
public ru.ispras.fortress.expression.Node getValue(java.lang.String variableName)
variableName
- a name of the variablenull
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
Vector
class or its subclass;
EventList
is equal to this vector's one;
equals
in class java.lang.Object
obj
- the object to be compared for equality with this vectortrue
if the specified object is equal to this vector. Otherwise returns
false
public java.lang.String toString()
toString
in class java.lang.Object