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
Modifier and Type Method Description voidaccept(Visitor visitor)The query model has a visitorvoidaddLast(Query query)Added the query at the last queryvoidaddQueryListListener(QueryListListener l)Queryget(int index)Get the query using the indexintgetVersion()Returns the current version number of the query list.intindexOf(Query query)Get the index of the queryvoidinsert(Query q, int index)Insert query into the query listbooleanisBlank()Checks whether the query model is blank (empty or contains white space).booleanisEmpty()There isn't query in the model.Iterator<Query>iterator()voidremove(int index)Remove the queryvoidremove(Query query)Remove the query from the query listvoidremoveAll()Remove all queriesvoidremoveQueryListListener(QueryListListener l)intsize()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
-
addQueryListListener
public void addQueryListListener(QueryListListener l)
-
removeQueryListListener
public void removeQueryListListener(QueryListListener l)
-
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.
-
-