edu.mit.jverbnet.util
Class Checks.Mask<S>

java.lang.Object
  extended by edu.mit.jverbnet.util.Checks.Condition<S>
      extended by edu.mit.jverbnet.util.Checks.Check<S>
          extended by edu.mit.jverbnet.util.Checks.Mask<S>
Type Parameters:
S - the supertype of the objects dealt with by this mask
All Implemented Interfaces:
Checks.ICheck<S>, Checks.ICondition<S>, Checks.IMask<S>
Enclosing class:
Checks

public abstract static class Checks.Mask<S>
extends Checks.Check<S>
implements Checks.IMask<S>

Abstract implementation of a mask.

Since:
JVerbnet 1.0.0
Version:
1.0.0
Author:
Mark A. Finlayson

Constructor Summary
Checks.Mask(boolean allowsNulls)
          Creates a new mask object.
 
Method Summary
<T extends S>
T
mask(T value, T mask)
          Returns the mask value if the specified value satisfies the condition; otherwise, the original value.
 
Methods inherited from class edu.mit.jverbnet.util.Checks.Condition
allowsNulls
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface edu.mit.jverbnet.util.Checks.ICondition
allowsNulls, is
 
Methods inherited from interface edu.mit.jverbnet.util.Checks.ICheck
check
 

Constructor Detail

Checks.Mask

public Checks.Mask(boolean allowsNulls)
Creates a new mask object.

Parameters:
allowsNulls - the value to be returned by the Checks.Condition.allowsNulls() method
Since:
JVerbnet 1.0.0
Method Detail

mask

public <T extends S> T mask(T value,
                            T mask)
Description copied from interface: Checks.IMask
Returns the mask value if the specified value satisfies the condition; otherwise, the original value.

Specified by:
mask in interface Checks.IMask<S>
Parameters:
value - the value to be masked, if necessary
mask - the mask value
Returns:
the mask value if the specified value satisfies the condition; otherwise, the original value.


Copyright © 2012 ${project.organization.name}. All Rights Reserved.