GroovyObjectNonEmptySequencepublic class Sequence extends java.util.ArrayList implements GroovyObject
| Constructor | Description |
|---|---|
Sequence() |
|
Sequence(java.lang.Class type) |
|
Sequence(java.lang.Class type,
java.util.List content) |
| Modifier and Type | Method | Description |
|---|---|---|
void |
add(int index,
java.lang.Object element) |
|
boolean |
add(java.lang.Object element) |
|
boolean |
addAll(int index,
java.util.Collection c) |
|
boolean |
addAll(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(Sequence that) |
|
boolean |
equals(java.lang.Object 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) |
|
java.lang.Object |
set(int index,
java.lang.Object element) |
|
void |
set(java.util.Collection collection) |
Sets the contents of this sequence to that
of the given collection.
|
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 class java.util.AbstractListpublic boolean equals(Sequence that)
public int hashCode()
hashCode in class java.util.AbstractListpublic int minimumSize()
public java.lang.Class type()
public void add(int index,
java.lang.Object element)
add in class java.util.ArrayListpublic boolean add(java.lang.Object element)
add in class java.util.ArrayListpublic boolean addAll(java.util.Collection c)
addAll in class java.util.ArrayListpublic boolean addAll(int index,
java.util.Collection c)
addAll in class java.util.ArrayListpublic void clear()
clear in class java.util.ArrayListpublic java.lang.Object remove(int index)
remove 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 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)