de.ipk_gatersleben.ag_nw.centilib.plugin
Class DefaultEdgeAttribute

java.lang.Object
  extended by de.ipk_gatersleben.ag_nw.centilib.plugin.DefaultEdgeAttribute
All Implemented Interfaces:
DoubleAttribute<Object>

public class DefaultEdgeAttribute
extends Object
implements DoubleAttribute<Object>


Constructor Summary
DefaultEdgeAttribute()
          The method getValue() always returns 1.0
 
Method Summary
 String getName()
          The name of the attribute.
 Double getValue(Object edge)
          Returns the attribute value for element if it exists, null or Double.NaN otherwise.
 String toString()
          The method toString() should be overwritten to return the name of the attribute.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DefaultEdgeAttribute

public DefaultEdgeAttribute()
The method getValue() always returns 1.0

Method Detail

toString

public String toString()
Description copied from interface: DoubleAttribute
The method toString() should be overwritten to return the name of the attribute. For example, toString is used by the drop-down list, if the user wants to select an edge attribute as edge weights in the Graph Statistics panel.

Specified by:
toString in interface DoubleAttribute<Object>
Overrides:
toString in class Object
Returns:
the name of the attribute

getName

public String getName()
Description copied from interface: DoubleAttribute
The name of the attribute.

Specified by:
getName in interface DoubleAttribute<Object>
Returns:
the name of the attribute

getValue

public Double getValue(Object edge)
Description copied from interface: DoubleAttribute
Returns the attribute value for element if it exists, null or Double.NaN otherwise.

Specified by:
getValue in interface DoubleAttribute<Object>
Parameters:
edge - the object to get the attribute value for
Returns:
the attribute value for the given element