public class OffsetsMask2D extends AbstractMask2D
Modifier and Type | Class and Description |
---|---|
static class |
OffsetsMask2D.Builder
A builder for an
OffsetsMask . |
Modifier and Type | Method and Description |
---|---|
static OffsetsMask2D.Builder |
builder(Mask2D mask)
Create a new builder, using the given mask.
|
boolean |
getExcludeSelf()
Get the flag determining if matching the current block should fail the mask.
|
Mask2D |
getMask()
Get the mask.
|
int |
getMaxMatches()
Gets the maximum number of matches to pass.
|
int |
getMinMatches()
Gets the minimum number of matches to pass.
|
com.google.common.collect.ImmutableSet<BlockVector2> |
getOffsets()
Get the offsets.
|
static OffsetsMask2D |
single(Mask2D mask,
BlockVector2 offset)
Create an offsets mask for a single offset.
|
boolean |
test(BlockVector2 vector)
Returns true if the criteria is met.
|
public static OffsetsMask2D single(Mask2D mask, BlockVector2 offset)
mask
- the mask to useoffset
- the offsetpublic static OffsetsMask2D.Builder builder(Mask2D mask)
mask
- the mask to usepublic Mask2D getMask()
public boolean getExcludeSelf()
public int getMinMatches()
public int getMaxMatches()
public com.google.common.collect.ImmutableSet<BlockVector2> getOffsets()
public boolean test(BlockVector2 vector)
Mask2D
vector
- the vector to test