net.openai.ai.nn.gui.data
Class DataContainer

java.lang.Object
  |
  +--net.openai.ai.nn.gui.data.AbstractDataObject
        |
        +--net.openai.ai.nn.gui.data.DataContainer
All Implemented Interfaces:
DataObject
Direct Known Subclasses:
GUILayer, GUINetwork

public class DataContainer
extends AbstractDataObject

Generic container for DataObjects. The object holds a ID-Ordered List of DataObjects

Version:
$Id: DataContainer.java,v 1.3 2002/02/28 15:34:20 tweber Exp $ History:
$Log: DataContainer.java,v $
Revision 1.3 2002/02/28 15:34:20 tweber
A lot of changes to make 'addLayer' working

Revision 1.2 2002/02/14 23:22:10 gleo
Jindent run through.

Revision 1.1 2002/02/13 09:15:22 tweber
Initial release of a new GUI-datamodel
Author:
Thomas Weber

Constructor Summary
DataContainer()
          Creates a empty DataContainer
 
Method Summary
 DataObject get(long lID)
          Returns the DataObject with the given key.
 java.util.Iterator iterator()
          Returns an iterator over all childobjects of this container
protected  void put(DataObject o)
          Stores a Object with its own ID If there is already a object with this key, it will be overwritten!
 void remove(long lID)
          Removes the object with the given key
 void reorder()
          Reorders the ID of the Elements
 long size()
          returns the amount of childs in this container
 
Methods inherited from class net.openai.ai.nn.gui.data.AbstractDataObject
getID, getParent, getSibbling, setID, setParent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataContainer

public DataContainer()
Creates a empty DataContainer

Method Detail

put

protected void put(DataObject o)
Stores a Object with its own ID If there is already a object with this key, it will be overwritten!

Parameters:
o - Object to be stored

get

public DataObject get(long lID)
Returns the DataObject with the given key. If no DataObject is found, null will be returned.

Parameters:
lID - ID of the requested object
Returns:
Object with the given ID, null if no object is found

remove

public void remove(long lID)
Removes the object with the given key

Parameters:
lID - Key of the object that should be removed

iterator

public java.util.Iterator iterator()
Returns an iterator over all childobjects of this container


size

public long size()
returns the amount of childs in this container


reorder

public void reorder()
Reorders the ID of the Elements



Copyright - 2001 OpenAI Labs. All Rights Reserved.