org.jboss.shotoku.cache
Class ValueChange<T>

java.lang.Object
  extended by org.jboss.shotoku.cache.ValueChange<T>

public class ValueChange<T>
extends java.lang.Object

A class which represents either a change of value, and holds the new value, or no value change. Instances can be obtained using the noChange() and changeTo(Object) methods.

Author:
Adam Warski

Method Summary
static
<T> ValueChange<T>
changeTo(T newValue)
           
 T getValue()
           
 boolean hasValue()
           
static
<T> ValueChange<T>
noChange()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

noChange

public static <T> ValueChange<T> noChange()

changeTo

public static <T> ValueChange<T> changeTo(T newValue)

getValue

public T getValue()

hasValue

public boolean hasValue()