The Encog Project

org.encog.persist
Class DirectoryEntry

java.lang.Object
  extended by org.encog.persist.DirectoryEntry
All Implemented Interfaces:
java.lang.Comparable<DirectoryEntry>

public class DirectoryEntry
extends java.lang.Object
implements java.lang.Comparable<DirectoryEntry>

The idea of the Encog persisted collection is that the entire file might be quite long and should not be read into memory in its entirity. Directory entry classes allow you to list the contents of a file without loading the entire file.

Author:
jheaton

Constructor Summary
DirectoryEntry(EncogPersistedObject obj)
          Construct a directory entry for the specified object.
DirectoryEntry(java.lang.String type, java.lang.String name, java.lang.String description)
          Construct a directory entry from strings.
 
Method Summary
 int compareTo(DirectoryEntry other)
          Compare the two objects.
 boolean equals(java.lang.Object other)
          Returns true if the two objects are equal.
 java.lang.String getDescription()
           
 java.lang.String getName()
           
 java.lang.String getType()
           
 int hashCode()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DirectoryEntry

public DirectoryEntry(EncogPersistedObject obj)
Construct a directory entry for the specified object.

Parameters:
obj - The Encog object.

DirectoryEntry

public DirectoryEntry(java.lang.String type,
                      java.lang.String name,
                      java.lang.String description)
Construct a directory entry from strings.

Parameters:
type - The type of object.
name - The name of this object.
description - The description for this object.
Method Detail

compareTo

public int compareTo(DirectoryEntry other)
Compare the two objects.

Specified by:
compareTo in interface java.lang.Comparable<DirectoryEntry>
Parameters:
other - The other object.
Returns:
0 if equal.

equals

public boolean equals(java.lang.Object other)
Returns true if the two objects are equal.

Overrides:
equals in class java.lang.Object
Parameters:
other - The other object.
Returns:
True if equal.

getDescription

public java.lang.String getDescription()
Returns:
The description for this object.

getName

public java.lang.String getName()
Returns:
The name of this object.

getType

public java.lang.String getType()
Returns:
The type of this object.

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object
Returns:
A simple hash code for this object.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object
Returns:
This object as a string.

The Encog Project