JAXB
v0.21

javax.xml.bind
Class PredicatedLists

java.lang.Object
  |
  +--javax.xml.bind.PredicatedLists

public final class PredicatedLists
extends Object

Lists for implementing schema-derived list properties.

A predicated list enforces a predicate represented by an object that implements the PredicatedLists.Predicate interface. If an attempt is made to add an object that does not satisfy the predicate then an appropriate runtime exception is thrown.

A predicated list optionally invalidates the marshallable object with which it is associated after the list is modified in any way. This ensures that both the marshallable object and the list are revalidated during the next validation operation.

Version:
1.6, 01/05/31

Inner Class Summary
static interface PredicatedLists.Predicate
          A predicate for a predicated list.
 
Method Summary
static List create(MarshallableObject mob, PredicatedLists.Predicate pred, List list)
          Constructs a new predicated list.
static List createInvalidating(MarshallableObject mob, PredicatedLists.Predicate pred, List list)
          Constructs a new invalidating predicated list.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

create

public static List create(MarshallableObject mob,
                          PredicatedLists.Predicate pred,
                          List list)
Constructs a new predicated list.

Parameters:
mob - The marshallable object with which the new predicated list is to be associated
pred - The predicate to be enforced upon list elements
list - The list that will back the new predicated list
Returns:
The new predicated list

createInvalidating

public static List createInvalidating(MarshallableObject mob,
                                      PredicatedLists.Predicate pred,
                                      List list)
Constructs a new invalidating predicated list.

The given marshallable object will be invalidated each time the list is modified.

Parameters:
mob - The marshallable object with which the new predicated list is to be associated
pred - The predicate to be enforced upon list elements
list - The list that will back the new predicated list
Returns:
The new predicated list

JAXB
v0.21


Comments to: jaxb-comments@java.sun.com
More information at: http://java.sun.com/xml/jaxb

Copyright © 2001 by Sun Microsystems, Inc., 901 San Antonio Road,
Palo Alto, California, 94303, U.S.A. All Rights Reserved.