@Override public boolean test(Object value, Object condition) { if (condition==null) { return value==null; } else { if (condition.equals(value)) { return true; } else if (condition.getClass().isArray()) { return ArrayUtils.isEquals(condition, value); } else { return false; } } }
@Override public boolean test(Object value, Object condition) { if (condition==null) { return value==null; } else { return condition.equals(value) || (condition.getClass().isArray() && ArrayUtils.isEquals(condition, value)); } }
@Override public boolean equals(Object o) { if ((o instanceof SnapshotTable) == false) return false; SnapshotTable that = (SnapshotTable) o; if (this.dict.equals(that.dict) == false) return false; //compare row by row if (this.rowIndices.size() != that.rowIndices.size()) return false; for (int i = 0; i < this.rowIndices.size(); ++i) { if (!ArrayUtils.isEquals(this.rowIndices.get(i), that.rowIndices.get(i))) return false; } return true; }
@Override public boolean equals(Object obj) { if (obj instanceof Hash) { return ArrayUtils.isEquals(this.bytes, ((Hash)obj).bytes); } return false; }
@Override public boolean equals(Object o) { if ((o instanceof SnapshotTable) == false) return false; SnapshotTable that = (SnapshotTable) o; //compare row by row if (this.rows.size() != that.rows.size()) return false; for (int i = 0; i < this.rows.size(); ++i) { if (!ArrayUtils.isEquals(this.rows.get(i), that.rows.get(i))) return false; } return true; }
private boolean hasSameArgs(RuleResultMessage other) { if (this.args == null && other.args == null) { return true; } if (this.args != null && other.args != null && this.args.length == other.args.length) { return ArrayUtils.isEquals(this.args, other.args); } return false; }
public boolean hasDeleteOrder() { return !ArrayUtils.isEquals(deleteOrder, new int[]{-1}); }
@Override public boolean test(Object value, Object condition) { if (condition==null) { return value==null; } else { if (condition.equals(value)) { return true; } else if (condition.getClass().isArray()) { return ArrayUtils.isEquals(condition, value); } else { return false; } } }
@Override public boolean evaluate(Object value, Object condition) { if (condition==null) { return value==null; } else { if (condition.equals(value)) { return true; } else if (condition.getClass().isArray()) { return ArrayUtils.isEquals(condition, value); } else { return false; } } }
@Override public boolean equals(Object o) { if ((o instanceof SnapshotTable) == false) return false; SnapshotTable that = (SnapshotTable) o; //compare row by row if (this.rowIndices.size() != that.rowIndices.size()) return false; for (int i = 0; i < this.rowIndices.size(); ++i) { if (!ArrayUtils.isEquals(this.rowIndices.get(i), that.rowIndices.get(i))) return false; } return true; }
@Override public boolean equals(Object o) { if ((o instanceof SnapshotTable) == false) return false; SnapshotTable that = (SnapshotTable) o; if (this.dict.equals(that.dict) == false) return false; //compare row by row if (this.rowIndices.size() != that.rowIndices.size()) return false; for (int i = 0; i < this.rowIndices.size(); ++i) { if (!ArrayUtils.isEquals(this.rowIndices.get(i), that.rowIndices.get(i))) return false; } return true; }
public boolean equals(final Object obj) { boolean result = false; if (obj instanceof Problem) { final Problem problem = (Problem) obj; result = ArrayUtils.isEquals(getMessageParameters(), problem.getMessageParameters()); } return result; }
private void assertArrayNotEquals(List<Integer> expected) { assertFalse(ArrayUtils.isEquals(outputList.toArray(), expected)); }
public boolean equals(Object obj) { if (obj == null || !(obj instanceof MethodSignature)) { return false; } MethodSignature key = (MethodSignature) obj; return methodName.equals(key.getMethodName()) && ArrayUtils.isEquals(getArgTypes(), key.getArgTypes()); }
private void assertArrayNotEquals(List<Integer> expected) { assertFalse(ArrayUtils.isEquals(outputList.toArray(), expected)); }
@Override public synchronized byte[] updateMemberData() throws UpdateException { byte[] updatedMembershipData = memberData.get(); if (!ArrayUtils.isEquals(this.membershipData, updatedMembershipData)) { try { zkClient.get().setData(nodePath, updatedMembershipData, ZooKeeperUtils.ANY_VERSION); this.membershipData = updatedMembershipData; } catch (KeeperException e) { throw new UpdateException("Problem updating membership data.", e); } catch (InterruptedException e) { throw new UpdateException("Interrupted attempting to update membership data.", e); } catch (ZooKeeperConnectionException e) { throw new UpdateException( "Could not connect to the ZooKeeper cluster to update membership data.", e); } } return updatedMembershipData; }
@Override public synchronized byte[] updateMemberData() throws UpdateException { byte[] updatedMembershipData = memberData.get(); if (!ArrayUtils.isEquals(this.membershipData, updatedMembershipData)) { try { zkClient.get().setData(nodePath, updatedMembershipData, ZooKeeperUtils.ANY_VERSION); this.membershipData = updatedMembershipData; } catch (KeeperException e) { throw new UpdateException("Problem updating membership data.", e); } catch (InterruptedException e) { throw new UpdateException("Interrupted attempting to update membership data.", e); } catch (ZooKeeperConnectionException e) { throw new UpdateException( "Could not connect to the ZooKeeper cluster to update membership data.", e); } } return updatedMembershipData; }
@Override public synchronized byte[] updateMemberData() throws UpdateException { byte[] membershipData = memberData.get(); if (!ArrayUtils.isEquals(this.membershipData, membershipData)) { try { zkClient.get().setData(nodePath, membershipData, ZooKeeperUtils.ANY_VERSION); this.membershipData = membershipData; } catch (KeeperException e) { throw new UpdateException("Problem updating membership data.", e); } catch (InterruptedException e) { throw new UpdateException("Interrupted attempting to update membership data.", e); } catch (ZooKeeperConnectionException e) { throw new UpdateException( "Could not connect to the ZooKeeper cluster to update membership data.", e); } } return membershipData; }
@Override public void flatMap(Embedding value, Collector<Embedding> out) throws Exception { if (closingColumn >= 0 && !ArrayUtils.isEquals(value.getRawId(expandColumn), value.getRawId(closingColumn))) { return; } value.add(); value.add(value.getId(expandColumn)); out.collect(value); } }
@Override public void flatMap(Embedding value, Collector<Embedding> out) throws Exception { if (closingColumn >= 0 && !ArrayUtils.isEquals(value.getRawId(expandColumn), value.getRawId(closingColumn))) { return; } value.add(); value.add(value.getId(expandColumn)); out.collect(value); } }