|
Groovy Documentation | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.util.AbstractCollection java.util.AbstractList java.util.ArrayList groovy.lang.Sequence
public class Sequence extends java.util.ArrayList
Represents a sequence of objects which represents zero or many instances of of objects of a given type. The type can be omitted in which case any type of object can be added.
Constructor Summary | |
Sequence()
|
|
Sequence(java.lang.Class type)
|
|
Sequence(java.lang.Class type, java.util.List content)
|
Method Summary | |
---|---|
void
|
add(int index, java.lang.Object element)
|
boolean
|
add(java.lang.Object element)
|
boolean
|
addAll(java.util.Collection c)
|
boolean
|
addAll(int index, java.util.Collection c)
|
protected void
|
checkCollectionType(java.util.Collection c)
Checks that each member of the given collection are of the correct type |
protected void
|
checkType(java.lang.Object object)
Checks that the given object instance is of the correct type otherwise a runtime exception is thrown |
void
|
clear()
|
boolean
|
equals(java.lang.Object that)
|
boolean
|
equals(Sequence that)
|
MetaClass
|
getMetaClass()
|
java.lang.Object
|
getProperty(java.lang.String property)
|
int
|
hashCode()
|
java.lang.Object
|
invokeMethod(java.lang.String name, java.lang.Object args)
|
int
|
minimumSize()
|
java.lang.Object
|
remove(int index)
|
protected void
|
removeRange(int fromIndex, int toIndex)
|
void
|
set(java.util.Collection collection)
Sets the contents of this sequence to that of the given collection. |
java.lang.Object
|
set(int index, java.lang.Object element)
|
void
|
setMetaClass(MetaClass metaClass)
|
void
|
setProperty(java.lang.String property, java.lang.Object newValue)
|
java.lang.Class
|
type()
@return the type of the elements in the sequence or null if there is no type constraint on this sequence |
Methods inherited from class java.util.ArrayList | |
---|---|
java.util.ArrayList#add(int, java.lang.Object), java.util.ArrayList#add(java.lang.Object), java.util.ArrayList#remove(int), java.util.ArrayList#remove(java.lang.Object), java.util.ArrayList#get(int), java.util.ArrayList#clone(), java.util.ArrayList#indexOf(java.lang.Object), java.util.ArrayList#clear(), java.util.ArrayList#contains(java.lang.Object), java.util.ArrayList#isEmpty(), java.util.ArrayList#lastIndexOf(java.lang.Object), java.util.ArrayList#size(), java.util.ArrayList#subList(int, int), java.util.ArrayList#toArray(), java.util.ArrayList#toArray([Ljava.lang.Object;), java.util.ArrayList#addAll(int, java.util.Collection), java.util.ArrayList#addAll(java.util.Collection), java.util.ArrayList#iterator(), java.util.ArrayList#set(int, java.lang.Object), java.util.ArrayList#ensureCapacity(int), java.util.ArrayList#trimToSize(), java.util.ArrayList#retainAll(java.util.Collection), java.util.ArrayList#listIterator(), java.util.ArrayList#listIterator(int), java.util.ArrayList#removeAll(java.util.Collection), java.util.ArrayList#equals(java.lang.Object), java.util.ArrayList#hashCode(), java.util.ArrayList#toString(), java.util.ArrayList#containsAll(java.util.Collection), java.util.ArrayList#wait(long, int), java.util.ArrayList#wait(long), java.util.ArrayList#wait(), java.util.ArrayList#getClass(), java.util.ArrayList#notify(), java.util.ArrayList#notifyAll() |
Methods inherited from class java.util.AbstractList | |
---|---|
java.util.AbstractList#add(int, java.lang.Object), java.util.AbstractList#add(java.lang.Object), java.util.AbstractList#remove(int), java.util.AbstractList#get(int), java.util.AbstractList#equals(java.lang.Object), java.util.AbstractList#hashCode(), java.util.AbstractList#indexOf(java.lang.Object), java.util.AbstractList#clear(), java.util.AbstractList#lastIndexOf(java.lang.Object), java.util.AbstractList#subList(int, int), java.util.AbstractList#addAll(int, java.util.Collection), java.util.AbstractList#iterator(), java.util.AbstractList#set(int, java.lang.Object), java.util.AbstractList#listIterator(), java.util.AbstractList#listIterator(int), java.util.AbstractList#remove(java.lang.Object), java.util.AbstractList#toString(), java.util.AbstractList#contains(java.lang.Object), java.util.AbstractList#isEmpty(), java.util.AbstractList#size(), java.util.AbstractList#toArray([Ljava.lang.Object;), java.util.AbstractList#toArray(), java.util.AbstractList#addAll(java.util.Collection), java.util.AbstractList#retainAll(java.util.Collection), java.util.AbstractList#containsAll(java.util.Collection), java.util.AbstractList#removeAll(java.util.Collection), java.util.AbstractList#wait(long, int), java.util.AbstractList#wait(long), java.util.AbstractList#wait(), java.util.AbstractList#getClass(), java.util.AbstractList#notify(), java.util.AbstractList#notifyAll(), java.util.AbstractList#size() |
Constructor Detail |
---|
public Sequence()
public Sequence(java.lang.Class type)
public Sequence(java.lang.Class type, java.util.List content)
Method Detail |
---|
public void add(int index, java.lang.Object element)
public boolean add(java.lang.Object element)
public boolean addAll(java.util.Collection c)
public boolean addAll(int index, java.util.Collection c)
protected void checkCollectionType(java.util.Collection c)
protected void checkType(java.lang.Object object)
public void clear()
public boolean equals(java.lang.Object that)
public boolean equals(Sequence that)
public MetaClass getMetaClass()
public java.lang.Object getProperty(java.lang.String property)
public int hashCode()
public java.lang.Object invokeMethod(java.lang.String name, java.lang.Object args)
public int minimumSize()
public java.lang.Object remove(int index)
protected void removeRange(int fromIndex, int toIndex)
public void set(java.util.Collection collection)
public java.lang.Object set(int index, java.lang.Object element)
public void setMetaClass(MetaClass metaClass)
public void setProperty(java.lang.String property, java.lang.Object newValue)
public java.lang.Class type()
Groovy Documentation