Code examples for Comparator

Codota analyzed 7,668,838 open source code samples to find the most common, credible and clear examples.
You can now enable Codota on your own code to easily search and navigate your Java codebase.
56:	return JSON_ARRAY_COMPARATOR.compare((JSONArray) o1, (JSONArray) o2) == 0; 
Full Snippet Info
7
CodeRank
27:	Preconditions.checkNotNull(comparator); 
-
74:	int c = comp.compare(nextFirst, nextSecond); 
Full Snippet Info
7
CodeRank
98:	Assert.assertEquals(-1, comp.compare(before, after)); 
99:	Assert.assertEquals(0, comp.compare(before, before)); 
100:	Assert.assertEquals(0, comp.compare(after, after)); 
101:	Assert.assertEquals(1, comp.compare(after, before)); 
Full Snippet Info
6
CodeRank
84:	return comparator.compare(chunkNumber, linearChunk.chunkNumber); 
Full Snippet Info
7
CodeRank
98:	return comparator.compare(chunkNumber, stringChunk.chunkNumber); 
Full Snippet Info
7
CodeRank
41:	return CASE_INSENSITIVE_ORDER.compare(lPath, rPath); 
Full Snippet Info
6
CodeRank
99:	return comparator.compare(chunkNumber, intChunk.chunkNumber); 
Full Snippet Info
7
CodeRank
228:	if (cc == mc || (cc != null && cc.equals(mc))) { 
Full Snippet Info
6
CodeRank
56:	return CASE_INSENSITIVE_ORDER.compare(lhsLogin, rhsLogin); 
Full Snippet Info
6
CodeRank
113:	return (this.nonNullComparator.equals(other.nonNullComparator) && this.nullsLow == other.nullsLow); 
Full Snippet Info
6
CodeRank
115:	return (this.comparator.equals(other.comparator) && this.ascending == other.ascending); 
Full Snippet Info
6
CodeRank
104:	c = m_cmp.compare(t1.get(m_field), t2.get(m_field)); 
Full Snippet Info
6
CodeRank
35:	return entityComparator.compare(o1.getEntityContainer(), o2.getEntityContainer()); 
Full Snippet Info
6
CodeRank
81:	int advisorPrecedence = this.advisorComparator.compare(o1, o2); 
Full Snippet Info
6
CodeRank
43:	return Integer.valueOf(_comparator.compare(target, argument)); 
Full Snippet Info
6
CodeRank
37:	return entityComparator.compare(o1.getEntity(), o2.getEntity()); 
Full Snippet Info
6
CodeRank
74:	if (comp.compare(left, mid) > 0) { 
75:	if (comp.compare(mid, right) > 0) { 
-
77:	} else if (comp.compare(left, right) > 0) { 
-
83:	if (comp.compare(left, right) > 0) { 
-
85:	} else if (comp.compare(mid, right) > 0) { 
Full Snippet Info
5
CodeRank
28:	return STATIC_VERSION_COMPARATOR.compare(version1, version2); 
Full Snippet Info
6
CodeRank
272:	int position; 
-
278:	} 
Full Snippet Info
5
CodeRank
52:	return this.comparator.compare(c1, c2); 
Full Snippet Info
6
CodeRank