de.cesr.lara.components.environment.impl
Class LEnvironmentalIntProperty

java.lang.Object
  extended by de.cesr.lara.components.LaraProperty<LAbstractEnvironmentalProperty<V>,V>
      extended by de.cesr.lara.components.environment.impl.LAbstractEnvironmentalProperty<Integer>
          extended by de.cesr.lara.components.environment.impl.LEnvironmentalIntProperty

public class LEnvironmentalIntProperty
extends LAbstractEnvironmentalProperty<Integer>


Field Summary
protected  int intValue
          value
 
Fields inherited from class de.cesr.lara.components.environment.impl.LAbstractEnvironmentalProperty
environment
 
Constructor Summary
LEnvironmentalIntProperty(String key, int value, LaraEnvironment env)
           
 
Method Summary
 boolean equals(Object o)
          Two int properties are equal if their names and int values are equal.
 int getIntValue()
           
 LEnvironmentalIntProperty getModifiedProperty(Integer value)
           
 Integer getValue()
          NOTE: Since LaraPropertys are meant to be immutable we avoid a member in this class which is not private (members other than private allow implementing a subclass that hurts the immutability).
 
Methods inherited from class de.cesr.lara.components.environment.impl.LAbstractEnvironmentalProperty
getEnvironment
 
Methods inherited from class de.cesr.lara.components.LaraProperty
getKey, getRefreshedProperty, getTimestamp, hashCode, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

intValue

protected int intValue
value

Constructor Detail

LEnvironmentalIntProperty

public LEnvironmentalIntProperty(String key,
                                 int value,
                                 LaraEnvironment env)
Parameters:
key -
value -
env -
Method Detail

equals

public boolean equals(Object o)
Two int properties are equal if their names and int values are equal.

Overrides:
equals in class LaraProperty<LAbstractEnvironmentalProperty<Integer>,Integer>
See Also:
Object.equals(java.lang.Object)

getIntValue

public int getIntValue()
Returns:
the integer value as primitive

getModifiedProperty

public LEnvironmentalIntProperty getModifiedProperty(Integer value)
Specified by:
getModifiedProperty in class LaraProperty<LAbstractEnvironmentalProperty<Integer>,Integer>
Returns:
a new property with new value and key and current time stamp

getValue

public Integer getValue()
Description copied from class: LaraProperty
NOTE: Since LaraPropertys are meant to be immutable we avoid a member in this class which is not private (members other than private allow implementing a subclass that hurts the immutability). However, implementing the getValue() method requires a non-private member because subclasses need the ability to override getValues() and access value in case they need to return and create a deep copy of value in order to prevent external changes in the value (which is true for most non-primitive data types).

Specified by:
getValue in class LaraProperty<LAbstractEnvironmentalProperty<Integer>,Integer>
Returns:
the value