planet.generic.commonapi.results
Class ResultsEdgeImpl

java.lang.Object
  extended byplanet.generic.commonapi.results.ResultsEdgeImpl
All Implemented Interfaces:
ResultsEdge, java.io.Serializable

public class ResultsEdgeImpl
extends java.lang.Object
implements ResultsEdge

This wrapper class is used to store an edge of a directed or undirected graph based on GML file format.

Author:
Marc Sanchez
See Also:
GML, Serialized Form

Field Summary
protected  java.lang.String fill
           
protected  boolean isDirected
           
protected  Id source
           
protected  Id target
           
 
Constructor Summary
ResultsEdgeImpl()
          Empty constructor.
 
Method Summary
 boolean equals(java.lang.Object o)
          Object.equals(Object o) implementation for EdgeImpl.
 java.lang.String getFill()
           
 Id getSource()
           
 Id getTarget()
           
 int hashCode()
          Object.hashCode(Object o) implementation for EdgeImpl.
 boolean isDirected()
           
 void setDirected(boolean isDirected)
           
 void setFill(java.lang.String fill)
           
 void setSource(Id source)
           
 void setTarget(Id target)
           
 ResultsEdge setValues(Id source, Id target, boolean isDirected, java.lang.String fill)
          Sets the initial values for this edge.
 java.lang.String toString()
          Object.toString() implementation for EdgeImpl.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

source

protected Id source

target

protected Id target

isDirected

protected boolean isDirected

fill

protected java.lang.String fill
Constructor Detail

ResultsEdgeImpl

public ResultsEdgeImpl()
Empty constructor.

Method Detail

getFill

public java.lang.String getFill()
Specified by:
getFill in interface ResultsEdge
Returns:
Returns the fill color of the edge.

setFill

public void setFill(java.lang.String fill)
Specified by:
setFill in interface ResultsEdge
Parameters:
fill - The fill color of the edge to set.

getSource

public Id getSource()
Specified by:
getSource in interface ResultsEdge
Returns:
Returns the source.

setSource

public void setSource(Id source)
Specified by:
setSource in interface ResultsEdge
Parameters:
source - The source to set.

getTarget

public Id getTarget()
Specified by:
getTarget in interface ResultsEdge
Returns:
Returns the target.

setTarget

public void setTarget(Id target)
Specified by:
setTarget in interface ResultsEdge
Parameters:
target - The target to set.

isDirected

public boolean isDirected()
Specified by:
isDirected in interface ResultsEdge
Returns:
Returns the isDirected.

setDirected

public void setDirected(boolean isDirected)
Specified by:
setDirected in interface ResultsEdge
Parameters:
isDirected - The isDirected to set.

equals

public boolean equals(java.lang.Object o)
Object.equals(Object o) implementation for EdgeImpl.


hashCode

public int hashCode()
Object.hashCode(Object o) implementation for EdgeImpl.


toString

public java.lang.String toString()
Object.toString() implementation for EdgeImpl.


setValues

public ResultsEdge setValues(Id source,
                             Id target,
                             boolean isDirected,
                             java.lang.String fill)
Sets the initial values for this edge.

Specified by:
setValues in interface ResultsEdge
Parameters:
source - Source node.
target - Destination node.
isDirected - true when edge is directed.
fill - The color for the edge. May be null when not is used.
Returns:
The same instance after it has been updated.
See Also:
ResultsEdge.setValues(planet.commonapi.Id, planet.commonapi.Id, boolean, java.lang.String)