@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; } }