clarion.common
Class SortableElement

java.lang.Object
  extended byclarion.common.SortableElement
All Implemented Interfaces:
java.lang.Comparable

public class SortableElement
extends java.lang.Object
implements java.lang.Comparable


Field Summary
protected  double activation
           
protected  int chunkIdx
           
 
Constructor Summary
SortableElement(double activation, int chunkIdx)
          constructor.
 
Method Summary
 int compareTo(java.lang.Object obj)
          compare two SortableElement objects.
 int getChunkIdx()
          returns chunk index.
 double getKeyValue()
          returns key value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

activation

protected double activation

chunkIdx

protected int chunkIdx
Constructor Detail

SortableElement

public SortableElement(double activation,
                       int chunkIdx)
constructor.

Parameters:
activation - the chunk activation.
Method Detail

getKeyValue

public double getKeyValue()
returns key value.

Returns:
the activation.

getChunkIdx

public int getChunkIdx()
returns chunk index.

Returns:
chunk index.

compareTo

public int compareTo(java.lang.Object obj)
              throws java.lang.ClassCastException
compare two SortableElement objects.

Specified by:
compareTo in interface java.lang.Comparable
Returns:
compValue > 0: this element precedences the other element. = 0: this element is equal to the other element.. < 0: this element is behind the other element.
Throws:
java.lang.ClassCastException