org.dishevelled.observable.impl
Class ObservableUtils

java.lang.Object
  extended by org.dishevelled.observable.impl.ObservableUtils

public final class ObservableUtils
extends Object

Utility methods for creating observable collection and map interface decorators.

Version:
$Revision$ $Date$
Author:
Michael Heuer

Method Summary
static
<T> ObservableCollection<T>
observableCollection(Collection<T> collection)
          Create and return a new simple observable decorator for the specified collection.
static
<T> ObservableList<T>
observableList(List<T> list)
          Create and return a new simple observable decorator for the specified list.
static
<K,V> ObservableMap<K,V>
observableMap(Map<K,V> map)
          Create and return a new simple observable decorator for the specified map.
static
<T> ObservableQueue<T>
observableQueue(Queue<T> queue)
          Create and return a new simple observable decorator for the specified set.
static
<T> ObservableSet<T>
observableSet(Set<T> set)
          Create and return a new simple observable decorator for the specified set.
static
<K,V> ObservableSortedMap<K,V>
observableSortedMap(SortedMap<K,V> sortedMap)
          Create and return a new simple observable decorator for the specified sorted map.
static
<T> ObservableSortedSet<T>
observableSortedSet(SortedSet<T> sortedSet)
          Create and return a new simple observable decorator for the specified sorted set.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

observableCollection

public static <T> ObservableCollection<T> observableCollection(Collection<T> collection)
Create and return a new simple observable decorator for the specified collection.

Type Parameters:
T - collection element type
Parameters:
collection - collection to decorate, must not be null
Returns:
a new simple observable decorator for the specified collection

observableList

public static <T> ObservableList<T> observableList(List<T> list)
Create and return a new simple observable decorator for the specified list.

Type Parameters:
T - list element type
Parameters:
list - list to decorate, must not be null
Returns:
a new simple observable decorator for the specified list

observableMap

public static <K,V> ObservableMap<K,V> observableMap(Map<K,V> map)
Create and return a new simple observable decorator for the specified map.

Type Parameters:
K - map key type
V - map value type
Parameters:
map - map to decorate, must not be null
Returns:
a new simple observable decorator for the specified map

observableQueue

public static <T> ObservableQueue<T> observableQueue(Queue<T> queue)
Create and return a new simple observable decorator for the specified set.

Type Parameters:
T - queue element type
Parameters:
queue - queue to decorate, must not be null
Returns:
a new simple observable decorator for the specified queue

observableSet

public static <T> ObservableSet<T> observableSet(Set<T> set)
Create and return a new simple observable decorator for the specified set.

Type Parameters:
T - set element type
Parameters:
set - set to decorate, must not be null
Returns:
a new simple observable decorator for the specified set

observableSortedMap

public static <K,V> ObservableSortedMap<K,V> observableSortedMap(SortedMap<K,V> sortedMap)
Create and return a new simple observable decorator for the specified sorted map.

Type Parameters:
K - sorted map key type
V - sorted map value type
Parameters:
sortedMap - sorted map to decorate, must not be null
Returns:
a new simple observable decorator for the specified sorted map

observableSortedSet

public static <T> ObservableSortedSet<T> observableSortedSet(SortedSet<T> sortedSet)
Create and return a new simple observable decorator for the specified sorted set.

Type Parameters:
T - sorted set element type
Parameters:
sortedSet - sorted set to decorate, must not be null
Returns:
a new simple observable decorator for the specified sorted set


Copyright (c) 2003-2012 held jointly by the individual authors. Licensed under the GNU Lesser General Public License (LGPL).