@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj instanceof PatchLine) { if (operator != ((PatchLine) obj).operator) return false; return statement.equals(((PatchLine) obj).statement); } return false; }
@Test public void testStatementSerialization() throws Exception { Statement st = vf.createStatement(picasso, RDF.TYPE, painter); ByteArrayOutputStream baos = new ByteArrayOutputStream(); ObjectOutputStream out = new ObjectOutputStream(baos); out.writeObject(st); out.close(); ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray()); ObjectInputStream in = new ObjectInputStream(bais); Statement deserializedStatement = (Statement)in.readObject(); in.close(); assertTrue(st.equals(deserializedStatement)); }
@Override public boolean equals(final Object other) { if (!(other instanceof StatementWrapper)) { return false; } Statement s2 = ((StatementWrapper) other).s; return s.equals(s2) && (null == s.getContext() ? null == s2.getContext() : null != s2.getContext() && s.getContext().equals(s2.getContext())); }
@Test public void testStatementSerialization() throws Exception { Statement st = vf.createStatement(picasso, RDF.TYPE, painter); ByteArrayOutputStream baos = new ByteArrayOutputStream(); ObjectOutputStream out = new ObjectOutputStream(baos); out.writeObject(st); out.close(); ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray()); ObjectInputStream in = new ObjectInputStream(bais); Statement deserializedStatement = (Statement)in.readObject(); in.close(); assertTrue(st.equals(deserializedStatement)); }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj instanceof Statement) { Statement other = (Statement)obj; return this.delegate.equals(other) && ((this.getContext() == null && other.getContext() == null) || (this.getContext() != null && other.getContext() != null && this.getContext().equals(other.getContext()))); } return false; }
if (!expected[i].equals(g)) {
if (!expected[i].equals(g)) {
if (!expected[i].equals(g)) {