org.openstreetmap.josm.data.osm
Class QuadBuckets<T extends OsmPrimitive>

java.lang.Object
  extended by org.openstreetmap.josm.data.osm.QuadBuckets<T>
All Implemented Interfaces:
java.lang.Iterable<T>, java.util.Collection<T>

public class QuadBuckets<T extends OsmPrimitive>
extends java.lang.Object
implements java.util.Collection<T>

Note: bbox of primitives added to QuadBuckets has to stay the same. In case of coordinate change, primitive must be removed and readded. This class is (no longer) thread safe.


Nested Class Summary
(package private)  class QuadBuckets.QBLevel
           
(package private)  class QuadBuckets.QuadBucketIterator
           
 
Field Summary
private static boolean consistency_testing
           
(package private)  long last_out
           
static int MAX_OBJECTS_PER_LEVEL
           
private static int NE_INDEX
           
private static int NW_INDEX
           
private  QuadBuckets.QBLevel root
           
private static int SE_INDEX
           
private  QuadBuckets.QBLevel search_cache
           
private  int size
           
private static int SW_INDEX
           
 
Constructor Summary
QuadBuckets()
           
 
Method Summary
(package private) static void abort(java.lang.String s)
           
 boolean add(T n)
           
 boolean addAll(java.util.Collection<? extends T> objects)
           
 void clear()
           
 boolean contains(java.lang.Object o)
           
 boolean containsAll(java.util.Collection<?> objects)
           
 boolean isEmpty()
           
 java.util.Iterator<T> iterator()
           
(package private) static void out(java.lang.String s)
           
(package private)  void pout(java.lang.String s)
           
(package private)  void pout(java.lang.String s, int i, int total)
           
private  void printIndented(int indent, java.lang.Object msg)
           
 void printTree()
           
private  void printTreeRecursive(QuadBuckets.QBLevel level, int indent)
           
 boolean remove(java.lang.Object o)
           
 boolean removeAll(java.util.Collection<?> objects)
           
 boolean retainAll(java.util.Collection<?> objects)
           
 java.util.List<T> search(BBox search_bbox)
           
 int size()
           
 java.lang.Object[] toArray()
           
<A> A[]
toArray(A[] template)
           
 java.util.ArrayList<T> toArrayList()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Collection
equals, hashCode
 

Field Detail

consistency_testing

private static final boolean consistency_testing
See Also:
Constant Field Values

NW_INDEX

private static final int NW_INDEX
See Also:
Constant Field Values

NE_INDEX

private static final int NE_INDEX
See Also:
Constant Field Values

SE_INDEX

private static final int SE_INDEX
See Also:
Constant Field Values

SW_INDEX

private static final int SW_INDEX
See Also:
Constant Field Values

last_out

long last_out

MAX_OBJECTS_PER_LEVEL

public static final int MAX_OBJECTS_PER_LEVEL
See Also:
Constant Field Values

root

private QuadBuckets.QBLevel root

search_cache

private QuadBuckets.QBLevel search_cache

size

private int size
Constructor Detail

QuadBuckets

public QuadBuckets()
Method Detail

abort

static void abort(java.lang.String s)

out

static void out(java.lang.String s)

pout

void pout(java.lang.String s)

pout

void pout(java.lang.String s,
          int i,
          int total)

clear

public void clear()
Specified by:
clear in interface java.util.Collection<T extends OsmPrimitive>

add

public boolean add(T n)
Specified by:
add in interface java.util.Collection<T extends OsmPrimitive>

retainAll

public boolean retainAll(java.util.Collection<?> objects)
Specified by:
retainAll in interface java.util.Collection<T extends OsmPrimitive>

removeAll

public boolean removeAll(java.util.Collection<?> objects)
Specified by:
removeAll in interface java.util.Collection<T extends OsmPrimitive>

addAll

public boolean addAll(java.util.Collection<? extends T> objects)
Specified by:
addAll in interface java.util.Collection<T extends OsmPrimitive>

containsAll

public boolean containsAll(java.util.Collection<?> objects)
Specified by:
containsAll in interface java.util.Collection<T extends OsmPrimitive>

remove

public boolean remove(java.lang.Object o)
Specified by:
remove in interface java.util.Collection<T extends OsmPrimitive>

contains

public boolean contains(java.lang.Object o)
Specified by:
contains in interface java.util.Collection<T extends OsmPrimitive>

toArrayList

public java.util.ArrayList<T> toArrayList()

toArray

public java.lang.Object[] toArray()
Specified by:
toArray in interface java.util.Collection<T extends OsmPrimitive>

toArray

public <A> A[] toArray(A[] template)
Specified by:
toArray in interface java.util.Collection<T extends OsmPrimitive>

iterator

public java.util.Iterator<T> iterator()
Specified by:
iterator in interface java.lang.Iterable<T extends OsmPrimitive>
Specified by:
iterator in interface java.util.Collection<T extends OsmPrimitive>

size

public int size()
Specified by:
size in interface java.util.Collection<T extends OsmPrimitive>

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface java.util.Collection<T extends OsmPrimitive>

search

public java.util.List<T> search(BBox search_bbox)

printTree

public void printTree()

printTreeRecursive

private void printTreeRecursive(QuadBuckets.QBLevel level,
                                int indent)

printIndented

private void printIndented(int indent,
                           java.lang.Object msg)


JOSM