@Test public void compareTo() { Set<AttributeInformation> infoSet = new HashSet<AttributeInformation>(); AttributeInformation attr; attr = new AttributeInformation(); attr.setIdentifier(10); infoSet.add(attr); attr = new AttributeInformation(); attr.setIdentifier(9); infoSet.add(attr); attr = new AttributeInformation(); attr.setIdentifier(6); infoSet.add(attr); assertEquals(3, infoSet.size()); assertEquals(10, Collections.max(infoSet).getIdentifier()); }
@Override public int compareTo(AttributeInformation other) { return Integer.compare(identifier, other.getIdentifier()); }
AttributeInformation implements ZclListItemField, Comparable<AttributeInformation> { @Override public int compareTo(AttributeInformation other) { return Integer.compare(identifier, other.getIdentifier()); } }
AttributeInformation implements ZclListItemField, Comparable<AttributeInformation> { @Override public int compareTo(AttributeInformation other) { return Integer.compare(identifier, other.getIdentifier()); }  }
AttributeInformation implements ZclListItemField, Comparable<AttributeInformation> { @Override public int compareTo(AttributeInformation other) { return Integer.compare(identifier, other.getIdentifier()); }  ZclDataType getDataType(); void setDataType(ZclDataType dataType); int getIdentifier(); void setIdentifier(int identifier); @Override void serialize(final ZigBeeSerializer serializer); @Override void deserialize(final ZigBeeDeserializer deserializer); @Override int compareTo(AttributeInformation other); @Override String toString(); }
AttributeInformation implements ZclListItemField, Comparable<AttributeInformation> { @Override public int compareTo(AttributeInformation other) { return Integer.compare(identifier, other.getIdentifier()); }  ZclDataType getDataType(); void setDataType(ZclDataType dataType); int getIdentifier(); void setIdentifier(int identifier); @Override void serialize(final ZigBeeSerializer serializer); @Override void deserialize(final ZigBeeDeserializer deserializer); @Override int compareTo(AttributeInformation other); @Override String toString();  }