/** * @param o the other filter to compare with * @return true if and only if the fields of the filter that are serialized * are equal to the corresponding fields in other. Used for testing. */ @Override boolean areSerializedFieldsEqual(Filter o) { if (o == this) return true; if (!(o instanceof MultipleColumnPrefixFilter)) return false; MultipleColumnPrefixFilter other = (MultipleColumnPrefixFilter)o; return this.sortedPrefixes.equals(other.sortedPrefixes); }
@Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } PartitionHolder that = (PartitionHolder) o; if (!holderSet.equals(that.holderSet)) { return false; } return true; }
@Override public boolean equals(Object other) { if (other == this) { return true; } if (!(other instanceof SortedResultSet)) { return false; } if (!this.elementType.equals(((SortedResultSet) other).elementType)) { return false; } return super.equals(other); }
@Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } ArbitraryGranularitySpec that = (ArbitraryGranularitySpec) o; if (!intervals.equals(that.intervals)) { return false; } if (!rollup.equals(that.rollup)) { return false; } return !(queryGranularity != null ? !queryGranularity.equals(that.queryGranularity) : that.queryGranularity != null); }
/** * Compares this set to the specified set. * <p> * Note that this method declares two empty sets to be equal * even if they are parameterized by different generic types. * This is consistent with the behavior of {@code equals()} * within Java's Collections framework. * * @param other the other set * @return {@code true} if this set equals {@code other}; * {@code false} otherwise */ @Override public boolean equals(Object other) { if (other == this) return true; if (other == null) return false; if (other.getClass() != this.getClass()) return false; SET that = (SET) other; return this.set.equals(that.set); }
@Override public boolean equals(@Nullable Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } CachedContent that = (CachedContent) o; return id == that.id && key.equals(that.key) && cachedSpans.equals(that.cachedSpans) && metadata.equals(that.metadata); } }
@Override public boolean equals(Object other) { if (!(other instanceof SortedStructSet)) { return false; } if (!this.structType.equals(((SortedStructSet) other).structType)) { return false; } return super.equals(other); }
@NoWarning("EC") public boolean testCollection(Collection<String> c, HashSet<String> s, TreeSet<String> s2, Set<String> s3, Object o) { if (c.equals(s)) return true; if (s.equals(c)) return true; if (o.equals(c)) return true; if (s.equals(s2)) return true; if (s2.equals(s3)) return true; return false; } @NoWarning("EC")
/** * For test purposes only. This isn't quite accurate, because I think two RVVs that have * effectively same exceptions may represent the exceptions differently. This method is testing * for an exact match of exception format. <br> */ @Override public boolean sameAs(RVVException ex) { if (!super.sameAs(ex)) { return false; } RVVExceptionT other = (RVVExceptionT) ex; if (this.received == null) { if (other.received != null && !other.received.isEmpty()) { return false; } } else if (other.received == null || !this.received.equals(other.received)) { return false; } return true; }
public void testEquals_bothDefaultOrdering() { SortedSet<String> set = of("a", "b", "c"); assertEquals(set, Sets.newTreeSet(asList("a", "b", "c"))); assertEquals(Sets.newTreeSet(asList("a", "b", "c")), set); assertFalse(set.equals(Sets.newTreeSet(asList("a", "b", "d")))); assertFalse(Sets.newTreeSet(asList("a", "b", "d")).equals(set)); assertFalse(set.equals(Sets.newHashSet(4, 5, 6))); assertFalse(Sets.newHashSet(4, 5, 6).equals(set)); }
public void testEquals_bothExplicitOrdering() { SortedSet<String> set = of("in", "the", "a"); assertEquals(Sets.newTreeSet(asList("in", "the", "a")), set); assertFalse(set.equals(Sets.newTreeSet(asList("in", "the", "house")))); assertFalse(Sets.newTreeSet(asList("in", "the", "house")).equals(set)); assertFalse(set.equals(Sets.newHashSet(4, 5, 6))); assertFalse(Sets.newHashSet(4, 5, 6).equals(set)); Set<String> complex = Sets.newTreeSet(STRING_LENGTH); Collections.addAll(complex, "in", "the", "a"); assertEquals(set, complex); }
Entry<String, ConsumerRunningInfo> next = it.next(); ConsumerRunningInfo current = next.getValue(); boolean equals = current.getSubscriptionSet().equals(prev.getSubscriptionSet());
if (enumCuboids.equals(cuboidSet) == false) { throw new IllegalStateException("Expected cuboid set " + enumCuboids + "; but actual cuboid set " + cuboidSet);
/** * Checks whether the test outputs match the expected outputs. * * @param lep * The LineageInfo extracted from the test * @param i * The set of input tables * @param o * The set of output tables */ private void checkOutput(LineageInfo lep, TreeSet<String> i, TreeSet<String> o) { if (!i.equals(lep.getInputTableList())) { fail("Input table not same"); } if (!o.equals(lep.getOutputTableList())) { fail("Output table not same"); } }
/** * @param o the other filter to compare with * @return true if and only if the fields of the filter that are serialized * are equal to the corresponding fields in other. Used for testing. */ @Override boolean areSerializedFieldsEqual(Filter o) { if (o == this) return true; if (!(o instanceof MultipleColumnPrefixFilter)) return false; MultipleColumnPrefixFilter other = (MultipleColumnPrefixFilter)o; return this.sortedPrefixes.equals(other.sortedPrefixes); }
return false; else if (!treeSet.equals(other.treeSet)) return false; if (vector == null)
public static int simulateCuboidGeneration(CubeDesc cube) { CuboidScheduler scheduler = new CuboidScheduler(cube); long baseCuboid = Cuboid.getBaseCuboidId(cube); Collection<Long> cuboidSet = new TreeSet<Long>(); cuboidSet.add(baseCuboid); LinkedList<Long> cuboidQueue = new LinkedList<Long>(); cuboidQueue.push(baseCuboid); while (!cuboidQueue.isEmpty()) { long cuboid = cuboidQueue.pop(); Collection<Long> spnanningCuboids = scheduler.getSpanningCuboid(cuboid); for (Long sc : spnanningCuboids) { boolean notfound = cuboidSet.add(sc); if (!notfound) { throw new IllegalStateException("Find duplicate spanning cuboid " + sc + " from cuboid " + cuboid); } cuboidQueue.push(sc); } } TreeSet<Long> enumCuboids = enumCalcCuboidCount(cube); if (enumCuboids.equals(cuboidSet) == false) { throw new IllegalStateException("Expected cuboid set " + enumCuboids + "; but actual cuboid set " + cuboidSet); } int mathCount = mathCalcCuboidCount(cube); if (mathCount != enumCuboids.size()) { throw new IllegalStateException("Math cuboid count " + mathCount + ", but actual cuboid count " + enumCuboids.size()); } return mathCount; }
Entry<String, ConsumerRunningInfo> next = it.next(); ConsumerRunningInfo current = next.getValue(); boolean equals = current.getSubscriptionSet().equals(prev.getSubscriptionSet());
@Override public boolean equals(Object obj) { if(this == obj) return true; if(obj instanceof AccumulatedIcons){ AccumulatedIcons ai = (AccumulatedIcons) obj; return ownIcons.equals(ai.ownIcons) && childIcons.equals(ai.childIcons); } return false; }