public StatisticsType[] createTypesFromXml(Reader reader) throws IOException { return StatisticsTypeImpl.fromXml(reader, this); }
@Override public int hashCode() { return getName().hashCode(); } @Override
public final StatisticDescriptor nameToDescriptor(String name) { return this.type.nameToDescriptor(name); }
int intCount = realType.getIntStatCount(); int longCount = realType.getLongStatCount(); int doubleCount = realType.getDoubleStatCount();
@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; } }
public StatisticsType createType(String name, String description, StatisticDescriptor[] stats) { return addType(new StatisticsTypeImpl(name, description, stats)); } public StatisticsType findType(String name) {
public final int nameToId(String name) { return this.type.nameToId(name); }
public static Statistics createAtomicStatistics(StatisticsType type, String textId, long nId, long uId, StatisticsManager mgr) { Statistics result = null; if (((StatisticsTypeImpl) type).getDoubleStatCount() == 0 && !STRIPED_STATS_DISABLED) { result = new Atomic50StatisticsImpl(type, textId, nId, uId, mgr); } else { result = new LocalStatisticsImpl(type, textId, nId, uId, true, 0, mgr); } return result; }
int intCount = realType.getIntStatCount(); int longCount = realType.getLongStatCount(); int doubleCount = realType.getDoubleStatCount();
@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; } }
public StatisticsType createType(String name, String description, StatisticDescriptor[] stats) { return addType(new StatisticsTypeImpl(name, description, stats)); } public StatisticsType findType(String name) {
public final int nameToId(String name) { return this.type.nameToId(name); }
int intCount = realType.getIntStatCount(); int longCount = realType.getLongStatCount(); int doubleCount = realType.getDoubleStatCount();
@Override public int hashCode() { return getName().hashCode(); } @Override
public final StatisticDescriptor nameToDescriptor(String name) { return this.type.nameToDescriptor(name); }
public StatisticsType[] createTypesFromXml(Reader reader) throws IOException { return StatisticsTypeImpl.fromXml(reader, this); }
if (realType.getDoubleStatCount() > 0) { throw new IllegalArgumentException(LocalizedStrings.Atomic50StatisticsImpl_ATOMICS_DO_NOT_SUPPORT_DOUBLE_STATS.toLocalizedString()); int intCount = realType.getIntStatCount(); int longCount = realType.getLongStatCount();
@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(); } }
public final int nameToId(String name) { return nameToDescriptor(name).getId(); }
@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(); } }