Class MaskMemoizer2D

java.lang.Object
com.sk89q.worldedit.function.mask.AbstractMask2D
com.sk89q.worldedit.function.mask.MaskMemoizer2D
All Implemented Interfaces:
Mask2D, AutoCloseable

public class MaskMemoizer2D extends AbstractMask2D implements AutoCloseable
A utility mask wrapper that memoizes the results of the given mask.

This should not be kept around long-term for memory usage reasons. It's intended for usage within a single operation. The function is auto-closeable to make this simpler.

  • Constructor Details

    • MaskMemoizer2D

      public MaskMemoizer2D(Mask2D mask)
  • Method Details

    • test

      public boolean test(BlockVector2 vector)
      Description copied from interface: Mask2D
      Returns true if the criteria is met.
      Specified by:
      test in interface Mask2D
      Parameters:
      vector - the vector to test
      Returns:
      true if the criteria is met
    • clear

      public void clear()
    • close

      public void close() throws Exception
      Specified by:
      close in interface AutoCloseable
      Throws:
      Exception