当前位置: 首页>>代码示例>>Java>>正文


Java DefaultKeyedValues2D类代码示例

本文整理汇总了Java中org.jfree.data.DefaultKeyedValues2D的典型用法代码示例。如果您正苦于以下问题:Java DefaultKeyedValues2D类的具体用法?Java DefaultKeyedValues2D怎么用?Java DefaultKeyedValues2D使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


DefaultKeyedValues2D类属于org.jfree.data包,在下文中一共展示了DefaultKeyedValues2D类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: WaferMapDataset

import org.jfree.data.DefaultKeyedValues2D; //导入依赖的package包/类
/**
 * Creates a new dataset.
 * 
 * @param maxChipX  the wafer x-dimension. 
 * @param maxChipY  the wafer y-dimension.
 * @param chipSpace  the space between chips.
 */
public WaferMapDataset(final int maxChipX, final int maxChipY, final Number chipSpace) {
    
    this.maxValue = new Double(Double.NEGATIVE_INFINITY);
    this.minValue = new Double(Double.POSITIVE_INFINITY);
    this.data = new DefaultKeyedValues2D();
    
    this.maxChipX = maxChipX;
    this.maxChipY = maxChipY;
    if (chipSpace == null) {
        this.chipSpace = DEFAULT_CHIP_SPACE; 
    }
    else {
        this.chipSpace = chipSpace.doubleValue();
    }

}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:24,代码来源:WaferMapDataset.java

示例2: testGetColumnKey

import org.jfree.data.DefaultKeyedValues2D; //导入依赖的package包/类
/**
 * Some basic checks for the getColumnKey() method.
 */
public void testGetColumnKey() {
    DefaultKeyedValues2D d = new DefaultKeyedValues2D();
    boolean pass = false;
    try {
        d.getColumnKey(0);
    }
    catch (IndexOutOfBoundsException e) {
        pass = true;
    }
    assertTrue(pass);
    d.addValue(new Double(1.0), "R1", "C1");
    d.addValue(new Double(1.0), "R1", "C2");
    assertEquals("C1", d.getColumnKey(0));
    assertEquals("C2", d.getColumnKey(1));
}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:19,代码来源:DefaultKeyedValues2DTests.java

示例3: WaferMapDataset

import org.jfree.data.DefaultKeyedValues2D; //导入依赖的package包/类
/**
 * Creates a new dataset.
 * 
 * @param maxChipX  the wafer x-dimension. 
 * @param maxChipY  the wafer y-dimension.
 * @param chipSpace  the space between chips.
 */
public WaferMapDataset(int maxChipX, int maxChipY, Number chipSpace) {
    
    this.maxValue = new Double(Double.NEGATIVE_INFINITY);
    this.minValue = new Double(Double.POSITIVE_INFINITY);
    this.data = new DefaultKeyedValues2D();
    
    this.maxChipX = maxChipX;
    this.maxChipY = maxChipY;
    if (chipSpace == null) {
        this.chipSpace = DEFAULT_CHIP_SPACE; 
    }
    else {
        this.chipSpace = chipSpace.doubleValue();
    }

}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:24,代码来源:WaferMapDataset.java

示例4: WaferMapDataset

import org.jfree.data.DefaultKeyedValues2D; //导入依赖的package包/类
/**
 * Creates a new dataset.
 *
 * @param maxChipX  the wafer x-dimension.
 * @param maxChipY  the wafer y-dimension.
 * @param chipSpace  the space between chips.
 */
public WaferMapDataset(int maxChipX, int maxChipY, Number chipSpace) {

    this.maxValue = new Double(Double.NEGATIVE_INFINITY);
    this.minValue = new Double(Double.POSITIVE_INFINITY);
    this.data = new DefaultKeyedValues2D();

    this.maxChipX = maxChipX;
    this.maxChipY = maxChipY;
    if (chipSpace == null) {
        this.chipSpace = DEFAULT_CHIP_SPACE;
    }
    else {
        this.chipSpace = chipSpace.doubleValue();
    }

}
 
开发者ID:mdzio,项目名称:ccu-historian,代码行数:24,代码来源:WaferMapDataset.java

示例5: testRemoveColumnByKey

import org.jfree.data.DefaultKeyedValues2D; //导入依赖的package包/类
/**
 * Some basic checks for the removeColumn(Comparable) method.
 */
public void testRemoveColumnByKey() {
    DefaultKeyedValues2D d = new DefaultKeyedValues2D();
    d.addValue(new Double(1.0), "R1", "C1");
    d.addValue(new Double(2.0), "R2", "C2");
    d.removeColumn("C2");
    d.addValue(new Double(3.0), "R2", "C2");
    assertEquals(3.0, d.getValue("R2", "C2").doubleValue(), EPSILON);

    // check for unknown column
    boolean pass = false;
    try {
        d.removeColumn("XXX");
    }
    catch (UnknownKeyException e) {
        pass = true;
    }
    assertTrue(pass);
}
 
开发者ID:SpoonLabs,项目名称:astor,代码行数:22,代码来源:DefaultKeyedValues2DTests.java

示例6: testEquals

import org.jfree.data.DefaultKeyedValues2D; //导入依赖的package包/类
/**
 * Some checks for the equals() method.
 */
public void testEquals() {
    DefaultKeyedValues2D d1 = new DefaultKeyedValues2D();
    DefaultKeyedValues2D d2 = new DefaultKeyedValues2D();
    assertTrue(d1.equals(d2));
    assertTrue(d2.equals(d1));
    
    d1.addValue(new Double(1.0), new Double(2.0), "S1");
    assertFalse(d1.equals(d2));
    d2.addValue(new Double(1.0), new Double(2.0), "S1");
    assertTrue(d1.equals(d2));
}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:15,代码来源:DefaultKeyedValues2DTests.java

示例7: testSparsePopulation

import org.jfree.data.DefaultKeyedValues2D; //导入依赖的package包/类
/**
 * Populates a data structure with sparse entries, then checks that
 * the unspecified entries return null.
 */
public void testSparsePopulation() {
    DefaultKeyedValues2D d = new DefaultKeyedValues2D();
    d.addValue(new Integer(11), "R1", "C1");
    d.addValue(new Integer(22), "R2", "C2");
    
    assertEquals(new Integer(11), d.getValue("R1", "C1"));
    assertNull(d.getValue("R1", "C2"));
    assertEquals(new Integer(22), d.getValue("R2", "C2"));
    assertNull(d.getValue("R2", "C1"));
}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:15,代码来源:DefaultKeyedValues2DTests.java

示例8: testRowCount

import org.jfree.data.DefaultKeyedValues2D; //导入依赖的package包/类
/**
 * Some basic checks for the getRowCount() method.
 */
public void testRowCount() {
    DefaultKeyedValues2D d = new DefaultKeyedValues2D();
    assertEquals(0, d.getRowCount());
    d.addValue(new Double(1.0), "R1", "C1");
    assertEquals(1, d.getRowCount());
    d.addValue(new Double(2.0), "R2", "C1");
    assertEquals(2, d.getRowCount());
}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:12,代码来源:DefaultKeyedValues2DTests.java

示例9: testColumnCount

import org.jfree.data.DefaultKeyedValues2D; //导入依赖的package包/类
/**
 * Some basic checks for the getColumnCount() method.
 */
public void testColumnCount() {
    DefaultKeyedValues2D d = new DefaultKeyedValues2D();
    assertEquals(0, d.getColumnCount());
    d.addValue(new Double(1.0), "R1", "C1");
    assertEquals(1, d.getColumnCount());
    d.addValue(new Double(2.0), "R1", "C2");
    assertEquals(2, d.getColumnCount());
}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:12,代码来源:DefaultKeyedValues2DTests.java

示例10: testRemoveValue

import org.jfree.data.DefaultKeyedValues2D; //导入依赖的package包/类
/**
 * Some basic checks for the removeValue() method.
 */
public void testRemoveValue() {
    DefaultKeyedValues2D d = new DefaultKeyedValues2D();
    d.removeValue("R1", "C1");
    d.addValue(new Double(1.0), "R1", "C1");
    d.removeValue("R1", "C1");
    assertEquals(0, d.getRowCount());
    assertEquals(0, d.getColumnCount());
    
    d.addValue(new Double(1.0), "R1", "C1");
    d.addValue(new Double(2.0), "R2", "C1");
    d.removeValue("R1", "C1");
    assertEquals(new Double(2.0), d.getValue(0, 0));
}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:17,代码来源:DefaultKeyedValues2DTests.java

示例11: testRemoveRow

import org.jfree.data.DefaultKeyedValues2D; //导入依赖的package包/类
/**
 * Some basic checks for the removeRow() method.
 */
public void testRemoveRow() {
    DefaultKeyedValues2D d = new DefaultKeyedValues2D();
    boolean pass = false;
    try {
        d.removeRow(0);
    }
    catch (IndexOutOfBoundsException e) {
        pass = true;
    }
    assertTrue(pass);        
}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:15,代码来源:DefaultKeyedValues2DTests.java

示例12: testCalculateColumnTotal

import org.jfree.data.DefaultKeyedValues2D; //导入依赖的package包/类
/**
 * Some checks for the calculateColumnTotal() method.
 */
public void testCalculateColumnTotal() {
    DefaultKeyedValues2D table = new DefaultKeyedValues2D();
    table.addValue(new Double(1.0), "R0", "C0");
    table.addValue(new Double(2.0), "R0", "C1");
    table.addValue(new Double(3.0), "R1", "C0");
    table.addValue(new Double(4.0), "R1", "C1");
    assertEquals(4.0, DataUtilities.calculateColumnTotal(table, 0), EPSILON);
    assertEquals(6.0, DataUtilities.calculateColumnTotal(table, 1), EPSILON);
    table.setValue(null, "R1", "C1");
    assertEquals(2.0, DataUtilities.calculateColumnTotal(table, 1), EPSILON);
}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:15,代码来源:DataUtilitiesTests.java

示例13: testCalculateRowTotal

import org.jfree.data.DefaultKeyedValues2D; //导入依赖的package包/类
/**
 * Some checks for the calculateRowTotal() method.
 */
public void testCalculateRowTotal() {
    DefaultKeyedValues2D table = new DefaultKeyedValues2D();
    table.addValue(new Double(1.0), "R0", "C0");
    table.addValue(new Double(2.0), "R0", "C1");
    table.addValue(new Double(3.0), "R1", "C0");
    table.addValue(new Double(4.0), "R1", "C1");
    assertEquals(3.0, DataUtilities.calculateRowTotal(table, 0), EPSILON);
    assertEquals(7.0, DataUtilities.calculateRowTotal(table, 1), EPSILON);
    table.setValue(null, "R1", "C1");
    assertEquals(3.0, DataUtilities.calculateRowTotal(table, 1), EPSILON);
}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:15,代码来源:DataUtilitiesTests.java

示例14: TimeTableXYDataset

import org.jfree.data.DefaultKeyedValues2D; //导入依赖的package包/类
/**
 * Creates a new dataset with the given time zone and locale.
 * 
 * @param zone  the time zone to use (<code>null</code> not permitted).
 * @param locale  the locale to use (<code>null</code> not permitted).
 */
public TimeTableXYDataset(TimeZone zone, Locale locale) {
    if (zone == null) {
        throw new IllegalArgumentException("Null 'zone' argument.");
    }
    if (locale == null) {
        throw new IllegalArgumentException("Null 'locale' argument.");
    }
    this.values = new DefaultKeyedValues2D(true);
    this.workingCalendar = Calendar.getInstance(zone, locale);
    this.xPosition = TimePeriodAnchor.START;
}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:18,代码来源:TimeTableXYDataset.java

示例15: TimeTableXYDataset

import org.jfree.data.DefaultKeyedValues2D; //导入依赖的package包/类
/**
 * Creates a new dataset with the given time zone and locale.
 *
 * @param zone  the time zone to use (<code>null</code> not permitted).
 * @param locale  the locale to use (<code>null</code> not permitted).
 */
public TimeTableXYDataset(TimeZone zone, Locale locale) {
    ParamChecks.nullNotPermitted(zone, "zone");
    ParamChecks.nullNotPermitted(locale, "locale");
    this.values = new DefaultKeyedValues2D(true);
    this.workingCalendar = Calendar.getInstance(zone, locale);
    this.xPosition = TimePeriodAnchor.START;
}
 
开发者ID:mdzio,项目名称:ccu-historian,代码行数:14,代码来源:TimeTableXYDataset.java


注:本文中的org.jfree.data.DefaultKeyedValues2D类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。