com.rapidminer.operator
Class IOContainer

java.lang.Object
  extended by com.rapidminer.operator.IOContainer
All Implemented Interfaces:
java.io.Serializable

public class IOContainer
extends java.lang.Object
implements java.io.Serializable

Input for Operator.apply(). Instances of this class are containers for IOObjects. They are available by calling one of the getInput methods. The operator can choose between keeping the IOObject in the container or delete it using it.

Author:
Simon Fischer, Ingo Mierswa
See Also:
IOObject, Serialized Form

Field Summary
static IOContainer DUMMY_IO_CONTAINER
           
 
Constructor Summary
IOContainer()
          Creates a new and empty IOContainer.
IOContainer(java.util.Collection<? extends IOObject> objectCollection)
          Creates a new IOContainer containing the contents of the Collection which must contain only IOObjects.
IOContainer(IOObject... objectArray)
           
 
Method Summary
 IOContainer append(java.util.Collection<IOObject> output)
          Appends this container's IOObjects to output.
 IOContainer append(IOObject object)
          Creates a new IOContainer by adding all IOObjects of this container to the given IOObject.
 IOContainer append(IOObject[] output)
          Creates a new IOContainer by adding all IOObjects of this container to the given IOObjects.
 boolean contains(java.lang.Class<? extends IOObject> cls)
          Returns true if this IOContainer containts an IOObject of the desired class.
 IOContainer copy()
          Copies the contents of this IOContainer by invoking the method copy of all IOObjects.
<T extends IOObject>
T
get(java.lang.Class<T> cls)
          Gets the first IOObject which is of class cls.
<T extends IOObject>
T
get(java.lang.Class<T> cls, int nr)
          Gets the nr-th IOObject which is of class cls.
 IOObject getElementAt(int index)
          Returns the n-th IOObject in this container.
 IOObject[] getIOObjects()
          Returns all IOObjects.
 IOContainer prepend(IOObject object)
          Creates a new IOContainer by adding the given object before the IOObjects of this container.
 IOContainer prepend(IOObject[] output)
          Creates a new IOContainer by adding the given objects before the IOObjects of this container.
<T extends IOObject>
T
remove(java.lang.Class<T> cls)
          Removes the first IOObject which is of class cls.
<T extends IOObject>
T
remove(java.lang.Class<T> cls, int nr)
          Removes the nr-th IOObject which is of class cls.
 void removeAll()
          Removes all Objects from this IOContainer.
 IOObject removeElementAt(int index)
          Removes and returns the n-th IOObject in this container.
 int size()
          Returns the number of IOObjects in this container.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DUMMY_IO_CONTAINER

public static final IOContainer DUMMY_IO_CONTAINER
Constructor Detail

IOContainer

public IOContainer()
Creates a new and empty IOContainer.


IOContainer

public IOContainer(java.util.Collection<? extends IOObject> objectCollection)
Creates a new IOContainer containing the contents of the Collection which must contain only IOObjects.


IOContainer

public IOContainer(IOObject... objectArray)
Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

size

public int size()
Returns the number of IOObjects in this container.


getElementAt

public IOObject getElementAt(int index)
Returns the n-th IOObject in this container.


removeElementAt

public IOObject removeElementAt(int index)
Removes and returns the n-th IOObject in this container.


getIOObjects

public IOObject[] getIOObjects()
Returns all IOObjects.


get

public <T extends IOObject> T get(java.lang.Class<T> cls)
                       throws MissingIOObjectException
Gets the first IOObject which is of class cls.

Throws:
MissingIOObjectException

get

public <T extends IOObject> T get(java.lang.Class<T> cls,
                                  int nr)
                       throws MissingIOObjectException
Gets the nr-th IOObject which is of class cls.

Throws:
MissingIOObjectException

remove

public <T extends IOObject> T remove(java.lang.Class<T> cls)
                          throws MissingIOObjectException
Removes the first IOObject which is of class cls. The removed object is returned.

Throws:
MissingIOObjectException

remove

public <T extends IOObject> T remove(java.lang.Class<T> cls,
                                     int nr)
                          throws MissingIOObjectException
Removes the nr-th IOObject which is of class cls. The removed object is returned.

Throws:
MissingIOObjectException

contains

public boolean contains(java.lang.Class<? extends IOObject> cls)
Returns true if this IOContainer containts an IOObject of the desired class.


append

public IOContainer append(IOObject object)
Creates a new IOContainer by adding all IOObjects of this container to the given IOObject.


append

public IOContainer append(IOObject[] output)
Creates a new IOContainer by adding all IOObjects of this container to the given IOObjects.


prepend

public IOContainer prepend(IOObject object)
Creates a new IOContainer by adding the given object before the IOObjects of this container.


prepend

public IOContainer prepend(IOObject[] output)
Creates a new IOContainer by adding the given objects before the IOObjects of this container.


append

public IOContainer append(java.util.Collection<IOObject> output)
Appends this container's IOObjects to output.


copy

public IOContainer copy()
Copies the contents of this IOContainer by invoking the method copy of all IOObjects.


removeAll

public void removeAll()
Removes all Objects from this IOContainer.



Copyright © 2001-2009 by Rapid-I