os.java 2.29 KB
import com.google.common.annotations.GwtCompatible;
import com.google.common.collect.ImmutableSet;
import com.google.common.collect.Iterables;
import com.google.common.collect.Iterators;
import com.google.common.collect.UnmodifiableIterator;
import java.io.Serializable;
import java.util.Collection;
import java.util.EnumSet;

@GwtCompatible(emulated=true, serializable=true)
public final class os<E extends Enum<E>>
  extends ImmutableSet<E>
{
  private final transient EnumSet<E> a;
  private transient int b;
  
  private os(EnumSet<E> paramEnumSet)
  {
    this.a = paramEnumSet;
  }
  
  public static <E extends Enum<E>> ImmutableSet<E> a(EnumSet<E> paramEnumSet)
  {
    switch (paramEnumSet.size())
    {
    default: 
      return new os(paramEnumSet);
    case 0: 
      return ImmutableSet.of();
    }
    return ImmutableSet.of(Iterables.getOnlyElement(paramEnumSet));
  }
  
  final boolean a()
  {
    return false;
  }
  
  public final boolean contains(Object paramObject)
  {
    return this.a.contains(paramObject);
  }
  
  public final boolean containsAll(Collection<?> paramCollection)
  {
    return this.a.containsAll(paramCollection);
  }
  
  public final boolean equals(Object paramObject)
  {
    return (paramObject == this) || (this.a.equals(paramObject));
  }
  
  public final int hashCode()
  {
    int j = this.b;
    int i = j;
    if (j == 0)
    {
      i = this.a.hashCode();
      this.b = i;
    }
    return i;
  }
  
  public final boolean isEmpty()
  {
    return this.a.isEmpty();
  }
  
  public final UnmodifiableIterator<E> iterator()
  {
    return Iterators.unmodifiableIterator(this.a.iterator());
  }
  
  public final int size()
  {
    return this.a.size();
  }
  
  public final String toString()
  {
    return this.a.toString();
  }
  
  final Object writeReplace()
  {
    return new os.a(this.a);
  }
  
  static final class a<E extends Enum<E>>
    implements Serializable
  {
    private static final long serialVersionUID = 0L;
    final EnumSet<E> a;
    
    a(EnumSet<E> paramEnumSet)
    {
      this.a = paramEnumSet;
    }
    
    final Object readResolve()
    {
      return new os(this.a.clone(), (byte)0);
    }
  }
}


/* Location:              /home/merong/decompile/hackery-dex2jar.jar!/os.class
 * Java compiler version: 6 (50.0)
 * JD-Core Version:       0.7.1
 */