gov.sandia.cognition.util
Class AbstractWeighted

java.lang.Object
  extended by gov.sandia.cognition.util.AbstractCloneableSerializable
      extended by gov.sandia.cognition.util.AbstractWeighted
All Implemented Interfaces:
CloneableSerializable, Weighted, Serializable, Cloneable
Direct Known Subclasses:
DefaultWeightedValue

@CodeReview(reviewer="Kevin R. Dixon",
            date="2008-10-02",
            changesNeeded=false,
            comments="Looks fine.")
public class AbstractWeighted
extends AbstractCloneableSerializable
implements Weighted

Container class for a Weighted object

Since:
2.0
Author:
Kevin R. Dixon
See Also:
Serialized Form

Field Summary
static double DEFAULT_WEIGHT
          Default weight, 1.0
protected  double weight
          The weight
 
Constructor Summary
AbstractWeighted()
          Creates a new instance of AbstractWeighted
AbstractWeighted(double weight)
          Creates a new instance of AbstractWeighted
 
Method Summary
 double getWeight()
          Gets the weight of the object.
 void setWeight(double weight)
          Setter for weight
 
Methods inherited from class gov.sandia.cognition.util.AbstractCloneableSerializable
clone
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_WEIGHT

public static final double DEFAULT_WEIGHT
Default weight, 1.0

See Also:
Constant Field Values

weight

protected double weight
The weight

Constructor Detail

AbstractWeighted

public AbstractWeighted()
Creates a new instance of AbstractWeighted


AbstractWeighted

public AbstractWeighted(double weight)
Creates a new instance of AbstractWeighted

Parameters:
weight - The weight
Method Detail

getWeight

public double getWeight()
Description copied from interface: Weighted
Gets the weight of the object.

Specified by:
getWeight in interface Weighted
Returns:
The weight.

setWeight

public void setWeight(double weight)
Setter for weight

Parameters:
weight - The weight