public final class Environments extends java.util.AbstractList<Environment> implements java.io.Serializable
The environment list should contain at most one of each type of environment: That is:
Additionally, the robot must contain a Query Environment, if the robot takes query parameters.
Constructor and Description |
---|
Environments()
Creates a new empty
Environments . |
Environments(Environment environment)
Creates an
Enviroments object holding one Environment . |
Environments(java.util.List<Environment> environments)
Creates an
Enviroments object from a list of Environment
objects. |
Modifier and Type | Method and Description |
---|---|
void |
add(int index,
Environment element) |
Environment |
get(int index)
Returns the
Environment at the specified position in this list. |
Environment |
getEnvironment(int index)
Returns the
Environment at the specified position in this list. |
Environment |
getEnvironmentByClass(java.lang.Class environmentClass)
Returns the first environment in the list that is of a specific class,
or
null if no such environment was found. |
Environment |
remove(int index) |
int |
size()
Returns the number of environments in this collection.
|
add, addAll, clear, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, removeRange, set, subList
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
public Environments()
Environments
.public Environments(Environment environment)
Enviroments
object holding one Environment
.environment
- an environment to put into the constructed object.public Environments(java.util.List<Environment> environments)
Enviroments
object from a list of Environment
objects.environments
- a list of Environment
objects.public Environment get(int index)
Environment
at the specified position in this list.get
in interface java.util.List<Environment>
get
in class java.util.AbstractList<Environment>
index
- index of element to return.java.lang.IndexOutOfBoundsException
- if the given index is out of range
(index < 0 || index >= size()).public Environment getEnvironmentByClass(java.lang.Class environmentClass)
null
if no such environment was found.environmentClass
- the class to look fornull
if no such environment was found.public Environment getEnvironment(int index)
Environment
at the specified position in this list.
This returns the same object as the get
method, but it
is allready cast to the correct type.index
- index of element to return.java.lang.IndexOutOfBoundsException
- if the given index is out of range
(index < 0 || index >= size()).public int size()
size
in interface java.util.Collection<Environment>
size
in interface java.util.List<Environment>
size
in class java.util.AbstractCollection<Environment>
public void add(int index, Environment element)
add
in interface java.util.List<Environment>
add
in class java.util.AbstractList<Environment>
public Environment remove(int index)
remove
in interface java.util.List<Environment>
remove
in class java.util.AbstractList<Environment>
RoboSuite Java API, v11.4.7880