List of usage examples for org.jfree.data.xy XYDataItem hashCode
@Override public int hashCode()
From source file:org.jfree.data.xy.XYSeries.java
/** * Returns a hash code./*from w w w . ja v a 2 s . c om*/ * * @return A hash code. */ public int hashCode() { int result = super.hashCode(); // it is too slow to look at every data item, so let's just look at // the first, middle and last items... int count = getItemCount(); if (count > 0) { XYDataItem item = getDataItem(0); result = 29 * result + item.hashCode(); } if (count > 1) { XYDataItem item = getDataItem(count - 1); result = 29 * result + item.hashCode(); } if (count > 2) { XYDataItem item = getDataItem(count / 2); result = 29 * result + item.hashCode(); } result = 29 * result + this.maximumItemCount; result = 29 * result + (this.autoSort ? 1 : 0); result = 29 * result + (this.allowDuplicateXValues ? 1 : 0); return result; }
From source file:org.jfree.data.xy.XYSeries.java
/** * Returns a hash code./* ww w . j av a2s . c o m*/ * * @return A hash code. */ public int hashCode() { int result = super.hashCode(); // it is too slow to look at every data item, so let's just look at // the first, middle and last items... int count = getItemCount(); if (count > 0) { XYDataItem item = getDataItem(0); result = 29 * result + item.hashCode(); } if (count > 1) { XYDataItem item = getDataItem(count - 1); result = 29 * result + item.hashCode(); } if (count > 2) { XYDataItem item = getDataItem(count / 2); result = 29 * result + item.hashCode(); } result = 29 * result + this.maximumItemCount; result = 29 * result + (this.autoSort ? 1 : 0); result = 29 * result + (this.allowDuplicateXValues ? 1 : 0); return result; }
From source file:org.jfree.data.xy.XYSeries.java
/** * Returns a hash code./* ww w . j a va2 s. c o m*/ * * @return A hash code. */ @Override public int hashCode() { int result = super.hashCode(); // it is too slow to look at every data item, so let's just look at // the first, middle and last items... int count = getItemCount(); if (count > 0) { XYDataItem item = getRawDataItem(0); result = 29 * result + item.hashCode(); } if (count > 1) { XYDataItem item = getRawDataItem(count - 1); result = 29 * result + item.hashCode(); } if (count > 2) { XYDataItem item = getRawDataItem(count / 2); result = 29 * result + item.hashCode(); } result = 29 * result + this.maximumItemCount; result = 29 * result + (this.autoSort ? 1 : 0); result = 29 * result + (this.allowDuplicateXValues ? 1 : 0); return result; }