Interface LongPairSet

All Known Implementing Classes:
ConcurrentLongPairSet, ConcurrentSortedLongPairSet

public interface LongPairSet
Hash set where values are composed of pairs of longs.
  • Method Details

    • add

      boolean add(long item1, long item2)
      Adds composite value of item1 and item2 to set.
      Parameters:
      item1 -
      item2 -
      Returns:
    • remove

      boolean remove(long item1, long item2)
      Removes composite value of item1 and item2 from set.
      Parameters:
      item1 -
      item2 -
      Returns:
    • removeIf

      int removeIf(LongPairSet.LongPairPredicate filter)
      Removes composite value of item1 and item2 from set if provided predicate LongPairSet.LongPairPredicate matches.
      Parameters:
      filter -
      Returns:
    • forEach

      void forEach(ConcurrentLongPairSet.LongPairConsumer processor)
      Execute ConcurrentLongPairSet.LongPairConsumer processor for each entry in the set.
      Parameters:
      processor -
    • items

      Returns:
      a new list of all keys (makes a copy)
    • items

      Set<ConcurrentLongPairSet.LongPair> items(int numberOfItems)
      Returns:
      a new list of keys with max provided numberOfItems (makes a copy)
    • items

      <T> Set<T> items(int numberOfItems, LongPairSet.LongPairFunction<T> longPairConverter)
      Parameters:
      numberOfItems -
      longPairConverter - converts (long,long) pair to object
      Returns:
      a new list of keys with max provided numberOfItems
    • isEmpty

      boolean isEmpty()
      Check if set is empty.
      Returns:
    • clear

      void clear()
      Removes all items from set.
    • size

      long size()
      Returns size of the set.
      Returns:
    • capacity

      long capacity()
      Returns capacity of the set.
      Returns:
    • contains

      boolean contains(long item1, long item2)
      Checks if given (item1,item2) composite value exists into set.
      Parameters:
      item1 -
      item2 -
      Returns: