JBoss Modular Service Kernel API 1.0.0.CR2

org.jboss.msc.value
Class InjectedSetValue<T>

java.lang.Object
  extended by org.jboss.msc.value.InjectedSetValue<T>
Type Parameters:
T - the value type
All Implemented Interfaces:
Value<Set<T>>

public final class InjectedSetValue<T>
extends Object
implements Value<Set<T>>

A Set value that can have entries injected into it. The underlying set is an instance of LinkedHashSet, so iteration order will be consistent.

The injector() method is used to get an injector that can inject into the set.

Author:
Stuart Douglas

Constructor Summary
InjectedSetValue()
          Construct a new instance.
 
Method Summary
 Set<T> getOptionalValue()
          
 Set<T> getValue()
          Get the actual value.
 Injector<T> injector()
          Gets an injector for this set.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InjectedSetValue

public InjectedSetValue()
Construct a new instance.

Method Detail

getValue

public Set<T> getValue()
                throws IllegalStateException
Get the actual value.

Specified by:
getValue in interface Value<Set<T>>
Returns:
the actual value
Throws:
IllegalStateException - if the value is time-sensitive and the current state does not allow retrieval.

getOptionalValue

public Set<T> getOptionalValue()


injector

public Injector<T> injector()
Gets an injector for this set.

Returns:
An Injector that can inject into the value set.

JBoss Modular Service Kernel API 1.0.0.CR2

Copyright © 2011 JBoss, a division of Red Hat, Inc.