com.openharbor.beck.configure
Class When

java.lang.Object
  extended byjava.util.AbstractCollection
      extended byjava.util.AbstractList
          extended byjava.util.ArrayList
              extended bycom.openharbor.beck.configure.Mapping
                  extended bycom.openharbor.beck.configure.When
All Implemented Interfaces:
java.lang.Cloneable, java.util.Collection, Configuration, java.util.List, java.util.RandomAccess, java.io.Serializable

public class When
extends Mapping

A conditional Mapping. Returns no information for a request that doesn't match a configured predicate; otherwise inherits the behavior of a Mapping.

This class is designed primarily to unmarshal easily from legible XML.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class com.openharbor.beck.map.Configuration
Configuration.MarshalSelector, Configuration.Selector, Configuration.UnmarshalSelector
 
Field Summary
protected  Predicate predicate
           
 
Fields inherited from class com.openharbor.beck.configure.Mapping
log
 
Fields inherited from class java.util.AbstractList
modCount
 
Fields inherited from interface com.openharbor.beck.map.Configuration
CLASS, EMPTY_STRING, EXCLUDE_PROPERTIES, FACTORY, GETTER, IDENTIFIER, INCLUDE_PROPERTIES, MAP_FROM_XML, MAPPER, MARSHALLER, MINIMAL_XML, MODEL, NAMER, NO_XML, PACKAGES, PROPERTY, RECEIVER, SETTER, UNMARSHALLER, XML
 
Constructor Summary
When(Predicate predicate)
           
 
Method Summary
 java.lang.Object get(Configuration.Selector selector)
          Get configuration information.
 java.lang.String toString()
           
 
Methods inherited from class java.util.ArrayList
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, remove, removeRange, set, size, toArray, toArray, trimToSize
 
Methods inherited from class java.util.AbstractList
equals, hashCode, iterator, listIterator, listIterator, subList
 
Methods inherited from class java.util.AbstractCollection
containsAll, remove, removeAll, retainAll
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
containsAll, equals, hashCode, iterator, listIterator, listIterator, remove, removeAll, retainAll, subList
 

Field Detail

predicate

protected Predicate predicate
Constructor Detail

When

public When(Predicate predicate)
Method Detail

toString

public java.lang.String toString()

get

public java.lang.Object get(Configuration.Selector selector)
Description copied from interface: Configuration
Get configuration information. This method must be thread-safe; that is, when called concurrently by multiple threads, the object returned to each thread must be independent of the threads' order of execution. This is ordinarily achieved by not modifying any objects.

Specified by:
get in interface Configuration
Overrides:
get in class Mapping