urv.util.graph
Class Weight

java.lang.Object
  extended by urv.util.graph.Weight
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable

public class Weight
extends java.lang.Object
implements java.lang.Comparable, java.io.Serializable

Class that represents weight in net files containing latency model information

Author:
Marcel Arrufat
See Also:
Serialized Form

Constructor Summary
Weight()
           
 
Method Summary
static Weight add(Weight w1, Weight w2)
           
 int compareTo(java.lang.Object arg0)
          Compares weight values
static Weight getNegativeInfinityWeight()
          Returns a unique negative infinity Weight object, necessary for Dijkstra comparisons
 java.lang.Float getValue()
           
 boolean isSet()
           
 Weight setMaxValue()
          Sets Weight to its maximum value.
 Weight setNegativeInfinityValue()
           
 Weight setValue(java.lang.Object o)
           
 Weight setZeroValue()
           
 java.lang.String toString()
          String containing weight
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Weight

public Weight()
Method Detail

add

public static Weight add(Weight w1,
                         Weight w2)

getNegativeInfinityWeight

public static Weight getNegativeInfinityWeight()
Returns a unique negative infinity Weight object, necessary for Dijkstra comparisons

Returns:

compareTo

public int compareTo(java.lang.Object arg0)
Compares weight values

Specified by:
compareTo in interface java.lang.Comparable

getValue

public java.lang.Float getValue()

isSet

public boolean isSet()

setMaxValue

public Weight setMaxValue()
Sets Weight to its maximum value. Needed for Dijkstra's Algorithm

Returns:

setNegativeInfinityValue

public Weight setNegativeInfinityValue()

setValue

public Weight setValue(java.lang.Object o)

setZeroValue

public Weight setZeroValue()

toString

public java.lang.String toString()
String containing weight

Overrides:
toString in class java.lang.Object