helix.graph.model.impl
Class RVertexArray

java.lang.Object
  extended by helix.graph.model.impl.RVertexArray
All Implemented Interfaces:
RegistryValue

public class RVertexArray
extends Object
implements RegistryValue

a memory implementation of RegistryValue for arrays (fixed size tuples) of Vertices

Author:
viari

Constructor Summary
RVertexArray(int size)
           
 
Method Summary
 boolean equals(Object o)
           
 Vertex getVertex(int index)
           
 int hashCode()
           
 RegistryValue klone()
          Potentially clone this instance.
 String serialize()
          get a String representation of this instance.
 Vertex setVertex(int index, Vertex v)
           
 int size()
           
 boolean toBoolean()
           
 float toFloat()
           
 int toInt()
           
 String toString()
          a human readable version of toString()
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RVertexArray

public RVertexArray(int size)
Method Detail

klone

public RegistryValue klone()
Description copied from interface: RegistryValue
Potentially clone this instance.

Specified by:
klone in interface RegistryValue
Returns:
a clone (deep copy) of this instance. Note that it may be the instance itself (for immutable objects).

serialize

public String serialize()
Description copied from interface: RegistryValue
get a String representation of this instance. this representation can further be used as a constructor argument to reconstruct this instance.

Specified by:
serialize in interface RegistryValue
Returns:
string representation of this instance

toBoolean

public boolean toBoolean()
                  throws IllegalValueException
Specified by:
toBoolean in interface RegistryValue
Returns:
boolean representation of this instance value
Throws:
IllegalValueException

toFloat

public float toFloat()
              throws IllegalValueException
Specified by:
toFloat in interface RegistryValue
Returns:
float representation of this instance value
Throws:
IllegalValueException

toInt

public int toInt()
          throws IllegalValueException
Specified by:
toInt in interface RegistryValue
Returns:
int representation of this instance value
Throws:
IllegalValueException

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

getVertex

public Vertex getVertex(int index)
                 throws IndexOutOfBoundsException
Throws:
IndexOutOfBoundsException

setVertex

public Vertex setVertex(int index,
                        Vertex v)
                 throws IndexOutOfBoundsException
Throws:
IndexOutOfBoundsException

size

public int size()

toString

public String toString()
a human readable version of toString()

Specified by:
toString in interface RegistryValue
Overrides:
toString in class Object
Returns:
String representation of this instance value