Class IdentityRef<T>
- java.lang.Object
-
- com.google.javascript.jscomp.base.IdentityRef<T>
-
public final class IdentityRef<T> extends java.lang.ObjectA 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
Mapkeys. For example,LinkedHashMap<IdentityRef<Foo>, Bar>, behaves as anIdentityHashMapbut with deterministic iteration order.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object o)Tget()inthashCode()static <U> IdentityRef<U>of(U value)java.lang.StringtoString()
-
-
-
Method Detail
-
of
public static <U> IdentityRef<U> of(U value)
-
get
public T get()
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-