|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jboss.dna.graph.property.basic.AbstractValueFactory<T>
T - the property type@Immutable public abstract class AbstractValueFactory<T>

Abstract ValueFactory.
| Field Summary |
|---|
| Fields inherited from interface org.jboss.dna.graph.property.ValueFactory |
|---|
DEFAULT_DECODER, DEFAULT_ENCODER |
| Method Summary | |
|---|---|
T[] |
create(BigDecimal[] values)
Create an array of values from an array of decimal values. |
T[] |
create(Binary[] values)
Create an array of values from the array of binary objects. |
T[] |
create(boolean[] values)
Create an array of values from an array of booleans. |
T[] |
create(byte[][] values)
Create an array of values from the array of binary content. |
T[] |
create(Calendar[] values)
Create an array of values from an array of Calendar instances. |
T[] |
create(Date[] values)
Create an array of values from an array of dates. |
T[] |
create(DateTime[] values)
Create an array of values from an array of DateTime instants. |
T[] |
create(double[] values)
Create an array of values from an array of doubles. |
T[] |
create(float[] values)
Create an array of values from an array of floats. |
T[] |
create(int[] values)
Create an array of values from an array of integers. |
Iterable<T> |
create(Iterable<?> valueIterable)
Create an iterable with the values (of an unknown type). |
Iterator<T> |
create(Iterator<?> values)
Create an iterator over the values (of an unknown type). |
T[] |
create(long[] values)
Create an array of values from an array of longs. |
T[] |
create(Name[] values)
Create an array of values from an array of names. |
T |
create(Object value)
Create a value from the specified information by determining which other create method applies and delegating
to that method. |
T[] |
create(Object[] values)
Create an array of values from the specified information by determining which other create method applies for
each object and then delegating to that method. |
T[] |
create(Path[] values)
Create an array of values from an array of paths. |
T[] |
create(Reference[] values)
Create an array of values from an array of references. |
T[] |
create(String[] values)
Create an array of values from an array of string values, using no decoding. |
T[] |
create(String[] values,
TextDecoder decoder)
Create an array of values from an array of strings, using the supplied decoder. |
T[] |
create(URI[] values)
Create an array of values from an array of URIs. |
T[] |
create(UUID[] values)
Create an array of values from an array of UUIDs. |
TextDecoder |
getDecoder()
Get the text decoder. |
PropertyType |
getPropertyType()
Get the type of values created by this factory. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.jboss.dna.graph.property.ValueFactory |
|---|
create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create |
| Method Detail |
|---|
public TextDecoder getDecoder()
public PropertyType getPropertyType()
type of values created by this factory.
getPropertyType in interface ValueFactory<T>public T create(Object value)
create method applies and delegating
to that method. Note that this method only will call create methods that take a single parameter; so this
excludes ValueFactory.create(InputStream, long), ValueFactory.create(Reader, long) and ValueFactory.create(String, TextDecoder).
create in interface ValueFactory<T>value - the value
public T[] create(BigDecimal[] values)
create in interface ValueFactory<T>values - the decimals from which the values are to be created
public T[] create(boolean[] values)
create in interface ValueFactory<T>values - the booleans from which the values are to be created
public T[] create(byte[][] values)
create in interface ValueFactory<T>values - the array of content to be used to create the values
public T[] create(Calendar[] values)
create in interface ValueFactory<T>values - the Calendar instances from which the values are to be created
public T[] create(Date[] values)
create in interface ValueFactory<T>values - the dates from which the values are to be created
public T[] create(DateTime[] values)
throws ValueFormatException
DateTime instants.
create in interface ValueFactory<T>values - the instants from which the values are to be created
ValueFormatException - if the conversion from an array of date values could not be performedValueFactory.create(org.jboss.dna.graph.property.DateTime[])public T[] create(double[] values)
create in interface ValueFactory<T>values - the doubles from which the values are to be created
public T[] create(float[] values)
create in interface ValueFactory<T>values - the floats from which the values are to be created
public T[] create(int[] values)
create in interface ValueFactory<T>values - the integers from which the values are to be created
public T[] create(long[] values)
create in interface ValueFactory<T>values - the longs from which the values are to be created
public T[] create(Name[] values)
create in interface ValueFactory<T>values - the names from which the values are to be created
public T[] create(Object[] values)
create method applies for
each object and then delegating to that method. Note that this method will not consider ValueFactory.create(InputStream, long),
ValueFactory.create(Reader, long) and ValueFactory.create(String, TextDecoder).
create in interface ValueFactory<T>values - the values
public T[] create(Path[] values)
create in interface ValueFactory<T>values - the paths from which the values are to be created
public T[] create(Reference[] values)
create in interface ValueFactory<T>values - the references from which the values are to be created
public T[] create(String[] values,
TextDecoder decoder)
create in interface ValueFactory<T>values - the string values from which the values are to be createddecoder - the decoder that should be used; if null, the default decoder is used
ValueFactory.create(String)public T[] create(String[] values)
create in interface ValueFactory<T>values - the values
ValueFactory.create(String[], TextDecoder)public T[] create(URI[] values)
create in interface ValueFactory<T>values - the URIs from which the values are to be created
public T[] create(UUID[] values)
create in interface ValueFactory<T>values - the UUIDs from which the values are to be created
ValueFactory.create(java.util.UUID[])
public T[] create(Binary[] values)
throws ValueFormatException,
IoException
create in interface ValueFactory<T>values - the values
ValueFormatException - if the conversion from an array of objects could not be performed
IoException - If an unexpected problem occurs during the conversion.ValueFactory.create(org.jboss.dna.graph.property.Binary[])
public Iterator<T> create(Iterator<?> values)
throws ValueFormatException,
IoException
ValueFactory.create(InputStream, long), ValueFactory.create(Reader, long) and
ValueFactory.create(String, TextDecoder).
This is useful to use when iterating over the values of a Property.
create in interface ValueFactory<T>values - the values
T over the values, or null if the supplied parameter is null
ValueFormatException - if the conversion from an iterator of objects could not be performed
IoException - If an unexpected problem occurs during the conversion.ValueFactory.create(java.util.Iterator)
public Iterable<T> create(Iterable<?> valueIterable)
throws ValueFormatException,
IoException
ValueFactory.create(InputStream, long), ValueFactory.create(Reader, long) and
ValueFactory.create(String, TextDecoder).
This is useful to use when converting all the values of a Property.
Property property = ...
ExecutionContext executionContext = ...
ValueFactory<String> stringFactory = executionContext.getValueFactories().getStringFactory();
for (String token : stringFactory.create(property)) {
...
}
create in interface ValueFactory<T>valueIterable - the values
T over the values, or null if the supplied parameter is null
ValueFormatException - if the conversion from an iterator of objects could not be performed
IoException - If an unexpected problem occurs during the conversion.ValueFactory.create(java.lang.Iterable)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||