cascading.operation.assertion
Class BaseAssertion<C>

java.lang.Object
  extended by cascading.operation.BaseOperation<C>
      extended by cascading.operation.assertion.BaseAssertion<C>
All Implemented Interfaces:
Operation<C>, Serializable
Direct Known Subclasses:
AssertEquals, AssertEqualsAll, AssertGroupBase, AssertNotNull, AssertNull, AssertSizeEquals, AssertSizeLessThan, AssertSizeMoreThan

public abstract class BaseAssertion<C>
extends BaseOperation<C>

Class BaseAssertion is a convenience class for Assertion implementations. Subclassing this class is not required, but does provide some conveneince functions for signaling assertion failures.

See Also:
Assertion, GroupAssertion, ValueAssertion, Serialized Form

Field Summary
 
Fields inherited from class cascading.operation.BaseOperation
fieldDeclaration, numArgs, trace
 
Fields inherited from interface cascading.operation.Operation
ANY
 
Constructor Summary
protected BaseAssertion()
           
protected BaseAssertion(int numArgs)
           
protected BaseAssertion(int numArgs, String message)
           
protected BaseAssertion(String message)
           
 
Method Summary
protected  void fail()
           
protected  void fail(Object... args)
           
 String getMessage()
           
static void throwFail(String message)
          Static method throwFail shoudl be used to throw an AssertionException.
static void throwFail(String message, Object... args)
          Static method throwFail shoudl be used to throw an AssertionException.
 
Methods inherited from class cascading.operation.BaseOperation
cleanup, getFieldDeclaration, getNumArgs, getTrace, prepare, printOperationInternal, toString, toStringInternal
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BaseAssertion

protected BaseAssertion()

BaseAssertion

protected BaseAssertion(String message)

BaseAssertion

protected BaseAssertion(int numArgs)

BaseAssertion

protected BaseAssertion(int numArgs,
                        String message)
Method Detail

getMessage

public String getMessage()

fail

protected void fail()

fail

protected void fail(Object... args)

throwFail

public static void throwFail(String message)
Static method throwFail shoudl be used to throw an AssertionException.

Parameters:
message - of type String, the message to be thrown

throwFail

public static void throwFail(String message,
                             Object... args)
Static method throwFail shoudl be used to throw an AssertionException.

Parameters:
message - of type String, the message to be thrown as a format string
args - of type Object[], the values to be passed into the message format string


Copyright © 2007-2008 Concurrent, Inc. All Rights Reserved.