org.graffiti.plugins.scripting.delegates
Class CollectionDelegate

java.lang.Object
  extended by org.graffiti.plugins.scripting.delegate.ScriptingDelegate
      extended by org.graffiti.plugins.scripting.delegate.ReflectiveDelegate
          extended by org.graffiti.plugins.scripting.delegate.ObjectDelegate
              extended by org.graffiti.plugins.scripting.delegates.CollectionDelegate
Direct Known Subclasses:
BufferedCollectionDelegate, GraphDelegate, SelectionDelegate

public abstract class CollectionDelegate
extends org.graffiti.plugins.scripting.delegate.ObjectDelegate

Abstract delegate representing a collection of graph elements.

Author:
Andreas Gleißner

Field Summary
 
Fields inherited from class org.graffiti.plugins.scripting.delegate.ScriptingDelegate
UNDEFINED
 
Method Summary
 void add(CollectionDelegate collection)
          Adds all GraphElementDelegates of the specified collection.
 void add(GraphElementDelegate... elements)
          Adds the specified GraphElementDelegates.
abstract  void clear()
          Clears this collection.
 CollectionDelegate clone()
          Clones this collection delegate.
 boolean contains(CollectionDelegate collection)
          Returns if all GraphElementDelegates of the specified collection are contained in this collection delegate.
 boolean contains(GraphElementDelegate... elements)
          Returns if all of the specified GraphElementDelegates are contained in this collection delegate.
 int count()
          Returns the number of elements in this collection.
 Object get(int index)
          
 CollectionDelegate getEdges()
          Returns a BufferedCollectionDelegate containing the EdgeDelegates of this collection delegate.
 Set<Integer> getIndices()
          
 CollectionDelegate getNodes()
          Returns a BufferedCollectionDelegate containing the NodeDelegates of this collection delegate.
 boolean has(int index)
          
abstract  boolean isEmpty()
          Returns if this collection delegate contains no GraphElementDelegates.
 IteratorDelegate iterator()
           
 void remove(CollectionDelegate collection)
           
 void remove(GraphElementDelegate... elements)
           
 void set(CollectionDelegate collection)
           
 void set(GraphElementDelegate... elements)
           
abstract  int size()
           
 String toString()
           
 
Methods inherited from class org.graffiti.plugins.scripting.delegate.ObjectDelegate
createConstructor, createWrapper, get, getMemberInfo, getScope, has, put
 
Methods inherited from class org.graffiti.plugins.scripting.delegate.ReflectiveDelegate
addDynamicMemberInfo, delete, delete, getClassName, help, put
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

add

public final void add(GraphElementDelegate... elements)
Adds the specified GraphElementDelegates.

Parameters:
elements - the elements to add.

add

public final void add(CollectionDelegate collection)
Adds all GraphElementDelegates of the specified collection.

Parameters:
collection - the collection whose elements are added.

clear

public abstract void clear()
Clears this collection.


clone

public final CollectionDelegate clone()
Clones this collection delegate.

Overrides:
clone in class Object
Returns:
a clone of this collection delegate.

contains

public final boolean contains(GraphElementDelegate... elements)
Returns if all of the specified GraphElementDelegates are contained in this collection delegate.

Parameters:
elements - the elements tested if all of them are contained in this collection.
Returns:
true if all of the specified GraphElementDelegate s are contained in this collection delegate.

contains

public final boolean contains(CollectionDelegate collection)
Returns if all GraphElementDelegates of the specified collection are contained in this collection delegate.

Parameters:
collection - the collection whose elements are tested wether they are contained in this collection delegate.
Returns:
true, if all GraphElementDelegates of the specified collection are contained in this collection delegate.

count

public final int count()
Returns the number of elements in this collection.

Returns:
the number of elements in this collection.

get

public final Object get(int index)

Overrides:
get in class org.graffiti.plugins.scripting.delegate.ReflectiveDelegate

getNodes

public final CollectionDelegate getNodes()
Returns a BufferedCollectionDelegate containing the NodeDelegates of this collection delegate.

Returns:
a BufferedCollectionDelegate containing the NodeDelegates of this collection delegate.

getEdges

public final CollectionDelegate getEdges()
Returns a BufferedCollectionDelegate containing the EdgeDelegates of this collection delegate.

Returns:
a BufferedCollectionDelegate containing the EdgeDelegates of this collection delegate.

getIndices

public final Set<Integer> getIndices()

Overrides:
getIndices in class org.graffiti.plugins.scripting.delegate.ReflectiveDelegate

has

public final boolean has(int index)

Overrides:
has in class org.graffiti.plugins.scripting.delegate.ReflectiveDelegate

isEmpty

public abstract boolean isEmpty()
Returns if this collection delegate contains no GraphElementDelegates.

Returns:
true if this collection delegate contains no GraphElementDelegates.

iterator

public final IteratorDelegate iterator()

remove

public final void remove(GraphElementDelegate... elements)

remove

public final void remove(CollectionDelegate collection)

set

public final void set(GraphElementDelegate... elements)

set

public final void set(CollectionDelegate collection)

size

public abstract int size()

toString

public String toString()
Overrides:
toString in class Object


Generated at 2012-05-30 11:01:25 PM CEST