|
|||||||||
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 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(Class type)
|
|
Sequence(Class type,
List content)
|
Method Summary | |
---|---|
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()
|
Methods inherited from class java.util.ArrayList |
---|
clone, contains, ensureCapacity, get, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, removeAll, retainAll, size, subList, toArray, toArray, trimToSize |
Methods inherited from class java.util.AbstractCollection |
---|
containsAll, toString |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.List |
---|
containsAll |
Constructor Detail |
---|
public Sequence()
public Sequence(Class type)
public Sequence(Class type, List content)
Method Detail |
---|
public void set(Collection collection)
public boolean equals(Object that)
equals
in interface Collection
equals
in interface List
equals
in class AbstractList
public boolean equals(Sequence that)
public int hashCode()
hashCode
in interface Collection
hashCode
in interface List
hashCode
in class AbstractList
public int minimumSize()
public Class type()
public void add(int index, Object element)
add
in interface List
add
in class ArrayList
public boolean add(Object element)
add
in interface Collection
add
in interface List
add
in class ArrayList
public boolean addAll(Collection c)
addAll
in interface Collection
addAll
in interface List
addAll
in class ArrayList
public boolean addAll(int index, Collection c)
addAll
in interface List
addAll
in class ArrayList
public void clear()
clear
in interface Collection
clear
in interface List
clear
in class ArrayList
public Object remove(int index)
remove
in interface List
remove
in class ArrayList
protected void removeRange(int fromIndex, int toIndex)
removeRange
in class ArrayList
public Object set(int index, Object element)
set
in interface List
set
in class ArrayList
public Object invokeMethod(String name, Object args)
GroovyObject
invokeMethod
in interface GroovyObject
name
- the name of the method to callargs
- the arguments to use for the method call
public Object getProperty(String property)
GroovyObject
getProperty
in interface GroovyObject
property
- the name of the property of interest
public void setProperty(String property, Object newValue)
GroovyObject
setProperty
in interface GroovyObject
property
- the name of the property of interestnewValue
- the new value for the propertypublic MetaClass getMetaClass()
GroovyObject
getMetaClass
in interface GroovyObject
public void setMetaClass(MetaClass metaClass)
GroovyObject
setMetaClass
in interface GroovyObject
metaClass
- the new metaclassprotected void checkCollectionType(Collection c)
protected void checkType(Object object)
|
Copyright © 2003-2009 The Codehaus. All rights reserved. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |