org.multiverse.transactional.refs
Class ByteRef

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

public class ByteRef
extends Object

A Ref for storing a byte.

Author:
Peter Veentjer

Constructor Summary
ByteRef()
           
ByteRef(byte value)
           
 
Method Summary
 void await(byte desired)
           
 byte awaitLargerOrEqualThan(byte than)
           
 byte awaitLargerThan(byte than)
           
 byte awaitNotEqualTo(byte than)
           
 byte awaitSmallerOrEqualThan(byte than)
           
 byte awaitSmallerThan(byte than)
           
 byte dec()
          Decreases the value by one.
 byte dec(byte amount)
          Decreases the value with the given amount.
 boolean equals(Object thatObj)
           
 byte get()
           
 int hashCode()
           
 byte inc()
          Increases the value by one.
 byte inc(byte amount)
          Increases the value with the given amount.
 byte set(byte newValue)
          Sets the new value and returns the old value.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ByteRef

public ByteRef()

ByteRef

public ByteRef(byte value)
Method Detail

get

public final byte get()

await

public final void await(byte desired)

awaitLargerThan

public final byte awaitLargerThan(byte than)

awaitLargerOrEqualThan

public final byte awaitLargerOrEqualThan(byte than)

awaitSmallerThan

public final byte awaitSmallerThan(byte than)

awaitSmallerOrEqualThan

public final byte awaitSmallerOrEqualThan(byte than)

awaitNotEqualTo

public final byte awaitNotEqualTo(byte than)

set

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

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

inc

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

Returns:
the new value

inc

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

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

dec

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

Returns:
the new value.

dec

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

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

toString

public final String toString()
Overrides:
toString in class Object

hashCode

public final int hashCode()
Overrides:
hashCode in class Object

equals

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


Copyright © 2008-2010 Multiverse. All Rights Reserved.