org.hypergraphdb
Class ReadyRef<T>

java.lang.Object
  extended by org.hypergraphdb.ReadyRef<T>
Type Parameters:
T -
All Implemented Interfaces:
LazyRef<T>

public final class ReadyRef<T>
extends java.lang.Object
implements LazyRef<T>

An implementation of LazyRef that simply encapsulates an existing value. Use it to pass a known value as a parameter to a method expecting a LazyRef.

Author:
Borislav Iordanov

Constructor Summary
ReadyRef(T value)
           
 
Method Summary
 T deref()
          Return the actual value that this reference encapsulate.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReadyRef

public ReadyRef(T value)
Method Detail

deref

public T deref()
Description copied from interface: LazyRef

Return the actual value that this reference encapsulate. Concrete implementation may perform a length operation in order to get to the value.

Specified by:
deref in interface LazyRef<T>