bb.util
Class Check.State

java.lang.Object
  extended by bb.util.Check
      extended by bb.util.Check.CheckAdaptor
          extended by bb.util.Check.State
Enclosing class:
Check

public static class Check.State
extends Check.CheckAdaptor

Concrete subclass of Check which is meant for checking arbitrary state. Hence, it merely implements onFailure (which here always throws an IllegalStateException) and overrides no other methods.

This class is multithread safe: it adds no state to its multithread safe superclass.


Nested Class Summary
 
Nested classes/interfaces inherited from class bb.util.Check
Check.Arg, Check.Assert, Check.CheckAdaptor, Check.State, Check.UnitTest
 
Constructor Summary
Check.State()
           
 
Method Summary
 void onFailure(String errMsg, Throwable throwable)
          Called whenever a check fails and the code has both errMsg and throwable to report.
 
Methods inherited from class bb.util.Check.CheckAdaptor
onFailure
 
Methods inherited from class bb.util.Check
arg, azzert, edt, empty, equals, equals, equals, equals, equals, equals, equals, equals, equals, hasSize, hasSize, hasSize, hasSize, hasSize, hasSize, hasSize, hasSize, hasSize, hasSize, hasSize, infinite, infinite, isFalse, isNull, isTrue, naN, naN, negative, negative, negative, negative, negative, negative, normal, normal, normalNegative, normalNegative, normalNotNegative, normalNotNegative, normalNotPositive, normalNotPositive, normalPositive, normalPositive, notBlank, notEmpty, notEmpty, notEmpty, notEmpty, notEmpty, notEmpty, notEmpty, notEmpty, notEmpty, notEmpty, notEmpty, notInfinite, notInfinite, notNaN, notNaN, notNegative, notNegative, notNegative, notNegative, notNegative, notNegative, notNull, notPositive, notPositive, notPositive, notPositive, notPositive, notPositive, notZero, notZero, notZero, notZero, notZero, notZero, positive, positive, positive, positive, positive, positive, state, unmodifiable, unmodifiable, validDirectory, validFile, validIndex, validIndex, validIndex, validIndex, validIndex, validIndex, validIndex, validIndex, validIndex, validIndex, validOffsetLength, validPort, validProbability, zero, zero, zero, zero, zero, zero
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Check.State

public Check.State()
Method Detail

onFailure

public void onFailure(String errMsg,
                      Throwable throwable)
               throws IllegalStateException
Called whenever a check fails and the code has both errMsg and throwable to report.

Specified by:
onFailure in class Check
Throws:
IllegalStateException - with errMsg as its message