ix.util.context
Class ContextInt

java.lang.Object
  extended by ix.util.context.ContextValue<java.lang.Integer>
      extended by ix.util.context.ContextInt

public class ContextInt
extends ContextValue<java.lang.Integer>

An object that contains a single context-dependent int value.


Field Summary
 
Fields inherited from class ix.util.context.ContextValue
holder, link
 
Constructor Summary
ContextInt(ContextHolder holder, int rootValue)
           
ContextInt(int rootValue)
           
 
Method Summary
 int add(int incr)
          Increment by the indicated amount, then return the new value.
 int incrAfter()
          Increment then return the old value.
 int incrBefore()
          Increment then return the new value.
 
Methods inherited from class ix.util.context.ContextValue
get, set
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ContextInt

public ContextInt(int rootValue)

ContextInt

public ContextInt(ContextHolder holder,
                  int rootValue)
Method Detail

add

public int add(int incr)
Increment by the indicated amount, then return the new value.


incrBefore

public int incrBefore()
Increment then return the new value. Like ++i.


incrAfter

public int incrAfter()
Increment then return the old value. Like i++.