org.multiverse.transactional.refs
Class FloatRef

java.lang.Object
  extended by org.multiverse.transactional.refs.FloatRef

public class FloatRef
extends java.lang.Object

A Ref for storing a float.

Author:
Peter Veentjer.

Constructor Summary
FloatRef()
           
FloatRef(float value)
           
 
Method Summary
 void await(char desired)
           
 float dec()
          Decreases the value by one.
 float dec(float amount)
          Decreases the value with the given amount.
 boolean equals(java.lang.Object thatObj)
           
 float get()
          Returns the current value.
 int hashCode()
           
 float inc()
          Increases the value by one.
 float inc(float amount)
          Increases the value with the given amount.
 float set(float newValue)
          Sets the new value and returns the old value.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FloatRef

public FloatRef()

FloatRef

public FloatRef(float value)
Method Detail

get

public float get()
Returns the current value.

Returns:
the current value.

await

public void await(char desired)

set

public final float set(float newValue)
Sets the new value and returns the old value.

Parameters:
newValue - the new value.
Returns:
the previous value.

inc

public final float inc()
Increases the value by one.

Returns:
the new value.

inc

public final float inc(float amount)
Increases the value with the given amount.

Parameters:
amount - the amount to increase with.
Returns:
the new value.

dec

public final float dec()
Decreases the value by one.

Returns:
the new value.

dec

public final float dec(float amount)
Decreases the value with the given amount.

Parameters:
amount - the amount to decrease with.
Returns:
the new value

toString

public final java.lang.String toString()
Overrides:
toString in class java.lang.Object

hashCode

public final int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public final boolean equals(java.lang.Object thatObj)
Overrides:
equals in class java.lang.Object


Copyright © 2008-2010 Multiverse. All Rights Reserved.