nz.ac.waikato.jdsl.graph.api
Class Vertex.NONEVertex

java.lang.Object
  extended by nz.ac.waikato.jdsl.graph.api.Vertex.NONEVertex
All Implemented Interfaces:
Accessor, Decorable, Position, Vertex
Enclosing interface:
Vertex

public static final class Vertex.NONEVertex
extends java.lang.Object
implements Vertex

A dummy class, used to implement the constant Vertex.NONE
. Not intended for reuse in any way.


Nested Class Summary
 
Nested classes/interfaces inherited from interface nz.ac.waikato.jdsl.graph.api.Vertex
Vertex.NONEVertex
 
Field Summary
 
Fields inherited from interface nz.ac.waikato.jdsl.graph.api.Vertex
NONE
 
Method Summary
 ObjectIterator attributes()
          Returns an iterator over all the attributes attached to this decorable.
 java.lang.Object destroy(java.lang.Object key)
          Removes the (attribute, value) entry associated with a certain attribute, attr, from the decorable object.
 java.lang.Object element()
          Gets the element currently associated with this accessor.
 java.lang.Object get(java.lang.Object key)
          Returns the value in the (attribute, value) entry associated with a certain attribute, attr, in this decorable object.
 boolean has(java.lang.Object key)
          Tests whether there is an (attribute, value) entry associated with a certain attribute in this decorable object.
 void set(java.lang.Object key, java.lang.Object value)
          Sets the value in the (attribute, value) entry associated with a certain attribute in this decorable object.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

element

public java.lang.Object element()
                         throws InvalidAccessorException
Description copied from interface: Accessor
Gets the element currently associated with this accessor.

Specified by:
element in interface Accessor
Returns:
the element currently stored at this accessor
Throws:
InvalidAccessorException

set

public void set(java.lang.Object key,
                java.lang.Object value)
         throws InvalidAccessorException
Description copied from interface: Decorable
Sets the value in the (attribute, value) entry associated with a certain attribute in this decorable object. Creates the attribute if it does not already exist in this decorable object.

Specified by:
set in interface Decorable
Parameters:
key - The attribute to set (and create if necessary)
value - the new value of the attribute in the decorable object
Throws:
InvalidAccessorException

get

public java.lang.Object get(java.lang.Object key)
                     throws InvalidAccessorException
Description copied from interface: Decorable
Returns the value in the (attribute, value) entry associated with a certain attribute, attr, in this decorable object.

Specified by:
get in interface Decorable
Parameters:
key - The attribute of which to attempt to get the value
Returns:
The value associated with attribute
Throws:
InvalidAccessorException

destroy

public java.lang.Object destroy(java.lang.Object key)
                         throws InvalidAccessorException
Description copied from interface: Decorable
Removes the (attribute, value) entry associated with a certain attribute, attr, from the decorable object.

Specified by:
destroy in interface Decorable
Parameters:
key - The attribute to destroy (eliminate)
Returns:
the value associated with destroyed attribute
Throws:
InvalidAccessorException

has

public boolean has(java.lang.Object key)
            throws InvalidAccessorException
Description copied from interface: Decorable
Tests whether there is an (attribute, value) entry associated with a certain attribute in this decorable object.

Specified by:
has in interface Decorable
Parameters:
key - The attribute for which to check this decorable object
Throws:
InvalidAccessorException

attributes

public ObjectIterator attributes()
                          throws InvalidAccessorException
Description copied from interface: Decorable
Returns an iterator over all the attributes attached to this decorable.

Specified by:
attributes in interface Decorable
Returns:
an ObjectIterator over all the attributes attached to this decorable
Throws:
InvalidAccessorException


Copyright © 2009 ModelJUnit Project. All Rights Reserved.