de.cau.cs.kieler.klodd.hierarchical.structures.slimgraph
Class KSlimGraphElement

java.lang.Object
  extended by de.cau.cs.kieler.klodd.hierarchical.structures.slimgraph.KSlimGraphElement
All Implemented Interfaces:
Comparable<KSlimGraphElement>
Direct Known Subclasses:
KSlimEdge, KSlimFace, KSlimNode

public abstract class KSlimGraphElement
extends Object
implements Comparable<KSlimGraphElement>

An element of a slim graph, which can be a node, an edge or a face.

Rating proposed yellow
(2009-12-11) msp

Constructor Summary
KSlimGraphElement()
           
 
Method Summary
 int compareTo(KSlimGraphElement other)
          Compares this with another Object.
 boolean equals(Object other)
          
 int getId()
          Returns the id.
 Object getObject()
          Returns the object.
 int getRank()
          Returns the rank.
 int hashCode()
          
protected  void setId(int theid)
          Sets the id.
protected  void setObject(Object theobject)
          Sets the object.
 void setRank(int therank)
          Sets the rank.
 String toString()
          
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

KSlimGraphElement

public KSlimGraphElement()
Method Detail

compareTo

public int compareTo(KSlimGraphElement other)
Compares this with another Object. Returns -1 if this object is smaller, 0 if both objects are equal and 1 if this object is bigger.

Specified by:
compareTo in interface Comparable<KSlimGraphElement>
Parameters:
other - the object to compare with
Returns:
one of the values -1, 0, 1

equals

public boolean equals(Object other)

Overrides:
equals in class Object

hashCode

public int hashCode()

Overrides:
hashCode in class Object

toString

public String toString()

Overrides:
toString in class Object

setId

protected void setId(int theid)
Sets the id.

Parameters:
theid - the id to set

getId

public int getId()
Returns the id.

Returns:
the id

setRank

public void setRank(int therank)
Sets the rank.

Parameters:
therank - the rank to set

getRank

public int getRank()
Returns the rank.

Returns:
the rank

setObject

protected void setObject(Object theobject)
Sets the object.

Parameters:
theobject - the object to set

getObject

public Object getObject()
Returns the object.

Returns:
the object