Home » concurrent-sources » EDU.oswego.cs.dl.util.concurrent » [javadoc | source]
public class: SynchronizedByte [javadoc | source]

All Implemented Interfaces:
    Cloneable, Comparable, Executor

Direct Known Subclasses:

A class useful for offloading synch for byte instance variables.

[ Introduction to this package. ]
Field Summary
protected  byte value_     
Fields inherited from EDU.oswego.cs.dl.util.concurrent.SynchronizedVariable:
 public SynchronizedByte(byte initialValue) 
 public SynchronizedByte(byte initialValue,
    Object lock) 
    Make a new SynchronizedByte with the given initial value, and using the supplied lock. *
Method from EDU.oswego.cs.dl.util.concurrent.SynchronizedByte Summary:
add,   and,   commit,   compareTo,   compareTo,   compareTo,   complement,   decrement,   divide,   equals,   get,   hashCode,   increment,   multiply,   negate,   or,   set,   subtract,   swap,   toString,   xor
Methods from EDU.oswego.cs.dl.util.concurrent.SynchronizedVariable:
execute,   getLock
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from EDU.oswego.cs.dl.util.concurrent.SynchronizedByte Detail:
 public byte add(byte amount) 
    Add amount to value (i.e., set value += amount)
 public byte and(byte b) 
    Set value to value & b.
 public boolean commit(byte assumedValue,
    byte newValue) 
    Set value to newValue only if it is currently assumedValue.
 public int compareTo(byte other) 
 public int compareTo(SynchronizedByte other) 
 public int compareTo(Object other) 
 public byte complement() 
    Set the value to its complement
 public byte decrement() 
    Decrement the value.
 public byte divide(byte factor) 
    Divide value by factor (i.e., set value /= factor)
 public boolean equals(Object other) 
 public final byte get() 
    Return the current value
 public int hashCode() 
 public byte increment() 
    Increment the value.
 public byte multiply(byte factor) 
    Multiply value by factor (i.e., set value *= factor)
 public byte negate() 
    Set the value to the negative of its old value
 public byte or(byte b) 
    Set value to value | b.
 public byte set(byte newValue) 
    Set to newValue.
 public byte subtract(byte amount) 
    Subtract amount from value (i.e., set value -= amount)
 public byte swap(SynchronizedByte other) 
    Atomically swap values with another SynchronizedByte. Uses identityHashCode to avoid deadlock when two SynchronizedBytes attempt to simultaneously swap with each other. (Note: Ordering via identyHashCode is not strictly guaranteed by the language specification to return unique, orderable values, but in practice JVMs rely on them being unique.)
 public String toString() 
 public byte xor(byte b) 
    Set value to value ^ b.