ozone API

org.ozoneDB.DxLib
Class DxTreeMap

java.lang.Object
  extended byorg.ozoneDB.DxLib.DxObject
      extended byorg.ozoneDB.DxLib.DxAbstractCollection
          extended byorg.ozoneDB.DxLib.DxAbstractMap
              extended byorg.ozoneDB.DxLib.DxTreeMap
All Implemented Interfaces:
java.lang.Cloneable, DxCollection, DxCompatible, DxMap, org.ozoneDB.DxLib.DxTreeCollection, java.io.Externalizable, java.io.Serializable

public class DxTreeMap
extends DxAbstractMap
implements org.ozoneDB.DxLib.DxTreeCollection, java.io.Externalizable

A DxMap implementation that is based on a weight balanced tree.

Version:
$Revision: 1.7 $Date: 2000/10/28 16:55:14 $
Author:
SMB
See Also:
Serialized Form

Constructor Summary
DxTreeMap()
           
DxTreeMap(DxComparator _comparator)
           
 
Method Summary
 boolean addForKey(java.lang.Object obj, java.lang.Object key)
           
 void clear()
           
 java.lang.Object clone()
          liefert eine kopie des objektes; sollte von subclasses ueberschrieben werden;
 boolean containsKey(java.lang.Object key)
           
 int count()
           
 java.lang.Object elementForKey(java.lang.Object key)
           
 org.ozoneDB.DxLib.DxBBTree internalTree()
           
 boolean isEmpty()
           
 DxIterator iterator()
           
 java.lang.Object keyForElement(java.lang.Object obj)
          Returns the key for the given object, which has to be the same object as stored in the map.
 void readExternal(java.io.ObjectInput in)
           
 boolean remove(java.lang.Object obj)
          Remove the first occurence of an object that equals the the specified object.
 java.lang.Object removeForKey(java.lang.Object key)
           
 void writeExternal(java.io.ObjectOutput out)
           
 
Methods inherited from class org.ozoneDB.DxLib.DxAbstractMap
add, addAll, buildKey, clone, elementSet, equals, keySet, removeAllKeys, valueClone
 
Methods inherited from class org.ozoneDB.DxLib.DxAbstractCollection
addAll, clone, contains, containsAll, removeAll, toArray
 
Methods inherited from class org.ozoneDB.DxLib.DxObject
isLess
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.ozoneDB.DxLib.DxCollection
add, addAll, addAll, contains, containsAll, removeAll, toArray, valueClone
 
Methods inherited from interface org.ozoneDB.DxLib.DxCompatible
equals, isLess
 

Constructor Detail

DxTreeMap

public DxTreeMap()

DxTreeMap

public DxTreeMap(DxComparator _comparator)
Method Detail

clone

public java.lang.Object clone()
Description copied from class: DxObject
liefert eine kopie des objektes; sollte von subclasses ueberschrieben werden;

Specified by:
clone in interface DxCollection
Overrides:
clone in class DxObject

addForKey

public boolean addForKey(java.lang.Object obj,
                         java.lang.Object key)
Specified by:
addForKey in interface DxMap

elementForKey

public java.lang.Object elementForKey(java.lang.Object key)
Specified by:
elementForKey in interface DxMap

keyForElement

public java.lang.Object keyForElement(java.lang.Object obj)
Description copied from interface: DxMap
Returns the key for the given object, which has to be the same object as stored in the map.

Specified by:
keyForElement in interface DxMap

removeForKey

public java.lang.Object removeForKey(java.lang.Object key)
Specified by:
removeForKey in interface DxMap

remove

public boolean remove(java.lang.Object obj)
Description copied from class: DxAbstractCollection
Remove the first occurence of an object that equals the the specified object.

Specified by:
remove in interface DxCollection
Overrides:
remove in class DxAbstractCollection

iterator

public DxIterator iterator()
Specified by:
iterator in interface DxCollection

count

public int count()
Specified by:
count in interface DxCollection

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface DxCollection

containsKey

public boolean containsKey(java.lang.Object key)
Specified by:
containsKey in interface DxMap
Overrides:
containsKey in class DxAbstractMap

clear

public void clear()
Specified by:
clear in interface DxCollection

internalTree

public org.ozoneDB.DxLib.DxBBTree internalTree()
Specified by:
internalTree in interface org.ozoneDB.DxLib.DxTreeCollection

writeExternal

public void writeExternal(java.io.ObjectOutput out)
                   throws java.io.IOException
Specified by:
writeExternal in interface java.io.Externalizable
Overrides:
writeExternal in class DxAbstractMap
Throws:
java.io.IOException

readExternal

public void readExternal(java.io.ObjectInput in)
                  throws java.io.IOException,
                         java.lang.ClassNotFoundException
Specified by:
readExternal in interface java.io.Externalizable
Overrides:
readExternal in class DxAbstractMap
Throws:
java.io.IOException
java.lang.ClassNotFoundException

ozone API

Copyright (C) The Ozone Database Project - www.ozone-db.org. All rights reserved.