org.encog.neural.data
Class PropertyData

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

public class PropertyData
extends BasicPersistedObject

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
 Object clone()
          Clone this object.
 Persistor createPersistor()
          Create a persistor for this object.
 String get(String name)
          Get the specified property.
 Map<String,String> getData()
          Get all of the property data as a map.
 Date getDate(String field)
          Get a property as a date.
 double getDouble(String field)
          Get a property as a double.
 int getInteger(String field)
          Get a property as an integer.
 boolean isDefined(String key)
          Determine of the specified property is defined.
 void remove(String key)
          Remove the specified property.
 void set(String name, String value)
          Set the specified property.
 int size()
           
 
Methods inherited from class org.encog.persist.BasicPersistedObject
getCollection, getDescription, getName, setCollection, setDescription, setName
 
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 Object clone()
Clone this object.

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

createPersistor

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

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

get

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

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

getData

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

Returns:
The property data.

getDate

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

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

getDouble

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

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

getInteger

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

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

isDefined

public boolean isDefined(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(String key)
Remove the specified property.

Parameters:
key - The property to remove.

set

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

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

size

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


Copyright © 2011. All Rights Reserved.