Package cz.o2.proxima.core.util
Class SerializableScopedValue<C,V>
- java.lang.Object
-
- cz.o2.proxima.core.util.SerializableScopedValue<C,V>
-
- Type Parameters:
C
- context type parameterV
- type parameter
- All Implemented Interfaces:
java.io.Serializable
public final class SerializableScopedValue<C,V> extends java.lang.Object implements java.io.Serializable
A value that holds aSerializable
value and scopes its value to given context.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SerializableScopedValue(C context, V value)
SerializableScopedValue(Factory<V> what)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object obj)
V
get(C context)
int
hashCode()
void
reset(C context)
Clear reference for given context and reinitialize it when accessed again.java.lang.String
toString()
-
-
-
Method Detail
-
reset
public void reset(C context)
Clear reference for given context and reinitialize it when accessed again.- Parameters:
context
- context type parameter
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-