Enum Class FaweCache

java.lang.Object
java.lang.Enum<FaweCache>
com.fastasyncworldedit.core.FaweCache
All Implemented Interfaces:
Trimable, Serializable, Comparable<FaweCache>, Constable

public enum FaweCache extends Enum<FaweCache> implements Trimable
  • Enum Constant Details

    • IMP

      @Deprecated(forRemoval=true, since="2.0.0") public static final FaweCache IMP
      Deprecated, for removal: This API element is subject to removal in a future version.
      Use INSTANCE to get an instance.
    • INSTANCE

      public static final FaweCache INSTANCE
      Since:
      2.0.0
  • Field Details

  • Method Details

    • values

      public static FaweCache[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static FaweCache valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • trim

      public boolean trim(boolean aggressive)
      Description copied from interface: Trimable
      Trims the object, reducing its memory footprint.
      Specified by:
      trim in interface Trimable
      Parameters:
      aggressive - if trimming should be aggressive e.g., Not returning early when the first element cannot be trimmed
      Returns:
      if this object is empty at the end of the trim, and can therefore be deleted
    • registerPool

      public <T extends IChunkSet> Pool<T> registerPool(Class<T> clazz, Supplier<T> cache, boolean buffer)
    • createCache

      public <T, V> com.google.common.cache.LoadingCache<T,V> createCache(Supplier<V> withInitial)
    • createCache

      public <T, V> com.google.common.cache.LoadingCache<T,V> createCache(Function<T,V> withInitial)
    • toPalette

      public FaweCache.Palette toPalette(int layerOffset, char[] blocks)
      Convert raw char array to palette
      Returns:
      palette
    • toPalette

      public FaweCache.Palette toPalette(int layerOffset, int[] blocks)
      Convert raw int array to palette
      Returns:
      palette
    • toPaletteUnstretched

      public FaweCache.Palette toPaletteUnstretched(int layerOffset, char[] blocks)
      Convert raw int array to unstretched palette (1.16)
      Returns:
      palette
    • asMap

      public Map<String,Object> asMap(Object... pairs)
    • asTag

      public ShortTag asTag(short value)
    • asTag

      public IntTag asTag(int value)
    • asTag

      public DoubleTag asTag(double value)
    • asTag

      public ByteTag asTag(byte value)
    • asTag

      public FloatTag asTag(float value)
    • asTag

      public LongTag asTag(long value)
    • asTag

      public ByteArrayTag asTag(byte[] value)
    • asTag

      public IntArrayTag asTag(int[] value)
    • asTag

      public LongArrayTag asTag(long[] value)
    • asTag

      public StringTag asTag(String value)
    • asTag

      public CompoundTag asTag(Map<String,Object> value)
    • asTag

      public Tag asTag(Object value)
    • asTag

      public ListTag asTag(Object... values)
    • asTag

      public ListTag asTag(Collection values)
    • newBlockingExecutor

      public ThreadPoolExecutor newBlockingExecutor()