om.java 7.44 KB
import com.google.common.annotations.GwtCompatible;
import com.google.common.base.Objects;
import com.google.common.base.Preconditions;
import com.google.common.collect.BoundType;
import java.io.Serializable;
import java.util.Comparator;
import javax.annotation.Nullable;

@GwtCompatible(serializable=true)
public final class om<T>
  implements Serializable
{
  public final Comparator<? super T> a;
  public final boolean b;
  @Nullable
  public final T c;
  public final BoundType d;
  public final boolean e;
  @Nullable
  public final T f;
  public final BoundType g;
  
  public om(Comparator<? super T> paramComparator, boolean paramBoolean1, @Nullable T paramT1, BoundType paramBoundType1, boolean paramBoolean2, @Nullable T paramT2, BoundType paramBoundType2)
  {
    this.a = ((Comparator)Preconditions.checkNotNull(paramComparator));
    this.b = paramBoolean1;
    this.e = paramBoolean2;
    this.c = paramT1;
    this.d = ((BoundType)Preconditions.checkNotNull(paramBoundType1));
    this.f = paramT2;
    this.g = ((BoundType)Preconditions.checkNotNull(paramBoundType2));
    if (paramBoolean1) {
      paramComparator.compare(paramT1, paramT1);
    }
    if (paramBoolean2) {
      paramComparator.compare(paramT2, paramT2);
    }
    int i;
    if ((paramBoolean1) && (paramBoolean2))
    {
      i = paramComparator.compare(paramT1, paramT2);
      if (i > 0) {
        break label172;
      }
      paramBoolean1 = true;
      Preconditions.checkArgument(paramBoolean1, "lowerEndpoint (%s) > upperEndpoint (%s)", new Object[] { paramT1, paramT2 });
      if (i == 0)
      {
        if (paramBoundType1 == BoundType.OPEN) {
          break label177;
        }
        i = 1;
        label155:
        if (paramBoundType2 == BoundType.OPEN) {
          break label183;
        }
      }
    }
    for (;;)
    {
      Preconditions.checkArgument(i | j);
      return;
      label172:
      paramBoolean1 = false;
      break;
      label177:
      i = 0;
      break label155;
      label183:
      j = 0;
    }
  }
  
  public static <T> om<T> a(Comparator<? super T> paramComparator)
  {
    return new om(paramComparator, false, null, BoundType.OPEN, false, null, BoundType.OPEN);
  }
  
  public final om<T> a(om<T> paramom)
  {
    Preconditions.checkNotNull(paramom);
    Preconditions.checkArgument(this.a.equals(paramom.a));
    boolean bool2 = this.b;
    Object localObject1 = this.c;
    BoundType localBoundType1 = this.d;
    boolean bool1;
    label66:
    boolean bool3;
    Object localObject2;
    BoundType localBoundType2;
    label96:
    label111:
    int i;
    if (!this.b)
    {
      bool1 = paramom.b;
      localObject1 = paramom.c;
      localBoundType1 = paramom.d;
      bool2 = bool1;
      bool3 = this.e;
      localObject2 = this.f;
      localBoundType2 = this.g;
      if (this.e) {
        break label244;
      }
      bool1 = paramom.e;
      localObject2 = paramom.f;
      localBoundType2 = paramom.g;
      paramom = (om<T>)localObject2;
      if ((!bool2) || (!bool1)) {
        break label302;
      }
      i = this.a.compare(localObject1, paramom);
      if ((i <= 0) && ((i != 0) || (localBoundType1 != BoundType.OPEN) || (localBoundType2 != BoundType.OPEN))) {
        break label302;
      }
      localBoundType1 = BoundType.OPEN;
      localBoundType2 = BoundType.CLOSED;
      localObject1 = paramom;
    }
    label244:
    label302:
    for (;;)
    {
      return new om(this.a, bool2, localObject1, localBoundType1, bool1, paramom, localBoundType2);
      if (paramom.b)
      {
        i = this.a.compare(this.c, paramom.c);
        bool1 = bool2;
        if (i < 0) {
          break;
        }
        if (i == 0)
        {
          bool1 = bool2;
          if (paramom.d == BoundType.OPEN) {
            break;
          }
        }
      }
      break label66;
      if (paramom.e)
      {
        i = this.a.compare(this.f, paramom.f);
        bool1 = bool3;
        if (i > 0) {
          break label96;
        }
        if (i == 0)
        {
          bool1 = bool3;
          if (paramom.g == BoundType.OPEN) {
            break label96;
          }
        }
      }
      bool1 = bool3;
      paramom = (om<T>)localObject2;
      break label111;
    }
  }
  
  public final boolean a(@Nullable T paramT)
  {
    int k = 1;
    if (!this.b) {
      return false;
    }
    Object localObject = this.c;
    int j = this.a.compare(paramT, localObject);
    int i;
    if (j < 0)
    {
      i = 1;
      if (j != 0) {
        break label65;
      }
      j = 1;
      label43:
      if (this.d != BoundType.OPEN) {
        break label70;
      }
    }
    for (;;)
    {
      return i | j & k;
      i = 0;
      break;
      label65:
      j = 0;
      break label43;
      label70:
      k = 0;
    }
  }
  
  public final boolean b(@Nullable T paramT)
  {
    int k = 1;
    if (!this.e) {
      return false;
    }
    Object localObject = this.f;
    int j = this.a.compare(paramT, localObject);
    int i;
    if (j > 0)
    {
      i = 1;
      if (j != 0) {
        break label65;
      }
      j = 1;
      label43:
      if (this.g != BoundType.OPEN) {
        break label70;
      }
    }
    for (;;)
    {
      return i | j & k;
      i = 0;
      break;
      label65:
      j = 0;
      break label43;
      label70:
      k = 0;
    }
  }
  
  public final boolean c(@Nullable T paramT)
  {
    return (!a(paramT)) && (!b(paramT));
  }
  
  public final boolean equals(@Nullable Object paramObject)
  {
    boolean bool2 = false;
    boolean bool1 = bool2;
    if ((paramObject instanceof om))
    {
      paramObject = (om)paramObject;
      bool1 = bool2;
      if (this.a.equals(((om)paramObject).a))
      {
        bool1 = bool2;
        if (this.b == ((om)paramObject).b)
        {
          bool1 = bool2;
          if (this.e == ((om)paramObject).e)
          {
            bool1 = bool2;
            if (this.d.equals(((om)paramObject).d))
            {
              bool1 = bool2;
              if (this.g.equals(((om)paramObject).g))
              {
                bool1 = bool2;
                if (Objects.equal(this.c, ((om)paramObject).c))
                {
                  bool1 = bool2;
                  if (Objects.equal(this.f, ((om)paramObject).f)) {
                    bool1 = true;
                  }
                }
              }
            }
          }
        }
      }
    }
    return bool1;
  }
  
  public final int hashCode()
  {
    return Objects.hashCode(new Object[] { this.a, this.c, this.d, this.f, this.g });
  }
  
  public final String toString()
  {
    Object localObject = new StringBuilder().append(this.a).append(":");
    if (this.d == BoundType.CLOSED)
    {
      c1 = '[';
      StringBuilder localStringBuilder = ((StringBuilder)localObject).append(c1);
      if (!this.b) {
        break label108;
      }
      localObject = this.c;
      label51:
      localStringBuilder = localStringBuilder.append(localObject).append(',');
      if (!this.e) {
        break label114;
      }
      localObject = this.f;
      label74:
      localObject = localStringBuilder.append(localObject);
      if (this.g != BoundType.CLOSED) {
        break label120;
      }
    }
    label108:
    label114:
    label120:
    for (char c1 = ']';; c1 = ')')
    {
      return c1;
      c1 = '(';
      break;
      localObject = "-∞";
      break label51;
      localObject = "∞";
      break label74;
    }
  }
}


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