RemovalNotification.java 2.34 KB
package com.google.common.cache;

import com.google.common.annotations.Beta;
import com.google.common.annotations.GwtCompatible;
import com.google.common.base.Objects;
import com.google.common.base.Preconditions;
import java.util.Map.Entry;
import javax.annotation.Nullable;

@Beta
@GwtCompatible
public final class RemovalNotification<K, V>
  implements Map.Entry<K, V>
{
  @Nullable
  private final K a;
  @Nullable
  private final V b;
  private final RemovalCause c;
  
  public RemovalNotification(@Nullable K paramK, @Nullable V paramV, RemovalCause paramRemovalCause)
  {
    this.a = paramK;
    this.b = paramV;
    this.c = ((RemovalCause)Preconditions.checkNotNull(paramRemovalCause));
  }
  
  public final boolean equals(@Nullable Object paramObject)
  {
    boolean bool2 = false;
    boolean bool1 = bool2;
    if ((paramObject instanceof Map.Entry))
    {
      paramObject = (Map.Entry)paramObject;
      bool1 = bool2;
      if (Objects.equal(getKey(), ((Map.Entry)paramObject).getKey()))
      {
        bool1 = bool2;
        if (Objects.equal(getValue(), ((Map.Entry)paramObject).getValue())) {
          bool1 = true;
        }
      }
    }
    return bool1;
  }
  
  public final RemovalCause getCause()
  {
    return this.c;
  }
  
  @Nullable
  public final K getKey()
  {
    return (K)this.a;
  }
  
  @Nullable
  public final V getValue()
  {
    return (V)this.b;
  }
  
  public final int hashCode()
  {
    int j = 0;
    Object localObject1 = getKey();
    Object localObject2 = getValue();
    int i;
    if (localObject1 == null)
    {
      i = 0;
      if (localObject2 != null) {
        break label36;
      }
    }
    for (;;)
    {
      return j ^ i;
      i = localObject1.hashCode();
      break;
      label36:
      j = localObject2.hashCode();
    }
  }
  
  public final V setValue(V paramV)
  {
    throw new UnsupportedOperationException();
  }
  
  public final String toString()
  {
    String str1 = String.valueOf(String.valueOf(getKey()));
    String str2 = String.valueOf(String.valueOf(getValue()));
    return str1.length() + 1 + str2.length() + str1 + "=" + str2;
  }
  
  public final boolean wasEvicted()
  {
    return this.c.a();
  }
}


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