org.openmdx.base.accessor.jmi.spi
Class RefContainer_1

java.lang.Object
  extended by java.util.AbstractCollection
      extended by org.openmdx.base.accessor.jmi.spi.RefContainer_1
All Implemented Interfaces:
Serializable, Iterable, Collection, RefContainer_1_0, Container

public class RefContainer_1
extends AbstractCollection
implements Serializable, RefContainer_1_0

See Also:
Serialized Form

Constructor Summary
RefContainer_1(Marshaller marshaller, FilterableMap container)
          Constructor
 
Method Summary
 boolean add(Object o)
           
 Object get(Object filter)
          Select an object matching the filter.
 Iterator iterator()
           
 void refAddValue(String qualifier, Object value)
          Adds object to the container with qualifier.
 FilterableMap refDelegate()
           
 int size()
           
 Container subSet(Object filter)
          Selects objects matching the filter.
 List toList(Object criteria)
          Applies given criteria to the elements of the container and returns the result as list.
 
Methods inherited from class java.util.AbstractCollection
addAll, clear, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Collection
addAll, clear, contains, containsAll, equals, hashCode, isEmpty, remove, removeAll, retainAll, toArray, toArray
 

Constructor Detail

RefContainer_1

public RefContainer_1(Marshaller marshaller,
                      FilterableMap container)
Constructor

Parameters:
the - marshaller to be applied to the elements, filter and order objects.
The - delegate contains unmarshalled elements
Method Detail

refDelegate

public FilterableMap refDelegate()

refAddValue

public void refAddValue(String qualifier,
                        Object value)
Description copied from interface: RefContainer_1_0
Adds object to the container with qualifier. Adding an object to a container with add(value) is equivalent to refAddValue(null, value).

Specified by:
refAddValue in interface RefContainer_1_0

subSet

public Container subSet(Object filter)
Description copied from interface: Container
Selects objects matching the filter.

The semantics of the collection returned by this method become undefined if the backing collection (i.e., this container) is structurally modified in any way other than via the returned collection. (Structural modifications are those that change the size of this list, or otherwise perturb it in such a fashion that iterations in progress may yield incorrect results.)

This method returns a Collection as opposed to a Set because it behaves as set in respect to object id equality, not element equality.

The acceptable filter object classes must be specified by the container implementation.

Specified by:
subSet in interface Container
Parameters:
filter - The filter to be applied to objects of this container
Returns:
A subset of this container containing the objects matching the filter.

toList

public List toList(Object criteria)
Description copied from interface: Container
Applies given criteria to the elements of the container and returns the result as list.

The acceptable criteria classes must be specified by the container implementation.

Specified by:
toList in interface Container
Parameters:
criteria - The criteria to be applied to objects of this container; or null for all the container's elements in their default order.
Returns:
a list based on the container's elements and the given criteria.

iterator

public Iterator iterator()
Specified by:
iterator in interface Iterable
Specified by:
iterator in interface Collection
Specified by:
iterator in class AbstractCollection

size

public int size()
Specified by:
size in interface Collection
Specified by:
size in class AbstractCollection

get

public Object get(Object filter)
Description copied from interface: Container
Select an object matching the filter.

The acceptable filter object classes must be specified by the Container implementation.

Specified by:
get in interface Container
Parameters:
filter - The filter to be applied to objects of this container
Returns:
the object matching the filter; or null if no object matches the filter.

add

public boolean add(Object o)
Specified by:
add in interface Collection
Overrides:
add in class AbstractCollection


This software is published under the BSD license. Copyright © 2003-2007, OMEX AG, Switzerland, All rights reserved. Use is subject to license terms.