jcommon.graph
Class ObjectVertex<TValue>

java.lang.Object
  extended by jcommon.graph.ObjectVertex<TValue>
Type Parameters:
TValue - The type of object this class will hold.
All Implemented Interfaces:
IVertex<TValue>

public class ObjectVertex<TValue>
extends Object
implements IVertex<TValue>

A representation of an IVertex instance using Objects.

See Also:
IVertex

Constructor Summary
ObjectVertex(TValue value)
          Instantiates a new instance of ObjectVertex.
 
Method Summary
 boolean equals(Object o)
           
static
<TValue> IVertex<TValue>
from(TValue value)
          Convenience method for instantiating a new ObjectVertex.
 TValue get()
          Retrieves the value that this ObjectVertex represents.
 TValue getValue()
          Retrieves the value that this ObjectVertex represents.
 int hashCode()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ObjectVertex

public ObjectVertex(TValue value)
Instantiates a new instance of ObjectVertex.

Parameters:
value - The value which this ObjectVertex will represent.
Method Detail

get

public TValue get()
Retrieves the value that this ObjectVertex represents.

Specified by:
get in interface IVertex<TValue>
Returns:
An instance of a Object that this ObjectVertex represents.

getValue

public TValue getValue()
Retrieves the value that this ObjectVertex represents.

Specified by:
getValue in interface IVertex<TValue>
Returns:
An instance of a Object that this ObjectVertex represents.

equals

public boolean equals(Object o)
Overrides:
equals in class Object
See Also:
Object.equals(Object)

toString

public String toString()
Overrides:
toString in class Object
See Also:
Object.toString()

hashCode

public int hashCode()
Overrides:
hashCode in class Object
See Also:
Object.hashCode()

from

public static <TValue> IVertex<TValue> from(TValue value)
Convenience method for instantiating a new ObjectVertex.

Parameters:
value - The value which this ObjectVertex will represent.
Returns:
A new instance of ObjectVertex.


Copyright © 2012-2013. All Rights Reserved.