Enum Class MemoryProfile
- All Implemented Interfaces:
Serializable, Comparable<MemoryProfile>, Constable
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum Constants -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic intThe time base states "how long a second lasts in milliseconds".
The default value is obviously 1000, but you can alter this value to accelerate (or slow down) the behaviour of the memory storage.
For instance, if you settimeBase = 500, the actual duration a short term statement is divided by 2 (ie 5 seconds instead of the default 10 seconds) -
Method Summary
Modifier and TypeMethodDescriptionintduration()Returns the lifespan associated to the memory profile, in milliseconds, scaled with the TimeBase.static MemoryProfilefromString(String literalMemProfile) Returns a MemoryProfile constant from its string representation, orDEFAULTif the string is not recognized.static MemoryProfileReturns the enum constant of this class with the specified name.static MemoryProfile[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
SHORTTERM
This represents short term memory (or working memory). A statement added in short term memory is held for 10 seconds. -
EPISODIC
This represents episodic memory (memory of personal experience). A statement added in episodic memory is held for 5 minutes. -
LONGTERM
This represents long term memory. A statement added in long term memory is never forgotten. -
DEFAULT
Default memory profile is equivalent to the long term memory profile.- See Also:
-
-
Field Details
-
TimeBase
public static int TimeBaseThe time base states "how long a second lasts in milliseconds".
The default value is obviously 1000, but you can alter this value to accelerate (or slow down) the behaviour of the memory storage.
For instance, if you settimeBase = 500, the actual duration a short term statement is divided by 2 (ie 5 seconds instead of the default 10 seconds)
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
duration
public int duration()Returns the lifespan associated to the memory profile, in milliseconds, scaled with the TimeBase.- Returns:
- the lifespan associated to the memory profile, in milliseconds
- See Also:
-
fromString
Returns a MemoryProfile constant from its string representation, orDEFAULTif the string is not recognized.- Parameters:
literalMemProfile- the string representation of a MemoryProfile- Returns:
- The corresponding MemoryProfile constant.
-