org.dbe.eve.simulator
Class DemandedAttribute

java.lang.Object
  extended by org.dbe.eve.simulator.Attribute
      extended by org.dbe.eve.simulator.DemandedAttribute
All Implemented Interfaces:
java.lang.Cloneable, java.lang.Comparable

public class DemandedAttribute
extends Attribute

Represents a demanded attribute with an Attribute and a weight


Field Summary
(package private) static MersenneTwister mt
           
private  double weight
           
 
Fields inherited from class org.dbe.eve.simulator.Attribute
iD, logger, value
 
Constructor Summary
DemandedAttribute(Attribute a)
          Constructs an DemandedAttribute with an Attribute and random weight.
DemandedAttribute(Attribute a, double weight)
          Constructs an DemandedAttribute with an Attribute and a weight.
 
Method Summary
 java.lang.Object clone()
          Returns a clone of this DemandedAttribute.
 double getWeight()
          Returns the weight of this DemandedAttribute.
 void setWeight(double newWeight)
          set an new the weight to this DemandedAttribute.
 
Methods inherited from class org.dbe.eve.simulator.Attribute
compareTo, getID, getValue, increaseValue, isEqual, setValue, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

weight

private double weight

mt

static MersenneTwister mt
Constructor Detail

DemandedAttribute

public DemandedAttribute(Attribute a)
Constructs an DemandedAttribute with an Attribute and random weight.

Parameters:
a - is "basic" attribute for the DemandedAttribute
weight - represents the importance of this DemandedAttribute in contrast to other DemandedAttributes. The weight have to be between 0 and 1 otherwise the weight is set to zero.

DemandedAttribute

public DemandedAttribute(Attribute a,
                         double weight)
Constructs an DemandedAttribute with an Attribute and a weight.

Parameters:
a - is "basic" attribute for the DemandedAttribute
weight - represents the importance of this DemandedAttribute in contrast to other DemandedAttributes. The weight have to be between 0 and 1 otherwise the weight is set to zero.
Method Detail

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Returns a clone of this DemandedAttribute. The copy will not contain any reference to the attribute from which the attribute was cloned.

Overrides:
clone in class Attribute
Returns:
Object a clone of this DemandedAttribute
Throws:
java.lang.CloneNotSupportedException

getWeight

public double getWeight()
Returns the weight of this DemandedAttribute.

Returns:
the weight of this DemandedAttribute

setWeight

public void setWeight(double newWeight)
set an new the weight to this DemandedAttribute.

Parameters:
newWeight - the new weigth value