@Test public void nonEquality() { Syntax syntax1 = new Syntax(SyntaxType.XWIKI, "1.0"); Syntax syntax2 = new Syntax(SyntaxType.XWIKI, "2.0"); Syntax syntax3 = new Syntax(SyntaxType.CONFLUENCE, "1.0"); assertFalse(syntax2.equals(syntax1)); assertFalse(syntax3.equals(syntax1)); }
@Override public boolean equals(Object object) { if (object == this) { return true; } if (!(object instanceof Syntax)) { return false; } Syntax rhs = (Syntax) object; return new EqualsBuilder().append(getType(), rhs.getType()).append(getVersion(), rhs.getVersion()) .append(getQualifier(), rhs.getQualifier()).isEquals(); }
Syntax implements Comparable<Syntax> { @Override public boolean equals(Object object) { if (object == this) { return true; } if (!(object instanceof Syntax)) { return false; } Syntax rhs = (Syntax) object; return new EqualsBuilder().append(getType(), rhs.getType()).append(getVersion(), rhs.getVersion()) .append(getQualifier(), rhs.getQualifier()).isEquals(); } }
Syntax implements Comparable<Syntax> { @Override public boolean equals(Object object) { if (object == this) { return true; } if (!(object instanceof Syntax)) { return false; } Syntax rhs = (Syntax) object; return new EqualsBuilder().append(getType(), rhs.getType()).append(getVersion(), rhs.getVersion()) .append(getQualifier(), rhs.getQualifier()).isEquals(); } Syntax(SyntaxType type, String version);  Syntax(SyntaxType type, String version, String qualifier); }
Syntax implements Comparable<Syntax> { @Override public boolean equals(Object object) { if (object == this) { return true; } if (!(object instanceof Syntax)) { return false; } Syntax rhs = (Syntax) object; return new EqualsBuilder().append(getType(), rhs.getType()).append(getVersion(), rhs.getVersion()) .append(getQualifier(), rhs.getQualifier()).isEquals(); } Syntax(SyntaxType type, String version);  Syntax(SyntaxType type, String version, String qualifier); static Syntax valueOf(String syntaxIdAsString); SyntaxType getType(); String getVersion(); String getQualifier(); String toIdString(); @Override String toString(); @Override int hashCode(); @Override boolean equals(Object object); @Override int compareTo(Syntax syntax); }
Syntax implements Comparable<Syntax> { @Override public boolean equals(Object object) { if (object == this) { return true; } if (!(object instanceof Syntax)) { return false; } Syntax rhs = (Syntax) object; return new EqualsBuilder().append(getType(), rhs.getType()).append(getVersion(), rhs.getVersion()) .append(getQualifier(), rhs.getQualifier()).isEquals(); } Syntax(SyntaxType type, String version);  Syntax(SyntaxType type, String version, String qualifier); static Syntax valueOf(String syntaxIdAsString); SyntaxType getType(); String getVersion(); String getQualifier(); String toIdString(); @Override String toString(); @Override int hashCode(); @Override boolean equals(Object object); @Override int compareTo(Syntax syntax); static final Syntax HTML_5_0; static final Syntax XHTML_1_0; static final Syntax HTML_4_01; @Deprecated
    static final Syntax XWIKI_1_0; static final Syntax XWIKI_2_0; static final Syntax XWIKI_2_1; static final Syntax PLAIN_1_0; static final Syntax EVENT_1_0; static final Syntax TEX_1_0; static final Syntax CREOLE_1_0; static final Syntax JSPWIKI_1_0; static final Syntax MEDIAWIKI_1_0; static final Syntax MEDIAWIKI_1_6; static final Syntax DOKUWIKI_1_0; static final Syntax TWIKI_1_0; static final Syntax DOCBOOK_4_4; static final Syntax CONFLUENCE_1_0; static final Syntax CONFLUENCEXHTML_1_0; static final Syntax XDOMXML_CURRENT; static final Syntax XDOMXML_1_0; static final Syntax MARKDOWN_1_0; static final Syntax MARKDOWN_1_1; static final Syntax APT_1_0; static final Syntax ANNOTATED_XHTML_1_0; static final Syntax ANNOTATED_HTML_5_0; }