Known Direct Subclasses
|
Class Overview
TODO Make all methods non-synchronized and add a SynchronizedXZYQuadTree subclasses.
(c) Zynga 2011
Summary
Nested Classes |
class |
QuadTree.QuadTreeNode |
|
Protected Constructors |
|
QuadTree(B pBounds, int pMaxLevel)
|
Public Methods |
synchronized
void
|
add(T pItem)
|
synchronized
void
|
add(T pItem, B pBounds)
|
synchronized
void
|
addAll(ArrayList<T> pItems)
|
synchronized
void
|
addAll(T... pItems)
|
synchronized
void
|
addAll(Collection<T> pItems)
|
synchronized
void
|
callItems(ParameterCallable<T> pParameterCallable)
|
synchronized
void
|
callNodes(ParameterCallable<QuadTreeNode> pParameterCallable)
|
synchronized
void
|
clear()
|
synchronized
boolean
|
containsAny(B pBounds)
|
synchronized
boolean
|
containsAny(B pBounds, IMatcher<T> pMatcher)
|
B
|
getBounds()
|
synchronized
int
|
getItemCount()
|
int
|
getMaxLevel()
|
synchronized
boolean
|
isEmpty()
|
synchronized
void
|
move(T pItem, B pOldBounds, B pNewBounds)
Shorthand for remove(pItem, pOldBounds) followed by a add(pItem, pNewBounds) .
|
synchronized
void
|
move(T pItem, B pBounds)
Shorthand for remove(pItem, pBounds) followed by a add(pItem) .
|
synchronized
ArrayList<T>
|
query(B pBounds)
|
synchronized
ArrayList<T>
|
query(B pBounds, IMatcher<T> pMatcher)
|
synchronized
<L extends List<T>>
L
|
query(B pBounds, IMatcher<T> pMatcher, L pResult)
|
synchronized
<L extends List<T>>
L
|
query(B pBounds, L pResult)
|
synchronized
<L extends List<S extends T>, S>
L
|
queryForSubclass(B pBounds, IMatcher<T> pMatcher, L pResult)
@return
|
synchronized
boolean
|
remove(T pItem, B pBounds)
|
synchronized
boolean
|
remove(T pItem)
|
String
|
toString()
|
[Expand]
Inherited Methods |
From class
java.lang.Object
Object
|
clone()
|
boolean
|
equals(Object arg0)
|
void
|
finalize()
|
final
Class<?>
|
getClass()
|
int
|
hashCode()
|
final
void
|
notify()
|
final
void
|
notifyAll()
|
String
|
toString()
|
final
void
|
wait()
|
final
void
|
wait(long arg0, int arg1)
|
final
void
|
wait(long arg0)
|
|
Constants
protected
static
final
int
LEVEL_MAX_DEFAULT
Constant Value:
8
(0x00000008)
protected
static
final
int
LEVEL_ROOT
Constant Value:
0
(0x00000000)
Fields
protected
final
B extends IBounds
mBounds
protected
final
int
mMaxLevel
Public Constructors
public
QuadTree
(B pBounds)
Protected Constructors
protected
QuadTree
(B pBounds, int pMaxLevel)
Public Methods
public
synchronized
void
add
(T pItem)
public
synchronized
void
add
(T pItem, B pBounds)
public
synchronized
void
addAll
(ArrayList<T> pItems)
public
synchronized
void
addAll
(T... pItems)
public
synchronized
void
addAll
(Collection<T> pItems)
public
synchronized
void
clear
()
public
synchronized
boolean
containsAny
(B pBounds)
public
synchronized
boolean
containsAny
(B pBounds, IMatcher<T> pMatcher)
public
synchronized
int
getItemCount
()
public
int
getMaxLevel
()
public
synchronized
boolean
isEmpty
()
public
synchronized
void
move
(T pItem, B pOldBounds, B pNewBounds)
Shorthand for remove(pItem, pOldBounds)
followed by a add(pItem, pNewBounds)
.
Parameters
pItem
| to be freshly added. |
pOldBounds
| to remove pItem with. |
pNewBounds
| to add pItem with.
|
public
synchronized
void
move
(T pItem, B pBounds)
Shorthand for remove(pItem, pBounds)
followed by a add(pItem)
.
Parameters
pItem
| to be freshly added. |
pBounds
| to remove pItem with.
|
public
synchronized
ArrayList<T>
query
(B pBounds)
public
synchronized
L
query
(B pBounds, IMatcher<T> pMatcher, L pResult)
public
synchronized
L
query
(B pBounds, L pResult)
public
synchronized
L
queryForSubclass
(B pBounds, IMatcher<T> pMatcher, L pResult)
public
synchronized
boolean
remove
(T pItem, B pBounds)
public
synchronized
boolean
remove
(T pItem)
Protected Methods