@Override public int hashCode() { return getName().hashCode(); } @Override
@Override public int hashCode() { return getName().hashCode(); } @Override
@Override public String toString() { final StringBuilder sb = new StringBuilder(getClass().getName()); sb.append("@").append(System.identityHashCode(this)).append("{"); sb.append("uniqueId=").append(this.uniqueId); sb.append(", numericId=").append(this.numericId); sb.append(", textId=").append(this.textId); sb.append(", type=").append(this.type.getName()); sb.append(", closed=").append(this.closed); sb.append("}"); return sb.toString(); } }
@Override public String toString() { final StringBuilder sb = new StringBuilder(getClass().getName()); sb.append("@").append(System.identityHashCode(this)).append("{"); sb.append("uniqueId=").append(this.uniqueId); sb.append(", numericId=").append(this.numericId); sb.append(", textId=").append(this.textId); sb.append(", type=").append(this.type.getName()); sb.append(", closed=").append(this.closed); sb.append("}"); return sb.toString(); } }
@Override public boolean equals(Object o) { if (o == null) { return false; } if (!(o instanceof StatisticsType)) { return false; } StatisticsType other = (StatisticsType)o; if (!getName().equals(other.getName())) { return false; } if (!getDescription().equals(other.getDescription())) { return false; } StatisticDescriptor[] myStats = getStatistics(); StatisticDescriptor[] yourStats = other.getStatistics(); if (myStats.length != yourStats.length) { return false; } for (int i=0; i < myStats.length; i++) { if (!myStats[i].equals(yourStats[i])) { return false; } } return true; } }
@Override public boolean equals(Object o) { if (o == null) { return false; } if (!(o instanceof StatisticsType)) { return false; } StatisticsType other = (StatisticsType)o; if (!getName().equals(other.getName())) { return false; } if (!getDescription().equals(other.getDescription())) { return false; } StatisticDescriptor[] myStats = getStatistics(); StatisticDescriptor[] yourStats = other.getStatistics(); if (myStats.length != yourStats.length) { return false; } for (int i=0; i < myStats.length; i++) { if (!myStats[i].equals(yourStats[i])) { return false; } } return true; } }