public static LongCounter makeDirectional ( final LongCounter counter , final boolean increasing ) { LongCounter temp ; if ( increasing ) { temp = new Wrapper ( counter ) { /** The serialVersionUID */ private static final long serialVersionUID = - 8902748795144754375L ; public long decrement ( ) { throw new UnsupportedOperationException ( ) ; } public void reset ( ) { throw new UnsupportedOperationException ( ) ; } } ; } else { temp = new Wrapper ( counter ) { /** The serialVersionUID */ private static final long serialVersionUID = 2584758778978644599L ; public long increment ( ) { throw new UnsupportedOperationException ( ) ; } } ; } return temp ; }
Returns a directional counter .