edu.mit.jverbnet.util
Class Checks.Mask<S>
java.lang.Object
edu.mit.jverbnet.util.Checks.Condition<S>
edu.mit.jverbnet.util.Checks.Check<S>
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 |
|
mask(T value,
T mask)
Returns the mask value if the specified value satisfies the
condition; otherwise, the original value. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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
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 necessarymask
- the mask value
- Returns:
- the mask value if the specified value satisfies the
condition; otherwise, the original value.
Copyright © 2012 Massachusetts Institute of Technology. All Rights Reserved.