org.apache.wicket.util
Class ValueProvider<T>

java.lang.Object
  extended by org.apache.wicket.util.ValueProvider<T>
Type Parameters:
T - type of value this provider provides
All Implemented Interfaces:
IProvider<T>

public class ValueProvider<T>
extends java.lang.Object
implements IProvider<T>

Provider that always provides the specified value.

Author:
igor.vaynberg

Constructor Summary
ValueProvider(T value)
          Construct.
 
Method Summary
 T get()
          Provides an instance of type T
static
<T> ValueProvider<T>
of(T value)
          Creates a provider for the specified value
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ValueProvider

public ValueProvider(T value)
Construct.

Parameters:
value - value to provide
Method Detail

get

public T get()
Description copied from interface: IProvider
Provides an instance of type T

Specified by:
get in interface IProvider<T>
Returns:
instance of type T

of

public static <T> ValueProvider<T> of(T value)
Creates a provider for the specified value

Type Parameters:
T - type of value
Parameters:
value - value
Returns:
provider


Copyright © 2006-2011 Apache Software Foundation. All Rights Reserved.