The Encog Project

org.encog.neural.data
Class PropertyData

java.lang.Object
  extended by org.encog.neural.data.PropertyData
All Implemented Interfaces:
java.io.Serializable, EncogPersistedObject

public class PropertyData
extends java.lang.Object
implements EncogPersistedObject

An Encog data object that can be used to hold property data. This is a collection of name-value pairs that can be saved in an Encog persisted file.

Author:
jheaton
See Also:
Serialized Form

Constructor Summary
PropertyData()
           
 
Method Summary
 java.lang.Object clone()
          Clone this object.
 Persistor createPersistor()
          Create a persistor for this object.
 java.lang.String get(java.lang.String name)
          Get the specified property.
 java.util.Map<java.lang.String,java.lang.String> getData()
          Get all of the property data as a map.
 java.util.Date getDate(java.lang.String field)
          Get a property as a date.
 java.lang.String getDescription()
           
 double getDouble(java.lang.String field)
          Get a property as a double.
 int getInteger(java.lang.String field)
          Get a property as an integer.
 java.lang.String getName()
           
 boolean isDefined(java.lang.String key)
          Determine of the specified property is defined.
 void remove(java.lang.String key)
          Remove the specified property.
 void set(java.lang.String name, java.lang.String value)
          Set the specified property.
 void setDescription(java.lang.String description)
          Set the description for this object.
 void setName(java.lang.String name)
          Set the name of this property.
 int size()
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PropertyData

public PropertyData()
Method Detail

clone

public java.lang.Object clone()
Clone this object.

Overrides:
clone in class java.lang.Object
Returns:
A clonned version of this object.

createPersistor

public Persistor createPersistor()
Description copied from interface: EncogPersistedObject
Create a persistor for this object.

Specified by:
createPersistor in interface EncogPersistedObject
Returns:
A persistor for the property data.

get

public java.lang.String get(java.lang.String name)
Get the specified property.

Parameters:
name - The property name.
Returns:
The property value.

getData

public java.util.Map<java.lang.String,java.lang.String> getData()
Get all of the property data as a map.

Returns:
The property data.

getDate

public java.util.Date getDate(java.lang.String field)
Get a property as a date.

Parameters:
field - The name of the field.
Returns:
The date value.

getDescription

public java.lang.String getDescription()
Specified by:
getDescription in interface EncogPersistedObject
Returns:
The description of this object.

getDouble

public double getDouble(java.lang.String field)
Get a property as a double.

Parameters:
field - The name of the field.
Returns:
The double value.

getInteger

public int getInteger(java.lang.String field)
Get a property as an integer.

Parameters:
field - The name of the field.
Returns:
The integer value.

getName

public java.lang.String getName()
Specified by:
getName in interface EncogPersistedObject
Returns:
The name of this object.

isDefined

public boolean isDefined(java.lang.String key)
Determine of the specified property is defined.

Parameters:
key - The property to check.
Returns:
True if this property is defined.

remove

public void remove(java.lang.String key)
Remove the specified property.

Parameters:
key - The property to remove.

set

public void set(java.lang.String name,
                java.lang.String value)
Set the specified property.

Parameters:
name - The name of the property.
value - The value to set the property to.

setDescription

public void setDescription(java.lang.String description)
Set the description for this object.

Specified by:
setDescription in interface EncogPersistedObject
Parameters:
description - The description of this property.

setName

public void setName(java.lang.String name)
Set the name of this property.

Specified by:
setName in interface EncogPersistedObject
Parameters:
name - The name of this property.

size

public int size()
Returns:
The number of properties defined.

The Encog Project