ch.elca.el4j.util.observer.impl
Class LiveValueFactory

java.lang.Object
  extended by ch.elca.el4j.util.observer.impl.LiveValueFactory

public final class LiveValueFactory
extends Object

Convenience class providing a few standard LiveValues.

Author:
Adrian Moos (AMS)
File-location:
LiveValueFactory
Last check-in date:
2009-08-04 15:17:52 +0200 (Di, 04. Aug 2009) by swismer for revision 3880

Method Summary
static
<T> LiveValue<T>
shadow(ObservableValue<? extends T> lower, ObservableValue<? extends T> upper)
          Returns a LiveValue that yields the value of upper if it is not null, or the value of lower otherwise.
static
<T,OC extends ObservableValue<? extends Collection<? extends T>>>
LiveValue<T>
theElementIn(OC oc)
          Returns a LiveValue backed by a Collection that yields the collection's unique element or null if there is no such element.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

theElementIn

public static <T,OC extends ObservableValue<? extends Collection<? extends T>>> LiveValue<T> theElementIn(OC oc)
Returns a LiveValue backed by a Collection that yields the collection's unique element or null if there is no such element.

Parameters:
oc - the backing collection
Returns:
see above.

shadow

public static <T> LiveValue<T> shadow(ObservableValue<? extends T> lower,
                                      ObservableValue<? extends T> upper)
Returns a LiveValue that yields the value of upper if it is not null, or the value of lower otherwise.

Parameters:
lower - .
upper - .
Returns:
.


Copyright © 2005-2011 ELCA. All Rights Reserved.