org.knime.core.data.model
Class PortObjectCell

java.lang.Object
  extended by org.knime.core.data.DataCell
      extended by org.knime.core.data.model.PortObjectCell
All Implemented Interfaces:
Serializable, DataValue, PortObjectValue

public class PortObjectCell
extends DataCell
implements PortObjectValue

Default implementation for a general port object.

Author:
Thomas Gabriel, KNIME.com AG, Zurich
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.knime.core.data.model.PortObjectValue
PortObjectValue.PortObjectUtilityFactory
 
Nested classes/interfaces inherited from interface org.knime.core.data.DataValue
DataValue.UtilityFactory
 
Field Summary
static DataType TYPE
          Convenience access member for DataType.getType(PortObjectCell.class).
 
Fields inherited from interface org.knime.core.data.model.PortObjectValue
UTILITY
 
Constructor Summary
PortObjectCell(PortObject content)
          Constructor for creating port object cell objects.
 
Method Summary
protected  boolean equalsDataCell(DataCell dc)
          Derived classes implement their specific equals function here.
static DataCellSerializer<PortObjectCell> getCellSerializer()
          Serializer as required by parent class.
 PortObject getPortObject()
          Get content of this port object.
static Class<? extends DataValue> getPreferredValueClass()
           
 int hashCode()
          This method must be implemented in order to ensure that two equal DataCell objects return the same hash code.
 String toString()
          Returns the String representation of this cell's value.
 
Methods inherited from class org.knime.core.data.DataCell
equals, getType, isMissing
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

TYPE

public static final DataType TYPE
Convenience access member for DataType.getType(PortObjectCell.class).

See Also:
DataType.getType(Class)
Constructor Detail

PortObjectCell

public PortObjectCell(PortObject content)
Constructor for creating port object cell objects.

Parameters:
content - The port object to wrap.
Method Detail

getPreferredValueClass

public static Class<? extends DataValue> getPreferredValueClass()
Returns:
PortObjectValue.class

getCellSerializer

public static DataCellSerializer<PortObjectCell> getCellSerializer()
Serializer as required by parent class.

Returns:
A serializer for reading/writing cells of this kind.

getPortObject

public PortObject getPortObject()
Get content of this port object.

Specified by:
getPortObject in interface PortObjectValue
Returns:
The PortObject content, never null.

toString

public String toString()
Returns the String representation of this cell's value.

Specified by:
toString in class DataCell
Returns:
a String representation of this cell's value

equalsDataCell

protected boolean equalsDataCell(DataCell dc)
Derived classes implement their specific equals function here. The argument is guaranteed to be not null or a missing value, to be of the same class like this.

Specified by:
equalsDataCell in class DataCell
Parameters:
dc - the cell to compare this to
Returns:
true if this is equal to the argument, false if not

hashCode

public int hashCode()
This method must be implemented in order to ensure that two equal DataCell objects return the same hash code.

Specified by:
hashCode in class DataCell
Returns:
the hash code of your specific DataCell
See Also:
Object.hashCode(), DataCell.equals(java.lang.Object)


Copyright, 2003 - 2012. All rights reserved.
University of Konstanz, Germany.
Chair for Bioinformatics and Information Mining, Prof. Dr. Michael R. Berthold.
You may not modify, publish, transmit, transfer or sell, reproduce, create derivative works from, distribute, perform, display, or in any way exploit any of the content, in whole or in part, except as otherwise expressly permitted in writing by the copyright owner or as specified in the license file distributed with this product.