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
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
accept(Visitor visitor)
The query model has a visitorvoid
addLast(Query query)
Added the query at the last queryQuery
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 queriesint
size()
Get the number of the query list-
Methods 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
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Constructor Detail
-
QueryList
public QueryList(Element prototype)
Default constructor.
-
QueryList
public QueryList()
Default constructor.
-
-
Method Detail
-
isEmpty
public boolean isEmpty()
There isn't query in the model.
-
addLast
public void addLast(Query query)
Added the query at the last query- Parameters:
query
- - The new query
-
removeAll
public void removeAll()
Remove all queries
-
get
public Query get(int index)
Get the query using the index- Parameters:
index
-- Returns:
- query - the selected query
-
insert
public void insert(Query q, int index)
Insert query into the query list- Parameters:
q
- - The queryindex
- - The insert position
-
remove
public void remove(Query query)
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
public int indexOf(Query query)
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
-
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
-
isBlank
public boolean isBlank()
Checks whether the query model is blank (empty or contains white space).- Returns:
- true - when the query model is blank.
-
-