@Test public void formattedStringShouldUseImapRangeNotationForSingleton() { assertThat(new UidRange(_2).getFormattedString()).isEqualTo("2"); }
public String getFormattedString() { if (range.getUidFrom().equals(range.getUidTo())) { return String.valueOf(range.getUidFrom().asLong()); } else { return String.format("%d:%d", range.getUidFrom().asLong(), range.getUidTo().asLong()); } }
UidRange implements Iterable<MessageUid> { public String getFormattedString() { if (range.getUidFrom().equals(range.getUidTo())) { return String.valueOf(range.getUidFrom().asLong()); } else { return String.format("%d:%d", range.getUidFrom().asLong(), range.getUidTo().asLong()); } } }
UidRange implements Iterable<MessageUid> { public String getFormattedString() { if (range.getUidFrom().equals(range.getUidTo())) { return String.valueOf(range.getUidFrom().asLong()); } else { return String.format("%d:%d", range.getUidFrom().asLong(), range.getUidTo().asLong()); } } UidRange(MessageUid singleVal);  UidRange(MessageUid minValue, MessageUid messageUid); }
UidRange implements Iterable<MessageUid> { public String getFormattedString() { if (range.getUidFrom().equals(range.getUidTo())) { return String.valueOf(range.getUidFrom().asLong()); } else { return String.format("%d:%d", range.getUidFrom().asLong(), range.getUidTo().asLong()); } } UidRange(MessageUid singleVal);  UidRange(MessageUid minValue, MessageUid messageUid); static String toString(UidRange[] ranges); static List<UidRange> mergeRanges(List<UidRange> ranges); MessageUid getLowVal(); MessageUid getHighVal(); boolean includes(MessageUid value); int hashCode(); boolean equals(Object obj); String toString(); String getFormattedString(); @Override Iterator<MessageUid> iterator(); MessageRange toMessageRange(); }
UidRange implements Iterable<MessageUid> { public String getFormattedString() { if (range.getUidFrom().equals(range.getUidTo())) { return String.valueOf(range.getUidFrom().asLong()); } else { return String.format("%d:%d", range.getUidFrom().asLong(), range.getUidTo().asLong()); } } UidRange(MessageUid singleVal);  UidRange(MessageUid minValue, MessageUid messageUid); static String toString(UidRange[] ranges); static List<UidRange> mergeRanges(List<UidRange> ranges); MessageUid getLowVal(); MessageUid getHighVal(); boolean includes(MessageUid value); int hashCode(); boolean equals(Object obj); String toString(); String getFormattedString(); @Override Iterator<MessageUid> iterator(); MessageRange toMessageRange();  }