public class


extends AbstractSet<E>
   ↳ java.util.AbstractCollection<E>
     ↳ java.util.AbstractSet<E>
       ↳ com.pnfsoftware.jeb.util.collect.FastLongSet

Class Overview

A (small) set of long values backed by a Bitmap for fast insertion/retrieval and zero allocation at run-time. The set range must not exceed 4G; the recommended max range should not exceed a few thousands.


Public Constructors
FastLongSet(long from, long to)
Create a set.
FastLongSet(long end)
Create a set for the range [0, end).
FastLongSet(FastLongSet set0)
Duplicate an existing set.
Public Methods
boolean add(Long e)
boolean addAll(Collection<? extends Long> c)
void addAllFast(FastLongSet other)
Fast version of addAll(Collection).
void clear()
boolean contains(Object o)
boolean containsAll(Collection<?> c)
boolean equals(Object obj)
int hashCode()
boolean isEmpty()
Iterator<Long> iterator()
boolean remove(Object o)
int size()
String toString()
Inherited Methods
From class java.util.AbstractSet
From class java.util.AbstractCollection
From class java.lang.Object
From interface java.lang.Iterable
From interface java.util.Collection
From interface java.util.Set

Public Constructors

public FastLongSet (long from, long to)

Create a set.

from range start (inclusive)
to range end (exclusive)

public FastLongSet (long end)

Create a set for the range [0, end).

end range end (exclusive)

public FastLongSet (FastLongSet set0)

Duplicate an existing set.

set0 source set

Public Methods

public boolean add (Long e)

public boolean addAll (Collection<? extends Long> c)

public void addAllFast (FastLongSet other)

Fast version of addAll(Collection). Restrictions: the input collection must be a FastLongSet of the exact range.

public void clear ()

public boolean contains (Object o)

public boolean containsAll (Collection<?> c)

public boolean equals (Object obj)

public int hashCode ()

public boolean isEmpty ()

public Iterator<Long> iterator ()

public boolean remove (Object o)

public int size ()

public String toString ()