|
|||||||||
| 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 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)
add in interface Listadd in class ArrayListpublic boolean add(Object element)
add in interface Collectionadd in interface Listadd in class ArrayListpublic boolean addAll(Collection c)
addAll in interface CollectionaddAll in interface ListaddAll in class ArrayList
public boolean addAll(int index,
Collection c)
addAll in interface ListaddAll in class ArrayListpublic void clear()
clear in interface Collectionclear in interface Listclear in class ArrayListpublic Object remove(int index)
remove in interface Listremove in class ArrayList
protected void removeRange(int fromIndex,
int toIndex)
removeRange in class ArrayList
public Object set(int index,
Object element)
set in interface Listset in class ArrayList
public Object invokeMethod(String name,
Object args)
GroovyObject
invokeMethod in interface GroovyObjectname - the name of the method to callargs - the arguments to use for the method call
public Object getProperty(String property)
GroovyObject
getProperty in interface GroovyObjectproperty - the name of the property of interest
public void setProperty(String property,
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(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 | ||||||||