Class KeyCounter

java.lang.Object
appeng.api.stacks.KeyCounter
All Implemented Interfaces:
Iterable<it.unimi.dsi.fastutil.objects.Object2LongMap.Entry<AEKey>>

public final class KeyCounter extends Object implements Iterable<it.unimi.dsi.fastutil.objects.Object2LongMap.Entry<AEKey>>
Associates a generic value of type T with AE keys and makes key/value pairs searchable with fuzzy mode semantics.
  • Constructor Details

    • KeyCounter

      public KeyCounter()
  • Method Details

    • findFuzzy

      public Collection<it.unimi.dsi.fastutil.objects.Object2LongMap.Entry<AEKey>> findFuzzy(AEKey key, FuzzyMode fuzzy)
    • removeZeros

      public void removeZeros()
    • addAll

      public void addAll(KeyCounter other)
    • removeAll

      public void removeAll(KeyCounter other)
    • add

      public void add(AEKey key, long amount)
    • remove

      public void remove(AEKey key, long amount)
    • set

      public void set(AEKey key, long amount)
    • get

      public long get(AEKey key)
    • reset

      public void reset()
    • clear

      public void clear()
    • isEmpty

      public boolean isEmpty()
    • size

      public int size()
    • iterator

      public Iterator<it.unimi.dsi.fastutil.objects.Object2LongMap.Entry<AEKey>> iterator()
      Specified by:
      iterator in interface Iterable<it.unimi.dsi.fastutil.objects.Object2LongMap.Entry<AEKey>>
    • getFirstKey

      @Nullable public @Nullable AEKey getFirstKey()
    • getFirstKey

      @Nullable public <T extends AEKey> T getFirstKey(Class<T> keyClass)
    • getFirstEntry

      @Nullable public it.unimi.dsi.fastutil.objects.Object2LongMap.Entry<AEKey> getFirstEntry()
    • getFirstEntry

      @Nullable public <T extends AEKey> it.unimi.dsi.fastutil.objects.Object2LongMap.Entry<AEKey> getFirstEntry(Class<T> keyClass)
    • keySet

      public Set<AEKey> keySet()