org.modeshape.jcr.value.basic

## Class BasicPropertyFactory

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

- All Implemented Interfaces:
    PropertyFactory

      @Immutable
      public class BasicPropertyFactory
      extends Object
      implements PropertyFactory

  A basic `PropertyFactory` implementation.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `BasicPropertyFactory(ValueFactories valueFactories)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `Property` | `create(Name name)` Create an empty multi-valued property with the supplied name.
    `Property` | `create(Name name, Iterable<?> values)` Create a multi-valued property with the supplied name and values
    `Property` | `create(Name name, Iterator<?> values)` Create a multi-valued property with the supplied name and values
    `Property` | `create(Name name, Object value)` Create a single-valued property with the supplied name and values
    `Property` | `create(Name name, Object[] values)` Create a multi-valued property with the supplied name and values
    `Property` | `create(Name name, Path value)` Create a single-valued property with the supplied name and `Path` value.
    `Property` | `create(Name name, PropertyType desiredType, Iterable<?> values)` Create a multi-valued property with the supplied name and values
    `Property` | `create(Name name, PropertyType desiredType, Iterator<?> values)` Create a multi-valued property with the supplied name and values
    `Property` | `create(Name name, PropertyType desiredType, Object firstValue)` Create a single-valued property with the supplied name and values
    `Property` | `create(Name name, PropertyType desiredType, Object[] values)` Create a multi-valued property with the supplied name and values

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

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

- - ### Constructor Detail

    - #### BasicPropertyFactory

          public BasicPropertyFactory(ValueFactories valueFactories)

      Parameters:
        `valueFactories` - the value factories
      Throws:
        `IllegalArgumentException` - if the reference to the value factories is null

  - ### Method Detail

    - #### create

          public Property create(Name name,
                        Path value)

      Description copied from interface: `PropertyFactory`
      Create a single-valued property with the supplied name and `Path` value. This method is provided because Path implements Iterable<Segment>.
      Specified by:
        `create` in interface `PropertyFactory`
      Parameters:
        `name` - the property name; may not be null
        `value` - the path value
      Returns:
        the resulting property

    - #### create

          public Property create(Name name,
                        Iterable<?> values)

      Description copied from interface: `PropertyFactory`
      Create a multi-valued property with the supplied name and values
      Specified by:
        `create` in interface `PropertyFactory`
      Parameters:
        `name` - the property name; may not be null
        `values` - the values
      Returns:
        the resulting property

    - #### create

          public Property create(Name name,
                        Iterator<?> values)

      Description copied from interface: `PropertyFactory`
      Create a multi-valued property with the supplied name and values
      Specified by:
        `create` in interface `PropertyFactory`
      Parameters:
        `name` - the property name; may not be null
        `values` - the values
      Returns:
        the resulting property

    - #### create

          public Property create(Name name)

      Description copied from interface: `PropertyFactory`
      Create an empty multi-valued property with the supplied name.
      Specified by:
        `create` in interface `PropertyFactory`
      Parameters:
        `name` - the property name; may not be null
      Returns:
        the resulting property

    - #### create

          public Property create(Name name,
                        Object value)

      Description copied from interface: `PropertyFactory`
      Create a single-valued property with the supplied name and values
      Specified by:
        `create` in interface `PropertyFactory`
      Parameters:
        `name` - the property name; may not be null
        `value` - the value
      Returns:
        the resulting property

    - #### create

          public Property create(Name name,
                        Object[] values)

      Description copied from interface: `PropertyFactory`
      Create a multi-valued property with the supplied name and values
      Specified by:
        `create` in interface `PropertyFactory`
      Parameters:
        `name` - the property name; may not be null
        `values` - the values
      Returns:
        the resulting property

    - #### create

          public Property create(Name name,
                        PropertyType desiredType,
                        Object firstValue)

      Description copied from interface: `PropertyFactory`
      Create a single-valued property with the supplied name and values
      Specified by:
        `create` in interface `PropertyFactory`
      Parameters:
        `name` - the property name; may not be null
        `desiredType` - the type that the objects should be converted to; if null, they will be used as is
        `firstValue` - the first value; may not be null
      Returns:
        the resulting property

    - #### create

          public Property create(Name name,
                        PropertyType desiredType,
                        Object[] values)

      Description copied from interface: `PropertyFactory`
      Create a multi-valued property with the supplied name and values
      Specified by:
        `create` in interface `PropertyFactory`
      Parameters:
        `name` - the property name; may not be null
        `desiredType` - the type that the objects should be converted to; if null, they will be used as is
        `values` - the values; may not be null but may be empty
      Returns:
        the resulting property

    - #### create

          public Property create(Name name,
                        PropertyType desiredType,
                        Iterable<?> values)

      Description copied from interface: `PropertyFactory`
      Create a multi-valued property with the supplied name and values
      Specified by:
        `create` in interface `PropertyFactory`
      Parameters:
        `name` - the property name; may not be null
        `desiredType` - the type that the objects should be converted to; if null, they will be used as is
        `values` - the values
      Returns:
        the resulting property

    - #### create

          public Property create(Name name,
                        PropertyType desiredType,
                        Iterator<?> values)

      Description copied from interface: `PropertyFactory`
      Create a multi-valued property with the supplied name and values
      Specified by:
        `create` in interface `PropertyFactory`
      Parameters:
        `name` - the property name; may not be null
        `desiredType` - the type that the objects should be converted to; if null, they will be used as is
        `values` - the values
      Returns:
        the resulting property

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