Package com.uppaal.model.core2
Class QueryList
java.lang.Object
com.uppaal.model.core2.Element
com.uppaal.model.core2.Node
com.uppaal.model.core2.QueryList
- All Implemented Interfaces:
Serializable
,Cloneable
,Iterable<Query>
public class QueryList extends Node implements Iterable<Query>
Special query List class, that provides access to status on the elements.
- See Also:
- Serialized Form
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and Type Method Description void
accept(Visitor visitor)
The query model has a visitorvoid
addLast(Query query)
Added the query at the last queryvoid
addQueryListListener(QueryListListener l)
Query
get(int index)
Get the query using the indexint
getVersion()
Returns the current version number of the query list.int
indexOf(Query query)
Get the index of the queryvoid
insert(Query q, int index)
Insert query into the query listboolean
isBlank()
Checks whether the query model is blank (empty or contains white space).boolean
isEmpty()
There isn't query in the model.Iterator<Query>
iterator()
void
remove(int index)
Remove the queryvoid
remove(Query query)
Remove the query from the query listvoid
removeAll()
Remove all queriesvoid
removeQueryListListener(QueryListListener l)
int
size()
Get the number of the query listMethods inherited from class com.uppaal.model.core2.Node
clone, getFirst, getLast, getNext, getPrevious, getXPathTag, insert, move, remove, setPrototype
Methods inherited from class com.uppaal.model.core2.Element
acceptSafe, addListener, getColor, getCommandManager, getDocument, getLocalProperty, getParent, getProperties, getProperty, getPropertyValue, getPrototype, getPrototypeFromParent, getTemplate, getX, getXMLLabelKinds, getXPath, getY, hasFlag, importInto, isPropertyLocal, removeListener, setCommandManager, setProperties, setProperty, setPropertyFromPath
-
Constructor Details
-
Method Details
-
addQueryListListener
-
removeQueryListListener
-
isEmpty
public boolean isEmpty()There isn't query in the model. -
addLast
Added the query at the last query- Parameters:
query
- - The new query
-
removeAll
public void removeAll()Remove all queries -
get
Get the query using the index- Parameters:
index
-- Returns:
- query - the selected query
-
insert
Insert query into the query list- Parameters:
q
- - The queryindex
- - The insert position
-
remove
Remove the query from the query list- Parameters:
query
- - The query
-
remove
public void remove(int index)Remove the query- Parameters:
index
- - Index to remove the query
-
indexOf
Get the index of the query- Parameters:
query
- - The query- Returns:
- The index of the query
-
size
public int size()Get the number of the query list- Returns:
- The size of the query list
-
iterator
-
getVersion
public int getVersion()Returns the current version number of the query list. The version number is incremented with every command.- Returns:
- version - The version
-
accept
The query model has a visitor -
isBlank
public boolean isBlank()Checks whether the query model is blank (empty or contains white space).- Returns:
- true - when the query model is blank.
-