org.openstreetmap.osmosis.core.filter.common
Enum IdTrackerType

java.lang.Object
  extended by java.lang.Enum<IdTrackerType>
      extended by org.openstreetmap.osmosis.core.filter.common.IdTrackerType
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<IdTrackerType>

public enum IdTrackerType
extends java.lang.Enum<IdTrackerType>

Defines the different id tracker implementations available.

Author:
Brett Henderson

Enum Constant Summary
BitSet
          The BitSet implementation maintains an array of bits set to 0 or 1.
IdList
          The IdList implementation maintains an array of selected ids.
 
Method Summary
static IdTrackerType valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static IdTrackerType[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

BitSet

public static final IdTrackerType BitSet
The BitSet implementation maintains an array of bits set to 0 or 1. This is the most compact storage representation for individual ids but is very wasteful when the ids are sparsely allocated because a bit is allocated for every id in the id range. This should be used if a large portion of the entire dataset must be stored.


IdList

public static final IdTrackerType IdList
The IdList implementation maintains an array of selected ids. This use 32 bits per id but is more efficient when a smaller number of ids are being stored. For example, in a bounding box implementation this implementation will be more efficient if the bounding box contains less than approximately 1/32 of the entire dataset.

Method Detail

values

public static IdTrackerType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (IdTrackerType c : IdTrackerType.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static IdTrackerType valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null