public class Sequence extends ArrayList implements GroovyObject
modCount| Constructor and Description |
|---|
Sequence() |
Sequence(Class type) |
Sequence(Class type,
List content) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(int index,
Object element) |
boolean |
add(Object element) |
boolean |
addAll(Collection c) |
boolean |
addAll(int index,
Collection c) |
protected void |
checkCollectionType(Collection c)
Checks that each member of the given collection are of the correct
type
|
protected void |
checkType(Object object)
Checks that the given object instance is of the correct type
otherwise a runtime exception is thrown
|
void |
clear() |
boolean |
equals(Object that) |
boolean |
equals(Sequence that) |
MetaClass |
getMetaClass()
Returns the metaclass for a given class.
|
Object |
getProperty(String property)
Retrieves a property value.
|
int |
hashCode() |
Object |
invokeMethod(String name,
Object args)
Invokes the given method.
|
int |
minimumSize() |
Object |
remove(int index) |
protected void |
removeRange(int fromIndex,
int toIndex) |
void |
set(Collection collection)
Sets the contents of this sequence to that
of the given collection.
|
Object |
set(int index,
Object element) |
void |
setMetaClass(MetaClass metaClass)
Allows the MetaClass to be replaced with a derived implementation.
|
void |
setProperty(String property,
Object newValue)
Sets the given property to the new value.
|
Class |
type() |
clone, contains, ensureCapacity, forEach, get, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, removeAll, removeIf, replaceAll, retainAll, size, sort, spliterator, subList, toArray, toArray, trimToSizecontainsAll, toStringfinalize, getClass, notify, notifyAll, wait, wait, waitcontainsAllparallelStream, streampublic Sequence()
public Sequence(Class type)
public void set(Collection collection)
public boolean equals(Object that)
equals in interface Collectionequals in interface Listequals in class AbstractListpublic boolean equals(Sequence that)
public int hashCode()
hashCode in interface CollectionhashCode in interface ListhashCode in class AbstractListpublic int minimumSize()
public Class type()
public void add(int index,
Object element)
public boolean add(Object element)
public boolean addAll(Collection c)
public boolean addAll(int index,
Collection c)
public void clear()
public Object remove(int index)
protected void removeRange(int fromIndex,
int toIndex)
removeRange in class ArrayListpublic Object invokeMethod(String name, Object args)
GroovyObjectinvokeMethod in interface GroovyObjectname - the name of the method to callargs - the arguments to use for the method callpublic Object getProperty(String property)
GroovyObjectgetProperty in interface GroovyObjectproperty - the name of the property of interestpublic void setProperty(String property, 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(Collection c)
protected void checkType(Object object)