cascading.operation.assertion

## Class BaseAssertion<C>

- java.lang.Object
- - cascading.operation.BaseOperation<C>
  - - cascading.operation.assertion.BaseAssertion<C>

- All Implemented Interfaces:
    DeclaresResults, Operation<C>, PlannedOperation<C>, Traceable, java.io.Serializable
  Direct Known Subclasses:
    AssertEquals, AssertEqualsAll, AssertGroupBase, AssertNotEquals, AssertNotNull, AssertNull, AssertSizeEquals, AssertSizeLessThan, AssertSizeMoreThan

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

  Class BaseAssertion is a convenience class for `Assertion` implementations. Subclassing this class is not required, but does provide some convenience 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

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `BaseAssertion()`
    `protected` | `BaseAssertion(int numArgs)`
    `protected` | `BaseAssertion(int numArgs, java.lang.String message)`
    `protected` | `BaseAssertion(java.lang.String message)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(java.lang.Object object)`
    `protected void` | `fail()`
    `protected void` | `fail(java.lang.Object... args)`
    `java.lang.String` | `getMessage()`
    `int` | `hashCode()`
    `boolean` | `supportsPlannerLevel(PlannerLevel plannerLevel)`
    `static void` | `throwFail(java.lang.String message)` Static method throwFail should be used to throw an `AssertionException`.
    `static void` | `throwFail(java.lang.String message, java.lang.Object... args)` Static method throwFail should be used to throw an `AssertionException`.

    - ### Methods inherited from class cascading.operation.BaseOperation

      `cleanup, flush, getFieldDeclaration, getNumArgs, getTrace, isSafe, prepare, printOperationInternal, toString, toStringInternal`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface cascading.operation.Operation

      `cleanup, flush, getFieldDeclaration, getNumArgs, isSafe, prepare`

- - ### Constructor Detail

    - #### BaseAssertion

          protected BaseAssertion()

    - #### BaseAssertion

          @ConstructorProperties(value="message")
          protected BaseAssertion(java.lang.String message)

    - #### BaseAssertion

          @ConstructorProperties(value="numArgs")
          protected BaseAssertion(int numArgs)

    - #### BaseAssertion

          @ConstructorProperties(value={"numArgs","message"})
          protected BaseAssertion(int numArgs,
                                             java.lang.String message)

  - ### Method Detail

    - #### getMessage

          public java.lang.String getMessage()

    - #### supportsPlannerLevel

          public boolean supportsPlannerLevel(PlannerLevel plannerLevel)

      Specified by:
        `supportsPlannerLevel` in interface `PlannedOperation<C>`

    - #### fail

          protected void fail()

    - #### fail

          protected void fail(java.lang.Object... args)

    - #### throwFail

          public static void throwFail(java.lang.String message)

      Static method throwFail should be used to throw an `AssertionException`.
      Parameters:
        `message` - of type String, the message to be thrown

    - #### throwFail

          public static void throwFail(java.lang.String message,
                       java.lang.Object... args)

      Static method throwFail should 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

    - #### equals

          public boolean equals(java.lang.Object object)

      Overrides:
        `equals` in class `BaseOperation<C>`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `BaseOperation<C>`

Copyright © 2007-2015 Xplenty, Inc. All Rights Reserved.