Java Code Examples for com.google.common.collect.Multiset#equals()
The following examples show how to use
com.google.common.collect.Multiset#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: ClassMapper.java From OSRS-Deobfuscator with BSD 2-Clause "Simplified" License | 6 votes |
public boolean same() { Multiset<Type> c1 = fieldCardinalities(one), c2 = fieldCardinalities(two); if (!c1.equals(c2)) { return false; } Multiset<Signature> s1 = methodCardinalities(one); Multiset<Signature> s2 = methodCardinalities(two); if (!s1.equals(s2)) { return false; } return true; }
Example 2
Source File: Anagram.java From tutorials with MIT License | 5 votes |
public boolean isAnagramMultiset(String string1, String string2) { if (string1.length() != string2.length()) { return false; } Multiset<Character> multiset1 = HashMultiset.create(); Multiset<Character> multiset2 = HashMultiset.create(); for (int i = 0; i < string1.length(); i++) { multiset1.add(string1.charAt(i)); multiset2.add(string2.charAt(i)); } return multiset1.equals(multiset2); }