Java Code Examples for org.jfree.data.general.PieDataset#getKey()
The following examples show how to use
org.jfree.data.general.PieDataset#getKey() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: CategoryToPieDataset.java From openstock with GNU General Public License v3.0 | 5 votes |
/** * Tests this dataset for equality with an arbitrary object, returning * <code>true</code> if <code>obj</code> is a dataset containing the same * keys and values in the same order as this dataset. * * @param obj the object to test (<code>null</code> permitted). * * @return A boolean. */ @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof PieDataset)) { return false; } PieDataset that = (PieDataset) obj; int count = getItemCount(); if (that.getItemCount() != count) { return false; } for (int i = 0; i < count; i++) { Comparable k1 = getKey(i); Comparable k2 = that.getKey(i); if (!k1.equals(k2)) { return false; } Number v1 = getValue(i); Number v2 = that.getValue(i); if (v1 == null) { if (v2 != null) { return false; } } else { if (!v1.equals(v2)) { return false; } } } return true; }
Example 2
Source File: CategoryToPieDataset.java From ccu-historian with GNU General Public License v3.0 | 5 votes |
/** * Tests this dataset for equality with an arbitrary object, returning * <code>true</code> if <code>obj</code> is a dataset containing the same * keys and values in the same order as this dataset. * * @param obj the object to test (<code>null</code> permitted). * * @return A boolean. */ @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof PieDataset)) { return false; } PieDataset that = (PieDataset) obj; int count = getItemCount(); if (that.getItemCount() != count) { return false; } for (int i = 0; i < count; i++) { Comparable k1 = getKey(i); Comparable k2 = that.getKey(i); if (!k1.equals(k2)) { return false; } Number v1 = getValue(i); Number v2 = that.getValue(i); if (v1 == null) { if (v2 != null) { return false; } } else { if (!v1.equals(v2)) { return false; } } } return true; }
Example 3
Source File: CategoryToPieDataset.java From SIMVA-SoS with Apache License 2.0 | 5 votes |
/** * Tests this dataset for equality with an arbitrary object, returning * <code>true</code> if <code>obj</code> is a dataset containing the same * keys and values in the same order as this dataset. * * @param obj the object to test (<code>null</code> permitted). * * @return A boolean. */ @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof PieDataset)) { return false; } PieDataset that = (PieDataset) obj; int count = getItemCount(); if (that.getItemCount() != count) { return false; } for (int i = 0; i < count; i++) { Comparable k1 = getKey(i); Comparable k2 = that.getKey(i); if (!k1.equals(k2)) { return false; } Number v1 = getValue(i); Number v2 = that.getValue(i); if (v1 == null) { if (v2 != null) { return false; } } else { if (!v1.equals(v2)) { return false; } } } return true; }
Example 4
Source File: CategoryToPieDataset.java From ECG-Viewer with GNU General Public License v2.0 | 5 votes |
/** * Tests this dataset for equality with an arbitrary object, returning * <code>true</code> if <code>obj</code> is a dataset containing the same * keys and values in the same order as this dataset. * * @param obj the object to test (<code>null</code> permitted). * * @return A boolean. */ @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof PieDataset)) { return false; } PieDataset that = (PieDataset) obj; int count = getItemCount(); if (that.getItemCount() != count) { return false; } for (int i = 0; i < count; i++) { Comparable k1 = getKey(i); Comparable k2 = that.getKey(i); if (!k1.equals(k2)) { return false; } Number v1 = getValue(i); Number v2 = that.getValue(i); if (v1 == null) { if (v2 != null) { return false; } } else { if (!v1.equals(v2)) { return false; } } } return true; }
Example 5
Source File: CategoryToPieDataset.java From astor with GNU General Public License v2.0 | 5 votes |
/** * Tests this dataset for equality with an arbitrary object, returning * <code>true</code> if <code>obj</code> is a dataset containing the same * keys and values in the same order as this dataset. * * @param obj the object to test (<code>null</code> permitted). * * @return A boolean. */ public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof PieDataset)) { return false; } PieDataset that = (PieDataset) obj; int count = getItemCount(); if (that.getItemCount() != count) { return false; } for (int i = 0; i < count; i++) { Comparable k1 = getKey(i); Comparable k2 = that.getKey(i); if (!k1.equals(k2)) { return false; } Number v1 = getValue(i); Number v2 = that.getValue(i); if (v1 == null) { if (v2 != null) { return false; } } else { if (!v1.equals(v2)) { return false; } } } return true; }
Example 6
Source File: CategoryToPieDataset.java From opensim-gui with Apache License 2.0 | 5 votes |
/** * Tests this dataset for equality with an arbitrary object, returning * <code>true</code> if <code>obj</code> is a dataset containing the same * keys and values in the same order as this dataset. * * @param obj the object to test (<code>null</code> permitted). * * @return A boolean. */ public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof PieDataset)) { return false; } PieDataset that = (PieDataset) obj; int count = getItemCount(); if (that.getItemCount() != count) { return false; } for (int i = 0; i < count; i++) { Comparable k1 = getKey(i); Comparable k2 = that.getKey(i); if (!k1.equals(k2)) { return false; } Number v1 = getValue(i); Number v2 = that.getValue(i); if (v1 == null) { if (v2 != null) { return false; } } else { if (!v1.equals(v2)) { return false; } } } return true; }
Example 7
Source File: CategoryToPieDataset.java From buffer_bci with GNU General Public License v3.0 | 5 votes |
/** * Tests this dataset for equality with an arbitrary object, returning * <code>true</code> if <code>obj</code> is a dataset containing the same * keys and values in the same order as this dataset. * * @param obj the object to test (<code>null</code> permitted). * * @return A boolean. */ @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof PieDataset)) { return false; } PieDataset that = (PieDataset) obj; int count = getItemCount(); if (that.getItemCount() != count) { return false; } for (int i = 0; i < count; i++) { Comparable k1 = getKey(i); Comparable k2 = that.getKey(i); if (!k1.equals(k2)) { return false; } Number v1 = getValue(i); Number v2 = that.getValue(i); if (v1 == null) { if (v2 != null) { return false; } } else { if (!v1.equals(v2)) { return false; } } } return true; }
Example 8
Source File: CategoryToPieDataset.java From buffer_bci with GNU General Public License v3.0 | 5 votes |
/** * Tests this dataset for equality with an arbitrary object, returning * <code>true</code> if <code>obj</code> is a dataset containing the same * keys and values in the same order as this dataset. * * @param obj the object to test (<code>null</code> permitted). * * @return A boolean. */ @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof PieDataset)) { return false; } PieDataset that = (PieDataset) obj; int count = getItemCount(); if (that.getItemCount() != count) { return false; } for (int i = 0; i < count; i++) { Comparable k1 = getKey(i); Comparable k2 = that.getKey(i); if (!k1.equals(k2)) { return false; } Number v1 = getValue(i); Number v2 = that.getValue(i); if (v1 == null) { if (v2 != null) { return false; } } else { if (!v1.equals(v2)) { return false; } } } return true; }