Java Code Examples for com.google.common.base.Equivalence#equals()

The following examples show how to use com.google.common.base.Equivalence#equals() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: EqualsTester.java    From exonum-java-binding with Apache License 2.0 5 votes vote down vote up
/** Run tests on equals method, throwing a failure on an invalid test. */
public EqualsTester testEquals() {
  RelationshipTester<Object> delegate =
      new RelationshipTester<>(
          Equivalence.equals(), "Object#equals", "Object#hashCode", itemReporter);
  for (List<Object> group : equalityGroups) {
    delegate.addRelatedGroup(group);
  }
  for (int run = 0; run < REPETITIONS; run++) {
    testItems();
    delegate.test();
  }
  return this;
}
 
Example 2
Source File: EqualsTester.java    From jrestless with Apache License 2.0 5 votes vote down vote up
/**
 * Run tests on equals method, throwing a failure on an invalid test.
 */
public EqualsTester testEquals() {
	RelationshipTester<Object> delegate = new RelationshipTester<>(Equivalence.equals(), "Object#equals",
			"Object#hashCode", itemReporter);
	for (List<Object> group : equalityGroups) {
		delegate.addRelatedGroup(group);
	}
	for (int run = 0; run < REPETITIONS; run++) {
		testItems();
		delegate.test();
	}
	return this;
}
 
Example 3
Source File: LocalCache.java    From bazel-buildfarm with Apache License 2.0 4 votes vote down vote up
@Override
Equivalence<Object> defaultEquivalence() {
  return Equivalence.equals();
}
 
Example 4
Source File: LocalCache.java    From codebuff with BSD 2-Clause "Simplified" License 4 votes vote down vote up
@Override
Equivalence<Object> defaultEquivalence() {
  return Equivalence.equals();
}
 
Example 5
Source File: MapMakerInternalMap.java    From codebuff with BSD 2-Clause "Simplified" License 4 votes vote down vote up
@Override
Equivalence<Object> defaultEquivalence() {
  return Equivalence.equals();
}
 
Example 6
Source File: LocalCache.java    From codebuff with BSD 2-Clause "Simplified" License 4 votes vote down vote up
@Override
Equivalence<Object> defaultEquivalence() {
  return Equivalence.equals();
}
 
Example 7
Source File: MapMakerInternalMap.java    From codebuff with BSD 2-Clause "Simplified" License 4 votes vote down vote up
@Override
Equivalence<Object> defaultEquivalence() {
  return Equivalence.equals();
}
 
Example 8
Source File: LocalCache.java    From codebuff with BSD 2-Clause "Simplified" License 4 votes vote down vote up
@Override
Equivalence<Object> defaultEquivalence() {
  return Equivalence.equals();
}
 
Example 9
Source File: MapMakerInternalMap.java    From codebuff with BSD 2-Clause "Simplified" License 4 votes vote down vote up
@Override
Equivalence<Object> defaultEquivalence() {
  return Equivalence.equals();
}
 
Example 10
Source File: LocalCache.java    From codebuff with BSD 2-Clause "Simplified" License 4 votes vote down vote up
@Override
Equivalence<Object> defaultEquivalence() {
return Equivalence.equals();
}
 
Example 11
Source File: LocalCache.java    From codebuff with BSD 2-Clause "Simplified" License 4 votes vote down vote up
@Override
Equivalence<Object> defaultEquivalence() {
  return Equivalence.equals();
}
 
Example 12
Source File: MapMakerInternalMap.java    From codebuff with BSD 2-Clause "Simplified" License 4 votes vote down vote up
@Override
Equivalence<Object> defaultEquivalence() {
  return Equivalence.equals();
}
 
Example 13
Source File: MapMakerInternalMap.java    From codebuff with BSD 2-Clause "Simplified" License 4 votes vote down vote up
@Override
Equivalence<Object> defaultEquivalence() {
  return Equivalence.equals();
}
 
Example 14
Source File: LocalCache.java    From codebuff with BSD 2-Clause "Simplified" License 4 votes vote down vote up
@Override
Equivalence<Object> defaultEquivalence() {
  return Equivalence.equals();
}
 
Example 15
Source File: DependencyTraverser.java    From n4js with Eclipse Public License 1.0 2 votes vote down vote up
/**
 * Instantiates a new {@link DependencyTraverser} that detects a cycle based on an identity check between nodes and
 * does not consider a custom visitor.
 *
 * Apart from that see
 * {@link #DependencyTraverser(Object, Equivalence, DependencyVisitor, DependencyProvider, boolean)}.
 */
public DependencyTraverser(final T rootNode, DependencyProvider<T> dependencyProvider,
		boolean ignoreCycles) {
	this(rootNode, Equivalence.equals(), nopVisitor(), dependencyProvider, ignoreCycles);
}
 
Example 16
Source File: DependencyTraverser.java    From n4js with Eclipse Public License 1.0 2 votes vote down vote up
/**
 * Instantiates a new {@link DependencyTraverser} that detects a cycle based on an identity check between nodes.
 *
 * Apart from that see
 * {@link #DependencyTraverser(Object, Equivalence, DependencyVisitor, DependencyProvider, boolean)}.
 */
public DependencyTraverser(final T rootNode, DependencyVisitor<T> visitor,
		DependencyProvider<T> dependencyProvider, boolean ignoreCycles) {
	this(rootNode, Equivalence.equals(), visitor, dependencyProvider, ignoreCycles);
}