@Test public void testCompareToWhenItemOrderingNameIsGreaterThanObjectOrderingName() { final DecisionNavigatorItem item = new DecisionNavigatorItemBuilder().withUUID("123").withLabel("Hat").build(); final Object object = new DecisionNavigatorItemBuilder().withUUID("456").withLabel("Red").build(); final int result = item.compareTo(object); assertTrue(result < 0); }
@Override public int compareTo(final Object o) { if (o == null || getClass() != o.getClass()) { return 1; } final DecisionNavigatorItem that = (DecisionNavigatorItem) o; if (this.equals(that)) { return 0; } else { return getOrderingName().compareTo(that.getOrderingName()); } }
DecisionNavigatorItem implements Comparable { @Override public int compareTo(final Object o) { if (o == null || getClass() != o.getClass()) { return 1; } final DecisionNavigatorItem that = (DecisionNavigatorItem) o; if (this.equals(that)) { return 0; } else { return getOrderingName().compareTo(that.getOrderingName()); } } }
DecisionNavigatorItem implements Comparable { @Override public int compareTo(final Object o) { if (o == null || getClass() != o.getClass()) { return 1; } final DecisionNavigatorItem that = (DecisionNavigatorItem) o; if (this.equals(that)) { return 0; } else { return getOrderingName().compareTo(that.getOrderingName()); } }  }
DecisionNavigatorItem implements Comparable { @Override public int compareTo(final Object o) { if (o == null || getClass() != o.getClass()) { return 1; } final DecisionNavigatorItem that = (DecisionNavigatorItem) o; if (this.equals(that)) { return 0; } else { return getOrderingName().compareTo(that.getOrderingName()); } }  String getUUID(); String getLabel(); Type getType(); TreeSet<DecisionNavigatorItem> getChildren(); Optional<Command> getOnClick(); String getParentUUID(); void setLabel(final String label); void removeChild(final DecisionNavigatorItem item); void addChild(final DecisionNavigatorItem item); void onClick(); void onUpdate(); void onRemove(); boolean isEditable(); @Override boolean equals(final Object o); @Override int hashCode(); @Override int compareTo(final Object o); }
DecisionNavigatorItem implements Comparable { @Override public int compareTo(final Object o) { if (o == null || getClass() != o.getClass()) { return 1; } final DecisionNavigatorItem that = (DecisionNavigatorItem) o; if (this.equals(that)) { return 0; } else { return getOrderingName().compareTo(that.getOrderingName()); } }  String getUUID(); String getLabel(); Type getType(); TreeSet<DecisionNavigatorItem> getChildren(); Optional<Command> getOnClick(); String getParentUUID(); void setLabel(final String label); void removeChild(final DecisionNavigatorItem item); void addChild(final DecisionNavigatorItem item); void onClick(); void onUpdate(); void onRemove(); boolean isEditable(); @Override boolean equals(final Object o); @Override int hashCode(); @Override int compareTo(final Object o);  }