com.planet_ink.coffee_mud.core.collections
Class LongSet

java.lang.Object
  extended by com.planet_ink.coffee_mud.core.collections.LongSet
All Implemented Interfaces:
java.lang.Iterable<java.lang.Long>, java.util.Collection<java.lang.Long>, java.util.Set<java.lang.Long>

public class LongSet
extends java.lang.Object
implements java.util.Set<java.lang.Long>


Field Summary
static int INT_BITS
          a mask for int number values
protected  int[] intArray
           
static long LONG_BITS
          a mask for int number values
protected  long[] longArray
           
protected static int NEXT_FLAG
          Whether this number denotes the beginning of a grouping.
protected static long NEXT_FLAGL
          Whether this number denotes the beginning of a grouping.
static long OPTION_FLAG_LONG
          a secondary mask value for marking numbers
 
Constructor Summary
LongSet()
           
 
Method Summary
 LongSet add(long x)
           
 boolean add(java.lang.Long e)
           
 LongSet add(long from, long to)
           
 LongSet add(LongSet grp)
           
 boolean addAll(java.util.Collection<? extends java.lang.Long> c)
           
protected  boolean checkIntArray()
           
protected  boolean checkLongArray()
           
 void clear()
           
 boolean contains(long x)
           
 boolean contains(java.lang.Object o)
           
 boolean containsAll(java.util.Collection<?> c)
           
 LongSet copyOf()
           
 int[] getAllIntNumbers()
           
 long[] getAllNumbers()
           
 int getIntIndex(int x)
           
 int getLongIndex(long y)
           
 long getRandom()
           
 boolean isEmpty()
           
 java.util.Iterator<java.lang.Long> iterator()
           
 LongSet parseString(java.lang.String txt)
           
 boolean remove(long x)
           
 boolean remove(LongSet grp)
           
 boolean remove(java.lang.Object o)
           
 boolean removeAll(java.util.Collection<?> c)
           
 boolean retainAll(java.util.Collection<?> c)
           
 int size()
           
protected static void test(java.lang.String[] args)
           
 java.lang.Object[] toArray()
           
<T> T[]
toArray(T[] a)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Set
equals, hashCode
 

Field Detail

NEXT_FLAG

protected static final int NEXT_FLAG
Whether this number denotes the beginning of a grouping.

See Also:
Constant Field Values

INT_BITS

public static final int INT_BITS
a mask for int number values

See Also:
Constant Field Values

NEXT_FLAGL

protected static final long NEXT_FLAGL
Whether this number denotes the beginning of a grouping.

See Also:
Constant Field Values

LONG_BITS

public static final long LONG_BITS
a mask for int number values

See Also:
Constant Field Values

OPTION_FLAG_LONG

public static final long OPTION_FLAG_LONG
a secondary mask value for marking numbers

See Also:
Constant Field Values

intArray

protected volatile int[] intArray

longArray

protected volatile long[] longArray
Constructor Detail

LongSet

public LongSet()
Method Detail

copyOf

public LongSet copyOf()

contains

public boolean contains(long x)

getIntIndex

public int getIntIndex(int x)

getLongIndex

public int getLongIndex(long y)

getAllIntNumbers

public int[] getAllIntNumbers()

getAllNumbers

public long[] getAllNumbers()

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface java.util.Collection<java.lang.Long>
Specified by:
isEmpty in interface java.util.Set<java.lang.Long>

size

public int size()
Specified by:
size in interface java.util.Collection<java.lang.Long>
Specified by:
size in interface java.util.Set<java.lang.Long>

remove

public boolean remove(long x)

remove

public boolean remove(LongSet grp)

checkIntArray

protected boolean checkIntArray()

checkLongArray

protected boolean checkLongArray()

add

public LongSet add(LongSet grp)

add

public LongSet add(long x)

add

public LongSet add(long from,
                   long to)

test

protected static void test(java.lang.String[] args)

add

public boolean add(java.lang.Long e)
Specified by:
add in interface java.util.Collection<java.lang.Long>
Specified by:
add in interface java.util.Set<java.lang.Long>

addAll

public boolean addAll(java.util.Collection<? extends java.lang.Long> c)
Specified by:
addAll in interface java.util.Collection<java.lang.Long>
Specified by:
addAll in interface java.util.Set<java.lang.Long>

clear

public void clear()
Specified by:
clear in interface java.util.Collection<java.lang.Long>
Specified by:
clear in interface java.util.Set<java.lang.Long>

contains

public boolean contains(java.lang.Object o)
Specified by:
contains in interface java.util.Collection<java.lang.Long>
Specified by:
contains in interface java.util.Set<java.lang.Long>

containsAll

public boolean containsAll(java.util.Collection<?> c)
Specified by:
containsAll in interface java.util.Collection<java.lang.Long>
Specified by:
containsAll in interface java.util.Set<java.lang.Long>

iterator

public java.util.Iterator<java.lang.Long> iterator()
Specified by:
iterator in interface java.lang.Iterable<java.lang.Long>
Specified by:
iterator in interface java.util.Collection<java.lang.Long>
Specified by:
iterator in interface java.util.Set<java.lang.Long>

remove

public boolean remove(java.lang.Object o)
Specified by:
remove in interface java.util.Collection<java.lang.Long>
Specified by:
remove in interface java.util.Set<java.lang.Long>

removeAll

public boolean removeAll(java.util.Collection<?> c)
Specified by:
removeAll in interface java.util.Collection<java.lang.Long>
Specified by:
removeAll in interface java.util.Set<java.lang.Long>

retainAll

public boolean retainAll(java.util.Collection<?> c)
Specified by:
retainAll in interface java.util.Collection<java.lang.Long>
Specified by:
retainAll in interface java.util.Set<java.lang.Long>

toArray

public java.lang.Object[] toArray()
Specified by:
toArray in interface java.util.Collection<java.lang.Long>
Specified by:
toArray in interface java.util.Set<java.lang.Long>

toArray

public <T> T[] toArray(T[] a)
Specified by:
toArray in interface java.util.Collection<java.lang.Long>
Specified by:
toArray in interface java.util.Set<java.lang.Long>

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

parseString

public LongSet parseString(java.lang.String txt)

getRandom

public long getRandom()