cascading.operation.assertion

## Class AssertGroupBase

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

All Implemented Interfaces:
  DeclaresResults, Assertion<AssertGroupBase.Context>, GroupAssertion<AssertGroupBase.Context>, Operation<AssertGroupBase.Context>, PlannedOperation<AssertGroupBase.Context>, Traceable, java.io.Serializable

Direct Known Subclasses:
  AssertGroupSizeEquals, AssertGroupSizeLessThan, AssertGroupSizeMoreThan

    public abstract class AssertGroupBase
    extends BaseAssertion<AssertGroupBase.Context>
    implements GroupAssertion<AssertGroupBase.Context>

See Also:
  Serialized Form

### Nested Class Summary

Nested Classes
`static class` `AssertGroupBase.Context`

### Field Summary

Fields
`protected java.lang.String` `patternString` Field patternString
`protected long` `size` Field size

### Fields inherited from class cascading.operation.BaseOperation

`fieldDeclaration, numArgs, trace`

### Fields inherited from interface cascading.operation.Operation

`ANY`

### Constructor Summary

Constructors
`` `AssertGroupBase(java.lang.String message, long size)`
`protected` `AssertGroupBase(java.lang.String message, java.lang.String patternString, long size)`

### Method Summary

Methods
`void` `aggregate(FlowProcess flowProcess, GroupAssertionCall<AssertGroupBase.Context> assertionCall)` Method aggregate is called for each `TupleEntry` value in the current grouping.
`protected abstract boolean` `assertFails(java.lang.Long groupSize)`
`void` `doAssert(FlowProcess flowProcess, GroupAssertionCall<AssertGroupBase.Context> assertionCall)` Method doAssert performs the assertion.
`boolean` `equals(java.lang.Object object)`
`java.lang.String` `getPatternString()`
`long` `getSize()`
`int` `hashCode()`
`void` `prepare(FlowProcess flowProcess, OperationCall<AssertGroupBase.Context> operationCall)` Method prepare does nothing, and may safely be overridden.
`void` `start(FlowProcess flowProcess, GroupAssertionCall<AssertGroupBase.Context> assertionCall)` Method start initializes the aggregation procedure and is called for every unique grouping.

### Methods inherited from class cascading.operation.assertion.BaseAssertion

`fail, fail, getMessage, supportsPlannerLevel, throwFail, throwFail`

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

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

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

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

### Methods inherited from interface cascading.operation.PlannedOperation

`supportsPlannerLevel`

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

`cleanup, flush, getFieldDeclaration, getNumArgs, isSafe`

### Field Detail

#### patternString

    protected java.lang.String patternString

Field patternString

#### size

    protected final long size

Field size

### Constructor Detail

#### AssertGroupBase

    @ConstructorProperties(value={"message","size"})
    public AssertGroupBase(java.lang.String message,
                                         long size)

#### AssertGroupBase

    @ConstructorProperties(value={"message","patternString","size"})
    protected AssertGroupBase(java.lang.String message,
                                         java.lang.String patternString,
                                         long size)

### Method Detail

#### getPatternString

    public java.lang.String getPatternString()

#### getSize

    public long getSize()

#### prepare

    public void prepare(FlowProcess flowProcess,
               OperationCall<AssertGroupBase.Context> operationCall)

Description copied from class: `BaseOperation`
Method prepare does nothing, and may safely be overridden.

Specified by:
  `prepare` in interface `Operation<AssertGroupBase.Context>`
Overrides:
  `prepare` in class `BaseOperation<AssertGroupBase.Context>`

#### start

    public void start(FlowProcess flowProcess,
             GroupAssertionCall<AssertGroupBase.Context> assertionCall)

Description copied from interface: `GroupAssertion`
Method start initializes the aggregation procedure and is called for every unique grouping.

The AggregatorCall context should be initialized here if necessary.

The first time this method is called for a given 'process', the AggregatorCall context will be null. This method should set a new instance of the user defined context object. When the AggregatorCall context is not null, it is up to the developer to create a new instance, or 'recycle' the given instance. If recycled, it must be re-initialized to remove any previous state/values.

For example, if a Map is used to hold the intermediate data for each subsequent `GroupAssertion.aggregate(cascading.flow.FlowProcess, GroupAssertionCall)` call, new HashMap() should be set on the AggregatorCall instance when `OperationCall.getContext()` is null. On the next grouping, start() will be called again, but this time with the old Map instance. In this case, map.clear() should be invoked before returning.

Specified by:
  `start` in interface `GroupAssertion<AssertGroupBase.Context>`
Parameters:
  `flowProcess` - of type FlowProcess
  `assertionCall` - of type GroupAssertionCall

#### aggregate

    public void aggregate(FlowProcess flowProcess,
                 GroupAssertionCall<AssertGroupBase.Context> assertionCall)

Description copied from interface: `GroupAssertion`
Method aggregate is called for each `TupleEntry` value in the current grouping.

Specified by:
  `aggregate` in interface `GroupAssertion<AssertGroupBase.Context>`
Parameters:
  `flowProcess` - of type FlowProcess
  `assertionCall` - of type GroupAssertionCall

#### doAssert

    public void doAssert(FlowProcess flowProcess,
                GroupAssertionCall<AssertGroupBase.Context> assertionCall)

Description copied from interface: `GroupAssertion`
Method doAssert performs the assertion.

Specified by:
  `doAssert` in interface `GroupAssertion<AssertGroupBase.Context>`
Parameters:
  `flowProcess` - of type FlowProcess
  `assertionCall` - of type GroupAssertionCall

#### assertFails

    protected abstract boolean assertFails(java.lang.Long groupSize)

#### equals

    public boolean equals(java.lang.Object object)

Overrides:
  `equals` in class `BaseAssertion<AssertGroupBase.Context>`

#### hashCode

    public int hashCode()

Overrides:
  `hashCode` in class `BaseAssertion<AssertGroupBase.Context>`