public class Sequence extends java.util.ArrayList implements GroovyObject
| Constructor and Description |
|---|
Sequence() |
Sequence(java.lang.Class type) |
Sequence(java.lang.Class type,
java.util.List content) |
| Modifier and Type | Method and Description |
|---|---|
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() |
clone, contains, ensureCapacity, forEach, get, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, removeAll, removeIf, replaceAll, retainAll, size, sort, spliterator, subList, toArray, toArray, trimToSizepublic Sequence()
public Sequence(java.lang.Class type)
public Sequence(java.lang.Class type,
java.util.List content)
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.ArrayListpublic 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.ArrayListprotected void removeRange(int fromIndex,
int toIndex)
removeRange in class java.util.ArrayListpublic java.lang.Object set(int index,
java.lang.Object element)
set in interface java.util.Listset in class java.util.ArrayListpublic java.lang.Object invokeMethod(java.lang.String name,
java.lang.Object args)
GroovyObjectinvokeMethod in interface GroovyObjectname - the name of the method to callargs - the arguments to use for the method callpublic java.lang.Object getProperty(java.lang.String property)
GroovyObjectgetProperty in interface GroovyObjectproperty - the name of the property of interestpublic void setProperty(java.lang.String property,
java.lang.Object newValue)
GroovyObjectsetProperty in interface GroovyObjectproperty - the name of the property of interestnewValue - the new value for the propertypublic MetaClass getMetaClass()
GroovyObjectgetMetaClass in interface GroovyObjectpublic void setMetaClass(MetaClass metaClass)
GroovyObjectsetMetaClass in interface GroovyObjectmetaClass - the new metaclassprotected void checkCollectionType(java.util.Collection c)
protected void checkType(java.lang.Object object)