JavaTM 2 Platform
Standard Ed. 6

javax.swing
类 RowSorter.SortKey

java.lang.Object
  继承者 javax.swing.RowSorter.SortKey
正在封闭类:
RowSorter<M>

public static class RowSorter.SortKey
extends Object

SortKey 描述特定列的排序顺序。列索引是基于底层模型的,它可能不同于视图的列索引。

从以下版本开始:
1.6

构造方法摘要
RowSorter.SortKey(int column, SortOrder sortOrder)
          使用指定的排序顺序创建指定列的 SortKey
 
方法摘要
 boolean equals(Object o)
          如果此对象与指定对象相等,则返回 true。
 int getColumn()
          返回列的索引。
 SortOrder getSortOrder()
          返回列的排序顺序。
 int hashCode()
          返回此 SortKey 的哈希码。
 
从类 java.lang.Object 继承的方法
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

构造方法详细信息

RowSorter.SortKey

public RowSorter.SortKey(int column,
                         SortOrder sortOrder)
使用指定的排序顺序创建指定列的 SortKey

参数:
column - 列索引,就模型而言
sortOrder - 排序顺序
抛出:
IllegalArgumentException - 如果 sortOrdernull
方法详细信息

getColumn

public final int getColumn()
返回列的索引。

返回:
列的索引

getSortOrder

public final SortOrder getSortOrder()
返回列的排序顺序。

返回:
列的排序顺序

hashCode

public int hashCode()
返回此 SortKey 的哈希码。

覆盖:
Object 中的 hashCode
返回:
哈希码
另请参见:
Object.equals(java.lang.Object), Hashtable

equals

public boolean equals(Object o)
如果此对象与指定对象相等,则返回 true。如果指定的对象是一个 SortKey 并且引用相同的列和排序顺序,则这两个对象相等。

覆盖:
Object 中的 equals
参数:
o - 要比较的对象
返回:
如果 o 等于此 SortKey,则返回 true
另请参见:
Object.hashCode(), Hashtable

JavaTM 2 Platform
Standard Ed. 6

提交错误或意见

版权所有 2008 Sun Microsystems, Inc. 保留所有权利。请遵守GNU General Public License, version 2 only