Package net.shibboleth.shared.testing

# Class ConstantSupplier<T>

java.lang.Object
net.shibboleth.shared.testing.ConstantSupplier<T>

Type Parameters:
  `T` - type of supplier

All Implemented Interfaces:
  `Supplier<T>`, `NonnullSupplier<T>`

public final class ConstantSupplier<T> extends Object implements NonnullSupplier<T>
Implementation of `NonnullSupplier` which returns an unchanging value.

## Field Summary

Fields
Modifier and Type
Field
Description
`private final T`
`theValue`
The value we will return.

## Constructor Summary

Constructors
Constructor
Description
`ConstantSupplier(T value)`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`T`
`get()`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### theValue

@Nonnull private final T theValue
The value we will return.

## Constructor Details

### ConstantSupplier

public ConstantSupplier(@Nonnull T value)
Constructor.

Parameters:
  `value` - the value to set

## Method Details

### get

@Nonnull public T get()

Specified by:
  `get` in interface `NonnullSupplier<T>`
Specified by:
  `get` in interface `Supplier<T>`