nf.java 5.38 KB
import com.google.common.annotations.GwtCompatible;
import com.google.common.collect.Collections2;
import com.google.common.collect.Iterators;
import com.google.common.collect.Maps;
import com.google.common.collect.Table;
import com.google.common.collect.Table.Cell;
import com.google.common.collect.Tables;
import java.util.AbstractCollection;
import java.util.AbstractSet;
import java.util.Collection;
import java.util.Iterator;
import java.util.Map;
import java.util.Set;
import javax.annotation.Nullable;

@GwtCompatible
public abstract class nf<R, C, V>
  implements Table<R, C, V>
{
  private transient Set<Table.Cell<R, C, V>> a;
  private transient Collection<V> b;
  
  public Set<Table.Cell<R, C, V>> a()
  {
    return new nf.a();
  }
  
  public abstract Iterator<Table.Cell<R, C, V>> b();
  
  public Collection<V> c()
  {
    return new nf.b();
  }
  
  public Set<Table.Cell<R, C, V>> cellSet()
  {
    Set localSet2 = this.a;
    Set localSet1 = localSet2;
    if (localSet2 == null)
    {
      localSet1 = a();
      this.a = localSet1;
    }
    return localSet1;
  }
  
  public void clear()
  {
    Iterators.b(cellSet().iterator());
  }
  
  public Set<C> columnKeySet()
  {
    return columnMap().keySet();
  }
  
  public boolean contains(@Nullable Object paramObject1, @Nullable Object paramObject2)
  {
    paramObject1 = (Map)Maps.a(rowMap(), paramObject1);
    return (paramObject1 != null) && (Maps.b((Map)paramObject1, paramObject2));
  }
  
  public boolean containsColumn(@Nullable Object paramObject)
  {
    return Maps.b(columnMap(), paramObject);
  }
  
  public boolean containsRow(@Nullable Object paramObject)
  {
    return Maps.b(rowMap(), paramObject);
  }
  
  public boolean containsValue(@Nullable Object paramObject)
  {
    Iterator localIterator = rowMap().values().iterator();
    while (localIterator.hasNext()) {
      if (((Map)localIterator.next()).containsValue(paramObject)) {
        return true;
      }
    }
    return false;
  }
  
  public Iterator<V> d()
  {
    new qg(cellSet().iterator()) {};
  }
  
  public boolean equals(@Nullable Object paramObject)
  {
    return Tables.a(this, paramObject);
  }
  
  public V get(@Nullable Object paramObject1, @Nullable Object paramObject2)
  {
    paramObject1 = (Map)Maps.a(rowMap(), paramObject1);
    if (paramObject1 == null) {
      return null;
    }
    return (V)Maps.a((Map)paramObject1, paramObject2);
  }
  
  public int hashCode()
  {
    return cellSet().hashCode();
  }
  
  public boolean isEmpty()
  {
    return size() == 0;
  }
  
  public V put(R paramR, C paramC, V paramV)
  {
    return (V)row(paramR).put(paramC, paramV);
  }
  
  public void putAll(Table<? extends R, ? extends C, ? extends V> paramTable)
  {
    paramTable = paramTable.cellSet().iterator();
    while (paramTable.hasNext())
    {
      Table.Cell localCell = (Table.Cell)paramTable.next();
      put(localCell.getRowKey(), localCell.getColumnKey(), localCell.getValue());
    }
  }
  
  public V remove(@Nullable Object paramObject1, @Nullable Object paramObject2)
  {
    paramObject1 = (Map)Maps.a(rowMap(), paramObject1);
    if (paramObject1 == null) {
      return null;
    }
    return (V)Maps.c((Map)paramObject1, paramObject2);
  }
  
  public Set<R> rowKeySet()
  {
    return rowMap().keySet();
  }
  
  public String toString()
  {
    return rowMap().toString();
  }
  
  public Collection<V> values()
  {
    Collection localCollection2 = this.b;
    Collection localCollection1 = localCollection2;
    if (localCollection2 == null)
    {
      localCollection1 = c();
      this.b = localCollection1;
    }
    return localCollection1;
  }
  
  final class a
    extends AbstractSet<Table.Cell<R, C, V>>
  {
    a() {}
    
    public final void clear()
    {
      nf.this.clear();
    }
    
    public final boolean contains(Object paramObject)
    {
      if ((paramObject instanceof Table.Cell))
      {
        paramObject = (Table.Cell)paramObject;
        Map localMap = (Map)Maps.a(nf.this.rowMap(), ((Table.Cell)paramObject).getRowKey());
        return (localMap != null) && (Collections2.a(localMap.entrySet(), Maps.immutableEntry(((Table.Cell)paramObject).getColumnKey(), ((Table.Cell)paramObject).getValue())));
      }
      return false;
    }
    
    public final Iterator<Table.Cell<R, C, V>> iterator()
    {
      return nf.this.b();
    }
    
    public final boolean remove(@Nullable Object paramObject)
    {
      if ((paramObject instanceof Table.Cell))
      {
        paramObject = (Table.Cell)paramObject;
        Map localMap = (Map)Maps.a(nf.this.rowMap(), ((Table.Cell)paramObject).getRowKey());
        return (localMap != null) && (Collections2.b(localMap.entrySet(), Maps.immutableEntry(((Table.Cell)paramObject).getColumnKey(), ((Table.Cell)paramObject).getValue())));
      }
      return false;
    }
    
    public final int size()
    {
      return nf.this.size();
    }
  }
  
  final class b
    extends AbstractCollection<V>
  {
    b() {}
    
    public final void clear()
    {
      nf.this.clear();
    }
    
    public final boolean contains(Object paramObject)
    {
      return nf.this.containsValue(paramObject);
    }
    
    public final Iterator<V> iterator()
    {
      return nf.this.d();
    }
    
    public final int size()
    {
      return nf.this.size();
    }
  }
}


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