|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.AbstractCollection
java.util.AbstractList
java.util.ArrayList
groovy.lang.Sequence
public class Sequence
Represents a sequence of objects which represents zero or many instances of of objects of a given type. The type can be ommitted in which case any type of object can be added.
Field Summary |
---|
Fields inherited from class java.util.AbstractList |
---|
modCount |
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)
Invokes the given method |
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)
Allows the MetaClass to be replaced with a derived implementation |
void |
setProperty(java.lang.String property,
java.lang.Object newValue)
Sets the given property to the new value |
java.lang.Class |
type()
|
Methods inherited from class java.util.ArrayList |
---|
clone, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, remove, size, toArray, toArray, trimToSize |
Methods inherited from class java.util.AbstractList |
---|
iterator, listIterator, listIterator, subList |
Methods inherited from class java.util.AbstractCollection |
---|
containsAll, removeAll, retainAll, toString |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.List |
---|
containsAll, iterator, listIterator, listIterator, removeAll, retainAll, subList |
Constructor Detail |
---|
public Sequence()
public Sequence(java.lang.Class type)
public Sequence(java.lang.Class type, java.util.List content)
Method Detail |
---|
public void set(java.util.Collection collection)
public boolean equals(java.lang.Object that)
equals
in interface java.util.Collection
equals
in interface java.util.List
equals
in class java.util.AbstractList
public boolean equals(Sequence that)
public int hashCode()
hashCode
in interface java.util.Collection
hashCode
in interface java.util.List
hashCode
in class java.util.AbstractList
public int minimumSize()
public java.lang.Class type()
public void add(int index, java.lang.Object element)
add
in interface java.util.List
add
in class java.util.ArrayList
public boolean add(java.lang.Object element)
add
in interface java.util.Collection
add
in interface java.util.List
add
in class java.util.ArrayList
public boolean addAll(java.util.Collection c)
addAll
in interface java.util.Collection
addAll
in interface java.util.List
addAll
in class java.util.ArrayList
public boolean addAll(int index, java.util.Collection c)
addAll
in interface java.util.List
addAll
in class java.util.ArrayList
public void clear()
clear
in interface java.util.Collection
clear
in interface java.util.List
clear
in class java.util.ArrayList
public java.lang.Object remove(int index)
remove
in interface java.util.List
remove
in class java.util.ArrayList
protected void removeRange(int fromIndex, int toIndex)
removeRange
in class java.util.ArrayList
public java.lang.Object set(int index, java.lang.Object element)
set
in interface java.util.List
set
in class java.util.ArrayList
public java.lang.Object invokeMethod(java.lang.String name, java.lang.Object args)
GroovyObject
invokeMethod
in interface GroovyObject
public java.lang.Object getProperty(java.lang.String property)
getProperty
in interface GroovyObject
public void setProperty(java.lang.String property, java.lang.Object newValue)
GroovyObject
setProperty
in interface GroovyObject
public MetaClass getMetaClass()
getMetaClass
in interface GroovyObject
public void setMetaClass(MetaClass metaClass)
GroovyObject
setMetaClass
in interface GroovyObject
protected void checkCollectionType(java.util.Collection c)
protected void checkType(java.lang.Object object)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |