Overview | Package | Class | Tree | Deprecated | Index | Help
| J avolution v5.2 (J2SE 1.5+)
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## javolution.context
Class AllocatorContext.Reference<T>

    java.lang.Object
      javolution.context.AllocatorContext.Reference<T>

All Implemented Interfaces:
  Reference<T>

Enclosing class:
  AllocatorContext

    public static class AllocatorContext.Reference<T>

extends java.lang.Object
implements Reference<T>

This class represents a `reference` allocated from the current `AllocatorContext`. The reachability level of this reference is the scope of the `AllocatorContext` in which it has been `created`.

Version:
  5.0, April 14, 2007
Author:
  Jean-Marie Dautelle

Constructor Summary
`AllocatorContext.Reference()` Default constructor.

Method Summary
`T` | `get()` Returns the value this reference referes to.
`static
`<T> AllocatorContext.Reference<T>`
` | `newInstance()` Returns a new stack reference instance allocated on the current stack when executing in a `StackContext`.
`void` | `set(T value)` Sets the value this reference referes to.
`java.lang.String` | `toString()` Returns the string representation of the current value of this reference.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### AllocatorContext.Reference

    public AllocatorContext.Reference()

  Default constructor.

Method Detail

### newInstance

    public static <T> AllocatorContext.Reference<T> newInstance()

  Returns a new stack reference instance allocated on the current stack when executing in a `StackContext`.

  Returns:
    a reference object possibly recycled.

### toString

    public java.lang.String toString()

  Returns the string representation of the current value of this reference.

  Overrides:
    `toString` in class `java.lang.Object`
  Returns:
    `String.valueOf(this.get())`

### get

    public final T get()

  Description copied from interface: `Reference`
  Returns the value this reference referes to.

  Specified by:
    `get` in interface `Reference<T>`
  Returns:
    the referent or `null` if not set.

### set

    public final void set(T value)

  Description copied from interface: `Reference`
  Sets the value this reference referes to.

  Specified by:
    `set` in interface `Reference<T>`
  Parameters:
    `value` - the reference value.

Overview | Package | Class | Tree | Deprecated | Index | Help
| J avolution v5.2 (J2SE 1.5+)
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2005 - 2007 Javolution.