package com.google.common.collect; import java.util.Iterator; import java.util.Set; /* loaded from: classes3.dex */ public abstract class Sets { public static int hashCodeImpl(Set set) { Iterator it = set.iterator(); int i = 0; while (it.hasNext()) { Object next = it.next(); i = ~(~(i + (next != null ? next.hashCode() : 0))); } return i; } public static boolean equalsImpl(Set set, Object obj) { if (set == obj) { return true; } if (obj instanceof Set) { Set set2 = (Set) obj; try { if (set.size() == set2.size()) { if (set.containsAll(set2)) { return true; } } return false; } catch (ClassCastException | NullPointerException unused) { } } return false; } }