cascading.operation.assertion
Class AssertMatches

java.lang.Object
  extended by cascading.operation.BaseOperation<C>
      extended by cascading.operation.regex.RegexOperation<Matcher>
          extended by cascading.operation.regex.RegexMatcher
              extended by cascading.operation.assertion.AssertMatches
All Implemented Interfaces:
Assertion<Matcher>, Operation<Matcher>, ValueAssertion<Matcher>, Serializable

public class AssertMatches
extends RegexMatcher
implements ValueAssertion<Matcher>

Class AssertMatches matches the given regular expression patternString against the whole argument Tuple by joining each individual element of the Tuple with a tab character (\t). See AssertMatchesAll if you need to match the patternString regex against each individual tuple element.

This operation uses Matcher internally, specifically the method Matcher.find().

See Also:
Matcher, Pattern, Serialized Form

Field Summary
 
Fields inherited from class cascading.operation.regex.RegexMatcher
negateMatch
 
Fields inherited from class cascading.operation.regex.RegexOperation
patternString
 
Fields inherited from class cascading.operation.BaseOperation
fieldDeclaration, numArgs, trace
 
Fields inherited from interface cascading.operation.Operation
ANY
 
Constructor Summary
AssertMatches(String patternString)
          Constructor AssertMatches creates a new AssertMatches instance.
AssertMatches(String patternString, boolean negateMatch)
          Constructor AssertMatches creates a new AssertMatches instance.
 
Method Summary
 void doAssert(FlowProcess flowProcess, ValueAssertionCall<Matcher> assertionCall)
          Method doAssert performs the assertion.
 
Methods inherited from class cascading.operation.regex.RegexMatcher
matchEachElement, matchEachElementPos, matchWholeTuple, prepare
 
Methods inherited from class cascading.operation.regex.RegexOperation
getPattern
 
Methods inherited from class cascading.operation.BaseOperation
cleanup, getFieldDeclaration, getNumArgs, getTrace, printOperationInternal, toString, toStringInternal
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface cascading.operation.Operation
cleanup, getFieldDeclaration, getNumArgs, prepare
 

Constructor Detail

AssertMatches

public AssertMatches(String patternString)
Constructor AssertMatches creates a new AssertMatches instance.

Parameters:
patternString - of type String

AssertMatches

public AssertMatches(String patternString,
                     boolean negateMatch)
Constructor AssertMatches creates a new AssertMatches instance.

Parameters:
patternString - of type String
negateMatch - of type boolean
Method Detail

doAssert

public void doAssert(FlowProcess flowProcess,
                     ValueAssertionCall<Matcher> assertionCall)
Description copied from interface: ValueAssertion
Method doAssert performs the assertion.

Specified by:
doAssert in interface ValueAssertion<Matcher>
Parameters:
flowProcess - of type FlowProcess
assertionCall - of type ValueAssertionCall
See Also:
ValueAssertion.doAssert(cascading.flow.FlowProcess,cascading.operation.ValueAssertionCall)


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