|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.util.AbstractCollection<E>
java.util.AbstractList<E>
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 omitted 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()
Returns the metaclass for a given class. |
java.lang.Object |
getProperty(java.lang.String property)
Retrieves a property value. |
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.Collectionequals in interface java.util.Listequals in class java.util.AbstractListpublic boolean equals(Sequence that)
public int hashCode()
hashCode in interface java.util.CollectionhashCode in interface java.util.ListhashCode in class java.util.AbstractListpublic int minimumSize()
public java.lang.Class type()
public void add(int index,
java.lang.Object element)
add in interface java.util.Listadd in class java.util.ArrayListpublic boolean add(java.lang.Object element)
add in interface java.util.Collectionadd in interface java.util.Listadd in class java.util.ArrayListpublic boolean addAll(java.util.Collection c)
addAll in interface java.util.CollectionaddAll in interface java.util.ListaddAll in class java.util.ArrayList
public boolean addAll(int index,
java.util.Collection c)
addAll in interface java.util.ListaddAll in class java.util.ArrayListpublic void clear()
clear in interface java.util.Collectionclear in interface java.util.Listclear in class java.util.ArrayListpublic java.lang.Object remove(int index)
remove in interface java.util.Listremove 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.Listset in class java.util.ArrayList
public java.lang.Object invokeMethod(java.lang.String name,
java.lang.Object args)
GroovyObject
invokeMethod in interface GroovyObjectname - the name of the method to callargs - the arguments to use for the method call
public java.lang.Object getProperty(java.lang.String property)
GroovyObject
getProperty in interface GroovyObjectproperty - the name of the property of interest
public void setProperty(java.lang.String property,
java.lang.Object newValue)
GroovyObject
setProperty in interface GroovyObjectproperty - the name of the property of interestnewValue - the new value for the propertypublic MetaClass getMetaClass()
GroovyObject
getMetaClass in interface GroovyObjectpublic void setMetaClass(MetaClass metaClass)
GroovyObject
setMetaClass in interface GroovyObjectmetaClass - the new metaclassprotected 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 | ||||||||