DocViewProperty { @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; DocViewProperty other = (DocViewProperty) obj; if (isMulti != other.isMulti) return false; if (isReferenceProperty != other.isReferenceProperty) return false; if (name == null) { if (other.name != null) return false; } else if (!name.equals(other.name)) return false; if (type != other.type) return false; if (!Arrays.equals(values, other.values)) return false; return true; } DocViewProperty(String name, String[] values, boolean multi, int type);  DocViewProperty(String name, String[] values, boolean multi, int type, boolean isRef); static DocViewProperty parse(String name, String value); static String format(Property prop); static String format(Property prop, boolean sort, boolean useBinaryReferences); static boolean isAmbiguous(Property prop); boolean apply(Node node); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString(); final String name; final String[] values; final boolean isMulti; final int type; final boolean isReferenceProperty; }
@Test public void testEquals() { DocViewProperty p1 = DocViewProperty.parse("foo", "{Long}1234"); DocViewProperty p2 = DocViewProperty.parse("foo", "{Long}1234"); Assert.assertEquals(p1, p2); DocViewProperty p3 = DocViewProperty.parse("foo", "{String}1234"); Assert.assertNotEquals(p1, p3); }