nl.java 1.61 KB
import com.google.common.annotations.GwtCompatible;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.Ordering;
import java.io.Serializable;
import java.util.Comparator;

@GwtCompatible(serializable=true)
public final class nl<T>
  extends Ordering<T>
  implements Serializable
{
  private static final long serialVersionUID = 0L;
  final ImmutableList<Comparator<? super T>> a;
  
  public nl(Iterable<? extends Comparator<? super T>> paramIterable)
  {
    this.a = ImmutableList.copyOf(paramIterable);
  }
  
  public nl(Comparator<? super T> paramComparator1, Comparator<? super T> paramComparator2)
  {
    this.a = ImmutableList.of(paramComparator1, paramComparator2);
  }
  
  public final int compare(T paramT1, T paramT2)
  {
    int j = this.a.size();
    int i = 0;
    while (i < j)
    {
      int k = ((Comparator)this.a.get(i)).compare(paramT1, paramT2);
      if (k != 0) {
        return k;
      }
      i += 1;
    }
    return 0;
  }
  
  public final boolean equals(Object paramObject)
  {
    if (paramObject == this) {
      return true;
    }
    if ((paramObject instanceof nl))
    {
      paramObject = (nl)paramObject;
      return this.a.equals(((nl)paramObject).a);
    }
    return false;
  }
  
  public final int hashCode()
  {
    return this.a.hashCode();
  }
  
  public final String toString()
  {
    String str = String.valueOf(String.valueOf(this.a));
    return str.length() + 19 + "Ordering.compound(" + str + ")";
  }
}


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