com.springsource.util.common
Class StaticSetProvider<T>

java.lang.Object
  extended by com.springsource.util.common.StaticSetProvider<T>
Type Parameters:
T - type of elements of set
All Implemented Interfaces:
SetProvider<T>

public class StaticSetProvider<T>
extends java.lang.Object
implements SetProvider<T>

An implementation of SetProvider that takes a static list of elements and returns them for every request for a set.

Concurrent Semantics
Threadsafe

Author:
Ben Hale

Field Summary
private  java.util.Set<T> set
           
 
Constructor Summary
StaticSetProvider(T... items)
           
 
Method Summary
 java.util.Set<T> getSet()
          Implementations of this must provide thread safe sets for iteration.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

set

private final java.util.Set<T> set
Constructor Detail

StaticSetProvider

public StaticSetProvider(T... items)
Method Detail

getSet

public java.util.Set<T> getSet()
Description copied from interface: SetProvider
Implementations of this must provide thread safe sets for iteration. e.g. This can be achieved by either returning a new set or one that implements thread safety with internal locking.

Specified by:
getSet in interface SetProvider<T>
Returns:
the Set of service objects