gov.nih.nci.caarray.external.v1_0.data
Class StringColumn

java.lang.Object
  extended by gov.nih.nci.caarray.external.v1_0.data.AbstractDataColumn
      extended by gov.nih.nci.caarray.external.v1_0.data.StringColumn
All Implemented Interfaces:
java.io.Externalizable, java.io.Serializable

public final class StringColumn
extends AbstractDataColumn

A StringColumn represents a data column with string values.

Author:
dkokotov
See Also:
Serialized Form

Field Summary
 
Fields inherited from class gov.nih.nci.caarray.external.v1_0.data.AbstractDataColumn
SEPARATOR
 
Constructor Summary
StringColumn()
           
 
Method Summary
protected  java.io.Serializable getSerializableValues()
          Get the values array of this column.
 java.lang.String[] getValues()
           
 java.lang.String getValuesAsString()
           
protected  void setSerializableValues(java.io.Serializable serValues)
          Set the values array of this column.
 void setValues(java.lang.String[] values)
           
 void setValuesAsString(java.lang.String s)
          Sets the values of this column from a string, which must contain a comma-separated list of strings.
 
Methods inherited from class gov.nih.nci.caarray.external.v1_0.data.AbstractDataColumn
equals, getQuantitationType, hashCode, readExternal, setQuantitationType, writeExternal
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StringColumn

public StringColumn()
Method Detail

getValues

public java.lang.String[] getValues()
Returns:
the values

setValues

public void setValues(java.lang.String[] values)
Parameters:
values - the values to set

getSerializableValues

protected java.io.Serializable getSerializableValues()
Get the values array of this column. This should be implemented by a simple call to getValues in the subclasses; this separate method is only needed because generics do not work well with primitive arrays.

Specified by:
getSerializableValues in class AbstractDataColumn
Returns:
the values array for this column

setSerializableValues

protected void setSerializableValues(java.io.Serializable serValues)
Set the values array of this column. This should be implemented by a simple call to setValues in the subclasses; this separate method is only needed because generics do not work well with primitive arrays.

Specified by:
setSerializableValues in class AbstractDataColumn
Parameters:
serValues - the values array to set

getValuesAsString

public java.lang.String getValuesAsString()
Returns:
the values of this column as a comma-separated string. Each value will be encoded in this string by escaping any commas in the value with a backslash.

setValuesAsString

public void setValuesAsString(java.lang.String s)
Sets the values of this column from a string, which must contain a comma-separated list of strings. Each such string will be unescaped by converting any backslash-comma combinations back to commas.

Parameters:
s - string containing a comma-separated list of strings.