nenok.constr.vvll
Class VariableContainerHeap

java.lang.Object
  extended by nenok.constr.vvll.VariableContainer
      extended by nenok.constr.vvll.VariableContainerHeap
All Implemented Interfaces:
Comparable

public class VariableContainerHeap
extends VariableContainer
implements Comparable

Objects of this extension of the VariableContainer class will be stored within a heap. Therefore, the Comparable interface is implemented additionally. The compareTo(Object o) is based on a cost value representing the costs to eliminate the variable of this container.

Version:
$LastChangedRevision: 554 $
$LastChangedDate: 2008-03-26 14:19:57 +0100 (Mi, 26 Mrz 2008) $
Author:
Marc Pouly

Constructor Summary
VariableContainerHeap(Variable var)
          Constructor: Calls super constructor and initializes costs to 0.
 
Method Summary
 int compareTo(Object o)
           
 void setCost(int value)
          Sets the variable containers's cost value.
 
Methods inherited from class nenok.constr.vvll.VariableContainer
addValuationContainer, equals, getValuationContainerRefs, getVariable, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

VariableContainerHeap

public VariableContainerHeap(Variable var)
Constructor: Calls super constructor and initializes costs to 0.

Parameters:
var - The variable of this container.
Method Detail

setCost

public void setCost(int value)
Sets the variable containers's cost value.

Parameters:
value - The new cost of the variable.

compareTo

public int compareTo(Object o)
Specified by:
compareTo in interface Comparable
See Also:
Comparable.compareTo(java.lang.Object)