FilterStreamType implements Comparable<FilterStreamType> { @Override public int compareTo(FilterStreamType o) { CompareToBuilder builder = new CompareToBuilder(); builder.append(getType().toString(), o.getType().toString()); builder.append(getDataFormat(), o.getDataFormat()); builder.append(getVersion(), o.getVersion()); return builder.toComparison(); } FilterStreamType(SystemType type, String dataFormat);  FilterStreamType(SystemType type, String dataFormat, String version); SystemType getType(); String getDataFormat(); String getVersion(); String serialize(); static FilterStreamType unserialize(String str); @Override String toString(); @Override int hashCode(); @Override boolean equals(Object object); @Override int compareTo(FilterStreamType o); static final String DATA_XML; static final String DATA_XAR; static final String DATA_TEXT; static final FilterStreamType FILTER_XML; static final FilterStreamType XWIKI_XAR_11; static final FilterStreamType XWIKI_XAR_12; static final FilterStreamType XWIKI_XAR_13; static final FilterStreamType XWIKI_XAR_CURRENT; static final FilterStreamType XWIKI_INSTANCE; static final FilterStreamType CONFLUENCE_XML; static final FilterStreamType MEDIAWIKI_XML; static final FilterStreamType DOKUWIKI_TEXT; }
@Test void compareTo() { FilterStreamType type = new FilterStreamType(new SystemType("type"), "data", "2.0"); assertEquals(0, type.compareTo(new FilterStreamType(new SystemType("type"), "data", "2.0"))); assertTrue(type.compareTo(new FilterStreamType(new SystemType("type"), "data", "1.0")) > 0); assertTrue(type.compareTo(new FilterStreamType(new SystemType("type"), "data", "3.0")) < 0); }