@Test public void testCompareTo() { Property p1 = new Property("key1", PropertyValue.create(10)); Property p2 = new Property("key1", PropertyValue.create(10)); Property p3 = new Property("key2", PropertyValue.create(10)); assertEquals(0, p1.compareTo(p1)); assertEquals(0, p1.compareTo(p2)); assertTrue(p1.compareTo(p3) < 0); assertTrue(p3.compareTo(p1) > 0); }
@Override public int compareTo(Property o) { return this.getKey().compareTo(o.getKey()); }
Property implements Value, Serializable, Comparable<Property> { @Override public int compareTo(Property o) { return this.getKey().compareTo(o.getKey()); } }
Property implements Value, Serializable, Comparable<Property> { @Override public int compareTo(Property o) { return this.getKey().compareTo(o.getKey()); } Property();   Property(String key, PropertyValue value); }
Property implements Value, Serializable, Comparable<Property> { @Override public int compareTo(Property o) { return this.getKey().compareTo(o.getKey()); } Property();   Property(String key, PropertyValue value); static Property create(String key, PropertyValue value); static Property create(String key, Object value); String getKey(); void setKey(String key); PropertyValue getValue(); void setValue(PropertyValue value); @Override boolean equals(Object o); @Override int hashCode(); @Override int compareTo(Property o); @Override void write(DataOutputView outputView); @Override void read(DataInputView inputView); @Override String toString(); }
Property implements Value, Serializable, Comparable<Property> { @Override public int compareTo(Property o) { return this.getKey().compareTo(o.getKey()); } Property();   Property(String key, PropertyValue value); static Property create(String key, PropertyValue value); static Property create(String key, Object value); String getKey(); void setKey(String key); PropertyValue getValue(); void setValue(PropertyValue value); @Override boolean equals(Object o); @Override int hashCode(); @Override int compareTo(Property o); @Override void write(DataOutputView outputView); @Override void read(DataInputView inputView); @Override String toString();  }