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 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 listMethods inherited from class com.uppaal.model.core2.Node
clone, getFirst, getLast, getNext, getPrevious, getXPathTag, insert, move, remove, setPrototypeMethods 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.
-