Class ConcurrentSet<T>

java.lang.Object
com.renomad.minum.utils.ConcurrentSet<T>
All Implemented Interfaces:
Iterable<T>

public final class ConcurrentSet<T> extends Object implements Iterable<T>
This uses a [ConcurrentHashMap] as its base. We store the data in the keys only. We provide some syntactic sugar so this seems similar to using a Set.

This is a thread-safe data structure.

  • Constructor Details

    • ConcurrentSet

      public ConcurrentSet()
  • Method Details

    • add

      public void add(T element)
    • remove

      public void remove(T element)
    • size

      public int size()
    • iterator

      public Iterator<T> iterator()
      Specified by:
      iterator in interface Iterable<T>