public class OffsetsMask extends AbstractMask
Modifier and Type | Class and Description |
---|---|
static class |
OffsetsMask.Builder
A builder for an
OffsetsMask . |
Modifier and Type | Method and Description |
---|---|
static OffsetsMask.Builder |
builder(Mask mask)
Create a new builder, using the given mask.
|
boolean |
getExcludeSelf()
Get the flag determining if matching the current block should fail the mask.
|
Mask |
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<BlockVector3> |
getOffsets()
Get the offsets.
|
static OffsetsMask |
single(Mask mask,
BlockVector3 offset)
Create an offsets mask for a single offset.
|
boolean |
test(BlockVector3 vector)
Returns true if the criteria is met.
|
Mask2D |
toMask2D()
Get the 2D version of this mask if one exists.
|
public static OffsetsMask single(Mask mask, BlockVector3 offset)
mask
- the mask to useoffset
- the offsetpublic static OffsetsMask.Builder builder(Mask mask)
mask
- the mask to usepublic Mask getMask()
public boolean getExcludeSelf()
public int getMinMatches()
public int getMaxMatches()
public com.google.common.collect.ImmutableSet<BlockVector3> getOffsets()
public boolean test(BlockVector3 vector)
Mask
vector
- the vector to test