本文整理汇总了Java中org.jfree.data.ComparableObjectItem类的典型用法代码示例。如果您正苦于以下问题:Java ComparableObjectItem类的具体用法?Java ComparableObjectItem怎么用?Java ComparableObjectItem使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ComparableObjectItem类属于org.jfree.data包,在下文中一共展示了ComparableObjectItem类的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: testConstructor
import org.jfree.data.ComparableObjectItem; //导入依赖的package包/类
/**
* Some checks for the constructor.
*/
public void testConstructor() {
// check null argument 1
boolean pass = false;
try {
/* ComparableObjectItem item1 = */ new ComparableObjectItem(null,
"XYZ");
}
catch (IllegalArgumentException e) {
pass = true;
}
assertTrue(pass);
}
示例2: testCompareTo
import org.jfree.data.ComparableObjectItem; //导入依赖的package包/类
/**
* Some checks for the compareTo() method.
*/
public void testCompareTo() {
ComparableObjectItem item1 = new ComparableObjectItem(new Integer(1),
"XYZ");
ComparableObjectItem item2 = new ComparableObjectItem(new Integer(2),
"XYZ");
ComparableObjectItem item3 = new ComparableObjectItem(new Integer(3),
"XYZ");
ComparableObjectItem item4 = new ComparableObjectItem(new Integer(1),
"XYZ");
assertTrue(item2.compareTo(item1) > 0);
assertTrue(item3.compareTo(item1) > 0);
assertTrue(item4.compareTo(item1) == 0);
assertTrue(item1.compareTo(item2) < 0);
}
示例3: testConstructor
import org.jfree.data.ComparableObjectItem; //导入依赖的package包/类
/**
* Some checks for the constructor.
*/
public void testConstructor() {
// check null argument 1
boolean pass = false;
try {
/* ComparableObjectItem item1 = */ new ComparableObjectItem(null,
"XYZ");
}
catch (IllegalArgumentException e) {
pass = true;
}
assertTrue(pass);
}
示例4: testCompareTo
import org.jfree.data.ComparableObjectItem; //导入依赖的package包/类
/**
* Some checks for the compareTo() method.
*/
public void testCompareTo() {
ComparableObjectItem item1 = new ComparableObjectItem(new Integer(1),
"XYZ");
ComparableObjectItem item2 = new ComparableObjectItem(new Integer(2),
"XYZ");
ComparableObjectItem item3 = new ComparableObjectItem(new Integer(3),
"XYZ");
ComparableObjectItem item4 = new ComparableObjectItem(new Integer(1),
"XYZ");
assertTrue(item2.compareTo(item1) > 0);
assertTrue(item3.compareTo(item1) > 0);
assertTrue(item4.compareTo(item1) == 0);
assertTrue(item1.compareTo(item2) < 0);
}
示例5: remove
import org.jfree.data.ComparableObjectItem; //导入依赖的package包/类
public ComparableObjectItem remove(Comparable x) {
return super.remove(x);
}
示例6: remove
import org.jfree.data.ComparableObjectItem; //导入依赖的package包/类
/**
* Removes the item at the specified index and sends a
* {@link SeriesChangeEvent} to all registered listeners.
*
* @param index the index.
*
* @return The item removed.
*/
@Override
public ComparableObjectItem remove(int index) {
VectorDataItem result = (VectorDataItem) this.data.remove(index);
fireSeriesChanged();
return result;
}
示例7: getDataItem
import org.jfree.data.ComparableObjectItem; //导入依赖的package包/类
/**
* Returns the data item at the specified index.
*
* @param index the item index.
*
* @return The data item.
*/
public ComparableObjectItem getDataItem(int index) {
// overridden to make public
return super.getDataItem(index);
}
示例8: getDataItem
import org.jfree.data.ComparableObjectItem; //导入依赖的package包/类
/**
* Returns the data item at the specified index.
*
* @param index the item index.
*
* @return The data item.
*/
public ComparableObjectItem getDataItem(int index) {
return super.getDataItem(index);
}
示例9: getDataItem
import org.jfree.data.ComparableObjectItem; //导入依赖的package包/类
/**
* Returns the data item at the specified index.
*
* @param index the item index.
*
* @return The data item.
*/
@Override
public ComparableObjectItem getDataItem(int index) {
return super.getDataItem(index);
}
示例10: remove
import org.jfree.data.ComparableObjectItem; //导入依赖的package包/类
/**
* Removes the item with the specified index.
*
* @param index the item index.
*
* @since 1.0.14
*/
@Override
public ComparableObjectItem remove(int index) {
return super.remove(index);
}
示例11: getDataItem
import org.jfree.data.ComparableObjectItem; //导入依赖的package包/类
/**
* Returns the data item at the specified index.
*
* @param index the item index.
*
* @return The data item.
*/
@Override
public ComparableObjectItem getDataItem(int index) {
// overridden to make public
return super.getDataItem(index);
}
示例12: remove
import org.jfree.data.ComparableObjectItem; //导入依赖的package包/类
/**
* Removes the item with the specified index.
*
* @param index the item index.
*
* @return The item removed.
*
* @since 1.0.14
*/
@Override
public ComparableObjectItem remove(int index) {
return super.remove(index);
}