程序包 weka.gui

类 SortedTableModel.SortContainer

java.lang.Object
weka.gui.SortedTableModel.SortContainer
所有已实现的接口:
Comparable<SortedTableModel.SortContainer>
封闭类:
SortedTableModel

public static class SortedTableModel.SortContainer extends Object implements Comparable<SortedTableModel.SortContainer>
Helper class for sorting the columns.
  • 构造器详细资料

    • SortContainer

      public SortContainer(Comparable value, int index)
      Initializes the container.
      参数:
      value - the value to sort on
      index - the original index
  • 方法详细资料

    • getValue

      public Comparable getValue()
      Returns the value to sort on.
      返回:
      the value
    • getIndex

      public int getIndex()
      Returns the original index of the item.
      返回:
      the index
    • compareTo

      public int compareTo(SortedTableModel.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. Null is considered smallest. If both values are null, then 0 is returned.
      指定者:
      compareTo 在接口中 Comparable<SortedTableModel.SortContainer>
      参数:
      o - the object to be compared.
      返回:
      a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.
      抛出:
      ClassCastException - if the specified object's type prevents it from being compared to this object.
    • equals

      public boolean equals(Object obj)
      Indicates whether some other object is "equal to" this one.
      覆盖:
      equals 在类中 Object
      参数:
      obj - the reference object with which to compare.
      返回:
      true if this object is the same as the obj argument; false otherwise.
      抛出:
      ClassCastException - if the specified object's type prevents it from being compared to this object.
    • toString

      public String toString()
      Returns a string representation of the sort container.
      覆盖:
      toString 在类中 Object
      返回:
      the string representation (value + index)