Package com.db4o.internal
Class TreeInt
- java.lang.Object
-
- com.db4o.foundation.Tree<java.lang.Integer>
-
- com.db4o.internal.TreeInt
-
- All Implemented Interfaces:
DeepClone
,ShallowClone
,Visitable<java.lang.Integer>
,Readable
,ReadWriteable
- Direct Known Subclasses:
DeleteInfo
,FreeSlotNode
,IdSlotTree
,QCandidateBase
,ReferencedSlot
,SlotChange
,TreeIntObject
public class TreeInt extends Tree<java.lang.Integer> implements ReadWriteable
Base class for balanced trees.
-
-
Field Summary
Fields Modifier and Type Field Description int
_key
-
Fields inherited from class com.db4o.foundation.Tree
_preceding, _size, _subsequent
-
-
Constructor Summary
Constructors Constructor Description TreeInt(int a_key)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static TreeInt
add(TreeInt tree, int value)
static Tree
addAll(Tree tree, IntIterator4 iter)
int
compare(Tree a_to)
returns 0, if keys are equal uses this - other returns positive if this is greater than a_to returns negative if this is smaller than a_toboolean
duplicates()
boolean
equals(java.lang.Object obj)
TreeInt
find(int a_key)
static TreeInt
find(Tree a_in, int a_key)
java.lang.Integer
key()
int
marshalledLength()
int
marshalledLength(int size)
static int
marshalledLength(TreeInt a_tree)
int
ownLength()
java.lang.Object
read(ByteArrayBuffer buffer)
static TreeInt
removeLike(TreeInt tree, int value)
java.lang.Object
shallowClone()
protected Tree
shallowCloneInternal(Tree tree)
java.lang.String
toString()
void
write(ByteArrayBuffer buffer)
static void
write(ByteArrayBuffer buffer, TreeInt tree)
static void
write(ByteArrayBuffer buffer, TreeInt tree, int size)
-
Methods inherited from class com.db4o.foundation.Tree
accept, add, add, add, addedOrExisting, balance, balanceCheckNulls, calculateSize, deepClone, deepClone, depth, filter, find, find, findGreaterOrEqual, findSmaller, first, last, last, nodes, onAttemptToAddDuplicate, ownSize, remove, removeChildren, removeFirst, removeLike, removeLike, removeNode, root, rotateLeft, rotateRight, setSizeOwn, setSizeOwnPlus, setSizeOwnPlus, setSizeOwnPreceding, setSizeOwnPrecedingSubsequent, setSizeOwnSubsequent, size, size, traverse, traverse, traverse, traverseFromLeaves, wasAddedToTree
-
-
-
-
Method Detail
-
addAll
public static Tree addAll(Tree tree, IntIterator4 iter)
-
compare
public int compare(Tree a_to)
Description copied from class:Tree
returns 0, if keys are equal uses this - other returns positive if this is greater than a_to returns negative if this is smaller than a_to
-
duplicates
public boolean duplicates()
- Overrides:
duplicates
in classTree<java.lang.Integer>
-
find
public final TreeInt find(int a_key)
-
read
public java.lang.Object read(ByteArrayBuffer buffer)
-
write
public void write(ByteArrayBuffer buffer)
- Specified by:
write
in interfaceReadWriteable
-
write
public static void write(ByteArrayBuffer buffer, TreeInt tree)
-
write
public static void write(ByteArrayBuffer buffer, TreeInt tree, int size)
-
ownLength
public int ownLength()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
shallowCloneInternal
protected Tree shallowCloneInternal(Tree tree)
- Overrides:
shallowCloneInternal
in classTree<java.lang.Integer>
-
shallowClone
public java.lang.Object shallowClone()
- Specified by:
shallowClone
in interfaceShallowClone
- Overrides:
shallowClone
in classTree<java.lang.Integer>
-
marshalledLength
public static int marshalledLength(TreeInt a_tree)
-
marshalledLength
public final int marshalledLength()
- Specified by:
marshalledLength
in interfaceReadable
-
marshalledLength
public final int marshalledLength(int size)
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
-