adams.data.conversion
Class WekaPredictionContainerToSpreadSheet.SortContainer

java.lang.Object
  extended by adams.data.conversion.WekaPredictionContainerToSpreadSheet.SortContainer
All Implemented Interfaces:
Comparable<WekaPredictionContainerToSpreadSheet.SortContainer>
Enclosing class:
WekaPredictionContainerToSpreadSheet

public static class WekaPredictionContainerToSpreadSheet.SortContainer
extends Object
implements Comparable<WekaPredictionContainerToSpreadSheet.SortContainer>

Helper class for sorting the distribution.

Version:
$Revision: 4584 $
Author:
fracpete (fracpete at waikato dot ac dot nz)

Field Summary
protected  int m_Index
          the distribution index (0-based).
protected  double m_Probability
          the probability.
 
Constructor Summary
WekaPredictionContainerToSpreadSheet.SortContainer(int index, double probability)
          Initializes the container.
 
Method Summary
 int compareTo(WekaPredictionContainerToSpreadSheet.SortContainer o)
          Compares this object with the specified object for order.
 boolean equals(Object obj)
          Indicates whether some other object is "equal to" this one.
 int getIndex()
          Returns the index.
 double getProbability()
          Returns the probability.
 String toString()
          Returns a short string description of the container.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

m_Index

protected int m_Index
the distribution index (0-based).


m_Probability

protected double m_Probability
the probability.

Constructor Detail

WekaPredictionContainerToSpreadSheet.SortContainer

public WekaPredictionContainerToSpreadSheet.SortContainer(int index,
                                                          double probability)
Initializes the container.

Parameters:
index - the 0-based index in the distribution array
probability - the probability in the distribution
Method Detail

getIndex

public int getIndex()
Returns the index.

Returns:
the index

getProbability

public double getProbability()
Returns the probability.

Returns:
the probability

compareTo

public int compareTo(WekaPredictionContainerToSpreadSheet.SortContainer o)
Compares this object with the specified object for order. Returns a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.

Specified by:
compareTo in interface Comparable<WekaPredictionContainerToSpreadSheet.SortContainer>
Parameters:
o - the object to be compared.
Returns:
a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.

equals

public boolean equals(Object obj)
Indicates whether some other object is "equal to" this one.

Overrides:
equals in class Object
Parameters:
obj - the reference object with which to compare.
Returns:
true if this object is the same as the obj argument; false otherwise.

toString

public String toString()
Returns a short string description of the container.

Overrides:
toString in class Object
Returns:
the description


Copyright © 2012 University of Waikato, Hamilton, NZ. All Rights Reserved.