org.modeshape.jcr.value.basic

## Class AbstractValueFactories

- java.lang.Object
- - org.modeshape.jcr.value.basic.AbstractValueFactories

- All Implemented Interfaces:
    Iterable<ValueFactory<?>>, NameFactory.Holder, ValueFactories

      @ThreadSafe
      public abstract class AbstractValueFactories
      extends Object
      implements ValueFactories

  Abstract implementation of `ValueFactories` that implements all the methods other than the `get*Factory()` methods. Subclasses can simply implement these methods and inherit the `iterator()`, `getValueFactory(Object)` and `getValueFactory(PropertyType)` method implementations.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `protected class` | `AbstractValueFactories.ValueFactoryIterator`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AbstractValueFactories()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `ValueFactory<?>` | `getValueFactory(Object prototype)` Get the value factory that is best able to create values with the most natural type given by the supplied value.
    `ValueFactory<?>` | `getValueFactory(PropertyType type)` Get the value factory that creates values of the supplied `type`.
    `Iterator<ValueFactory<?>>` | `iterator()` This implementation always iterates over the instances return by the `get*Factory()` methods.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface org.modeshape.jcr.value.ValueFactories

      `getBinaryFactory, getBooleanFactory, getDateFactory, getDecimalFactory, getDoubleFactory, getLongFactory, getNameFactory, getObjectFactory, getPathFactory, getReferenceFactory, getSimpleReferenceFactory, getStringFactory, getTypeSystem, getUriFactory, getUuidFactory, getWeakReferenceFactory`

- - ### Constructor Detail

    - #### AbstractValueFactories

          public AbstractValueFactories()

  - ### Method Detail

    - #### iterator

          public Iterator<ValueFactory<?>> iterator()

      This implementation always iterates over the instances return by the `get*Factory()` methods.

      Specified by:
        `iterator` in interface `Iterable<ValueFactory<?>>`

    - #### getValueFactory

          public ValueFactory<?> getValueFactory(PropertyType type)

      Description copied from interface: `ValueFactories`
      Get the value factory that creates values of the supplied `type`.
      Specified by:
        `getValueFactory` in interface `ValueFactories`
      Parameters:
        `type` - the type for the values
      Returns:
        the factory; never null

    - #### getValueFactory

          public ValueFactory<?> getValueFactory(Object prototype)

      Description copied from interface: `ValueFactories`
      Get the value factory that is best able to create values with the most natural type given by the supplied value.
      Specified by:
        `getValueFactory` in interface `ValueFactories`
      Parameters:
        `prototype` - the value that should be used to determine the best value factory
      Returns:
        the factory; never null

Copyright © 2008-2014 JBoss, a division of Red Hat. All Rights Reserved.