Class RtArraySet2<D>

All Implemented Interfaces:
Iterable<D>, Collection<D>, Set<D>

public class RtArraySet2<D> extends AbstractSet<D>
A set implementation for real-time application. Based on an array of references. "Lock-Free" variant of a "Real-Time Array Set".
DISCUSS: not yet clear whether the old dynamic form for "size()" is more efficient, -- it needs one "atomic" variable less. (!?)
ATTENTION: This class restricts the contract of "Iterator": Once "hasNext()==false" has returned, all following behaviour is unspecified and further usage forbidden. (The Iterator object will be recycled.)
  • Constructor Details

    • RtArraySet2

      public RtArraySet2(int capacity)
    • RtArraySet2

      public RtArraySet2(int capacity, int iterators)
  • Method Details