public static boolean areSameColumns(List<FieldSchema> oldCols, List<FieldSchema> newCols) { return ListUtils.isEqualList(oldCols, newCols); }
public void testEquals() { Collection data = Arrays.asList( new String[] { "a", "b", "c" }); List a = new ArrayList( data ); List b = new ArrayList( data ); assertEquals(true, a.equals(b)); assertEquals(true, ListUtils.isEqualList(a, b)); a.clear(); assertEquals(false, ListUtils.isEqualList(a, b)); assertEquals(false, ListUtils.isEqualList(a, null)); assertEquals(false, ListUtils.isEqualList(null, b)); assertEquals(true, ListUtils.isEqualList(null, null)); }
if (!ListUtils.isEqualList(owners, vDom.getOwners())) { Loggers.SRV_LOG.info("[DOM-UPDATE] dom: {}, owners: {} -> {}", name, owners, vDom.getOwners()); owners = vDom.getOwners();
public static boolean areSameColumns(List<FieldSchema> oldCols, List<FieldSchema> newCols) { return ListUtils.isEqualList(oldCols, newCols); }
@Override public boolean equals(Object that) { if (that == this) { return true; } if (!(that instanceof Definition)) { return false; } Definition another = (Definition) that; if (another.type.equals(this.type) && another.value.equals(this.value) && ListUtils.isEqualList(another.inputStreams, this.inputStreams) && ListUtils.isEqualList(another.outputStreams, this.outputStreams)) { return true; } return false; }
@Override public boolean equals(Object that) { if (that == this) { return true; } if (!(that instanceof AlertDeduplication)) { return false; } AlertDeduplication another = (AlertDeduplication) that; if (ListUtils.isEqualList(another.dedupFields, this.dedupFields) && Objects.equals(another.dedupIntervalMin, this.dedupIntervalMin) && Objects.equals(another.outputStreamId, this.outputStreamId)) { return true; } return false; }
/** * Tests if an identity is already contained in a Set of identities. * @param identitySet the Set of identities. * @param identity the identity that is tested if it is already in the Set. * @return true if the Set contains the identity, false otherwise. */ private boolean isIdentityInUpdatedRows(Set identitySet, List identity) { Iterator iter = identitySet.iterator(); while (iter.hasNext()) { List identityFromSet = (List)iter.next(); if (ListUtils.isEqualList(identityFromSet, identity)) { return true; } } return false; }
@Override public boolean equals(Object obj) { if ( obj == null || !(obj instanceof ComboModelTrain) ) { return false; } ComboModelTrain other = (ComboModelTrain) obj; if ( other == this ) { return true; } return ListUtils.isEqualList(subTrainConfList, other.getSubTrainConfList()); }
public boolean equals(ParseTreeChunk ch) { List<String> lems = ch.getLemmas(); List<String> poss = ch.POSs; return ListUtils.isEqualList(ch.getLemmas(), this.lemmas) && ListUtils.isEqualList(ch.getPOSs(), this.POSs); }
private List<?> mergeTargetContent(List<?> giveValues, List<?> foundValues, AtomicBoolean hasChange) { List<?> result = null; if (pull) { result = ListUtils.subtract(foundValues, giveValues); } else { result = ListUtils.sum(foundValues, giveValues); } hasChange.set(!ListUtils.isEqualList(result, foundValues)); return result; } }
@Override public boolean test(BambooRequest bambooRequest) { for (Map.Entry<String, List<String>> entry : params.entrySet()) { List<String> values = bambooRequest.getParams().get(entry.getKey()); if (!ListUtils.isEqualList(entry.getValue(), values)) { return false; } } return true; } }
@Override public boolean test(BambooRequest bambooRequest) { for (Map.Entry<String, List<String>> entry : headers.entrySet()) { List<String> values = bambooRequest.getHeaders().get(entry.getKey()); if (!ListUtils.isEqualList(entry.getValue(), values)) { return false; } } return true; } }
@Override public boolean test(BambooRequest bambooRequest) { for (Map.Entry<String, List<String>> entry : headers.entrySet()) { List<String> values = bambooRequest.getHeaders().get(entry.getKey()); if(!ListUtils.isEqualList(entry.getValue(), values)){ return false; } } return true; } }
@Override public boolean test(BambooRequest bambooRequest) { for (Map.Entry<String, List<String>> entry : params.entrySet()) { List<String> values = bambooRequest.getParams().get(entry.getKey()); if(!ListUtils.isEqualList(entry.getValue(), values)){ return false; } } return true; } }
public static boolean isEqualList(ActionContext actionContext){ Thing self = actionContext.getObject("self"); Collection<?> list1 = (Collection<?>) self.doAction("getList1", actionContext); Collection<?> list2 = (Collection<?>) self.doAction("getList2", actionContext); return ListUtils.isEqualList(list1, list2); }
private void retrievePartition(StreamPartition partition) throws Exception { if (partition == null) { return; } if (!streamPartitions.containsKey(partition.getInputStreamId())) { streamPartitions.put(partition.getInputStreamId(), partition); } else { StreamPartition existingPartition = streamPartitions.get(partition.getInputStreamId()); if (existingPartition.getType().equals(partition.getType()) && ListUtils.isEqualList(existingPartition.getGroupByList(), partition.getGroupByList()) || existingPartition.getType().equals(StreamPartition.Type.SHUFFLE)) { streamPartitions.put(partition.getInputStreamId(), partition); } else { throw new Exception("You have incompatible partitions on stream " + partition.getInputStreamId() + ": [1] " + streamPartitions.get(partition.getInputStreamId()).toString() + " [2] " + partition.toString() + ""); } } }
diff = !ListUtils.isEqualList(keyObjs.keySet(), keyObject.keySet());
diff = !ListUtils.isEqualList(keyObjs.keySet(), keyObject.keySet());
private boolean isSameKindOfRequest(final AMRMClient.ContainerRequest r1, final AMRMClient.ContainerRequest r2) { return r1.getPriority().compareTo(r2.getPriority()) == 0 && r1.getCapability().compareTo(r2.getCapability()) == 0 && r1.getRelaxLocality() == r2.getRelaxLocality() && ListUtils.isEqualList(r1.getNodes(), r2.getNodes()) && ListUtils.isEqualList(r1.getRacks(), r2.getRacks()); }
private void retrievePartition(StreamPartition partition) { if (partition == null) { return; } if (!effectivePartitions.containsKey(partition.getStreamId())) { effectivePartitions.put(partition.getStreamId(), partition); } else if (!effectivePartitions.get(partition.getStreamId()).equals(partition)) { StreamPartition existingPartition = effectivePartitions.get(partition.getStreamId()); // If same Type & Columns but different sort spec, then use larger if (existingPartition.getType().equals(partition.getType()) && ListUtils.isEqualList(existingPartition.getColumns(), partition.getColumns()) && partition.getSortSpec().getWindowPeriodMillis() > existingPartition.getSortSpec().getWindowPeriodMillis() || existingPartition.getType().equals(StreamPartition.Type.SHUFFLE)) { effectivePartitions.put(partition.getStreamId(), partition); } else { // Throw exception as it unable to conflict effectivePartitions on same stream will not be able to run in distributed mode throw new ExecutionPlanValidationException("You have incompatible partitions on stream " + partition.getStreamId() + ": [1] " + effectivePartitions.get(partition.getStreamId()).toString() + " [2] " + partition.toString() + ""); } } }