Class IdentityRef<T>
- java.lang.Object
-
- com.google.javascript.jscomp.base.IdentityRef<T>
-
public final class IdentityRef<T> extends java.lang.Object
A reference to another object that uses the identity semantics of that object for equality.The intended purpose of these references is to make give identity semantics to
Map
keys. For example,LinkedHashMap<IdentityRef<Foo>, Bar>
, behaves as anIdentityHashMap
but with deterministic iteration order.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
T
get()
int
hashCode()
static <U> IdentityRef<U>
of(U value)
java.lang.String
toString()
-
-
-
Method Detail
-
of
public static <U> IdentityRef<U> of(U value)
-
get
public T get()
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-