|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.encog.persist.EncogMemoryCollection
public class EncogMemoryCollection
A memory based collection of Encog objects. Does not use the more complex temp file structure like EncogPersistedCollection, but also can't handle gigantic files. This class can load and save from/to Encog EG files.
| Constructor Summary | |
|---|---|
EncogMemoryCollection()
|
|
| Method Summary | |
|---|---|
void |
add(String name,
EncogPersistedObject obj)
Add an element to the collection. |
void |
buildDirectory()
Build the directory. |
void |
clear()
Clear all elements from the collection. |
void |
delete(DirectoryEntry object)
Delete an object from the collection. |
void |
delete(String key)
Delete a key from the collection. |
boolean |
exists(String key)
Determine if the specified key exists. |
EncogPersistedObject |
find(DirectoryEntry entry)
Find the object that corresponds to the specified directory entry, return null, if not found. |
EncogPersistedObject |
find(String key)
Find the object that corresponds to the specified key. |
Map<String,EncogPersistedObject> |
getContents()
|
List<DirectoryEntry> |
getDirectory()
|
String |
getEncogVersion()
|
int |
getFileVersion()
|
PersistenceLocation |
getLocation()
|
String |
getPlatform()
|
void |
load(PersistenceLocation location)
Load the contents of a location. |
void |
save(PersistenceLocation location)
Save the contents of this collection to a location. |
void |
updateProperties(String name,
String newName,
String desc)
Update the properties of an element in the collection. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public EncogMemoryCollection()
| Method Detail |
|---|
public void add(String name,
EncogPersistedObject obj)
add in interface EncogCollectionname - The name of the element being added.obj - The object to be added.public void buildDirectory()
buildDirectory in interface EncogCollectionpublic void clear()
clear in interface EncogCollectionpublic void delete(DirectoryEntry object)
delete in interface EncogCollectionobject - The object to be deleted.public void delete(String key)
delete in interface EncogCollectionkey - The key to delete.public boolean exists(String key)
exists in interface EncogCollectionkey - The key.
public EncogPersistedObject find(DirectoryEntry entry)
find in interface EncogCollectionentry - The entry to find.
public EncogPersistedObject find(String key)
find in interface EncogCollectionkey - The key to search for.
public Map<String,EncogPersistedObject> getContents()
public List<DirectoryEntry> getDirectory()
getDirectory in interface EncogCollectionpublic String getEncogVersion()
getEncogVersion in interface EncogCollectionpublic int getFileVersion()
getFileVersion in interface EncogCollectionpublic String getPlatform()
getPlatform in interface EncogCollectionpublic void load(PersistenceLocation location)
location - The location to load from.public void save(PersistenceLocation location)
location - The location to save to.
public void updateProperties(String name,
String newName,
String desc)
updateProperties in interface EncogCollectionname - The name of the object that is being updated.newName - The new name, can be the same as the old name, if the
description is to be updated only.desc - The new description.public PersistenceLocation getLocation()
getLocation in interface EncogCollection
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||