com.javadocmd.simplelatlng
Class Geohasher.BitStore

java.lang.Object
  extended by java.util.BitSet
      extended by com.javadocmd.simplelatlng.Geohasher.BitStore
All Implemented Interfaces:
Serializable, Cloneable
Enclosing class:
Geohasher

protected static class Geohasher.BitStore
extends BitSet

Specialization of BitSet to actually keep track of the number of bits that are being usefully employed, regardless of whether or not they are 1 or 0. This requires that you call set for 0's and 1's. Not all features are implemented, but setting, getting, and size work fine, which is all I need for this class.

Author:
Tyler Coles
See Also:
Serialized Form

Constructor Summary
protected Geohasher.BitStore()
           
 
Method Summary
 void flip(int bitIndex)
           
 void flip(int fromIndex, int toIndex)
           
 void set(int bitIndex)
           
 void set(int bitIndex, boolean value)
           
 void set(int fromIndex, int toIndex)
           
 void set(int fromIndex, int toIndex, boolean value)
           
 int size()
           
 String toString()
           
 
Methods inherited from class java.util.BitSet
and, andNot, cardinality, clear, clear, clear, clone, equals, get, get, hashCode, intersects, isEmpty, length, nextClearBit, nextSetBit, or, xor
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Geohasher.BitStore

protected Geohasher.BitStore()
Method Detail

toString

public String toString()
Overrides:
toString in class BitSet

set

public void set(int bitIndex)
Overrides:
set in class BitSet

set

public void set(int bitIndex,
                boolean value)
Overrides:
set in class BitSet

set

public void set(int fromIndex,
                int toIndex)
Overrides:
set in class BitSet

set

public void set(int fromIndex,
                int toIndex,
                boolean value)
Overrides:
set in class BitSet

flip

public void flip(int bitIndex)
Overrides:
flip in class BitSet

flip

public void flip(int fromIndex,
                 int toIndex)
Overrides:
flip in class BitSet

size

public int size()
Overrides:
size in class BitSet


Copyright © 2010-2013. All Rights Reserved.