Package | Description |
---|---|
org.microbean.settings | |
org.microbean.settings.converter |
Provides classes and interfaces that help with settings
conversion.
|
Modifier and Type | Method and Description |
---|---|
Value |
SourceOrderArbiter.arbitrate(Set<? extends Source> sources,
String name,
Set<? extends Annotation> qualifiers,
Collection<? extends Value> values)
Performs value arbitration by considering
Value s'
affiliated Source s
such that the Value whose Source appears earliest in the supplied sources Set will be selected. |
abstract Value |
Arbiter.arbitrate(Set<? extends Source> sources,
String name,
Set<? extends Annotation> qualifiers,
Collection<? extends Value> values)
Performs value arbitration on a
Collection of
Value s that (normally) a Settings instance
determined were indistinguishable during value acquisition, and
returns the Value to be used instead (normally drawn from
the Collection according to some heuristic). |
protected Value |
Settings.arbitrate(Set<? extends Source> sources,
String name,
Set<Annotation> qualifiers,
Collection<? extends Value> values)
Performs value arbitration on a
Collection of
Value s that this Settings instance determined
were indistinguishable during value acquisition, and returns the
Value to be used instead (normally drawn from the Collection according to some heuristic). |
protected Value |
Settings.getValue(Source source,
String name,
Set<Annotation> qualifiers)
Given a
Source , a name of a setting and a (possibly
null ) Set of qualifying Annotation s,
returns a Value for the supplied name originating
from the supplied Source . |
@Experimental Value |
Settings.getValue(String name,
Set<Annotation> qualifiers)
Implements the
Source.getValue(String, Set) method so
that this Settings can be conveniently used as a Source from a higher-order Settings . |
abstract Value |
Source.getValue(String name,
Set<Annotation> qualifiers)
|
Value |
EnvironmentVariablesSource.getValue(String name,
Set<Annotation> qualifiers)
|
Value |
SystemPropertiesSource.getValue(String name,
Set<Annotation> qualifiers)
Returns a
Value suitable for the supplied name by
making use of the System.getProperty(String) method. |
Modifier and Type | Method and Description |
---|---|
Collection<Value> |
AmbiguousValuesException.getValues()
Returns the
Collection of Value instances found
to be ambiguous. |
Modifier and Type | Method and Description |
---|---|
default T |
Converter.apply(Value value)
Calls the
Converter.convert(Value) method and returns its result. |
T |
Converter.convert(Value value)
Converts the supplied
Value into the appropriate kind of
object and returns the result. |
<T> T |
Converters.convert(Value value,
Class<T> type)
Converts the supplied
Value to an object of the proper
type and returns the result of the conversion using a Converter previously
installed under a Type equal to the supplied Class . |
<T> T |
Converters.convert(Value value,
TypeLiteral<T> type)
Converts the supplied
Value to an object of the proper
type and returns the result of the conversion using a Converter previously
installed under a Type equal to the supplied TypeLiteral 's Type . |
Modifier and Type | Method and Description |
---|---|
Value |
SourceOrderArbiter.arbitrate(Set<? extends Source> sources,
String name,
Set<? extends Annotation> qualifiers,
Collection<? extends Value> values)
Performs value arbitration by considering
Value s'
affiliated Source s
such that the Value whose Source appears earliest in the supplied sources Set will be selected. |
abstract Value |
Arbiter.arbitrate(Set<? extends Source> sources,
String name,
Set<? extends Annotation> qualifiers,
Collection<? extends Value> values)
Performs value arbitration on a
Collection of
Value s that (normally) a Settings instance
determined were indistinguishable during value acquisition, and
returns the Value to be used instead (normally drawn from
the Collection according to some heuristic). |
protected Value |
Settings.arbitrate(Set<? extends Source> sources,
String name,
Set<Annotation> qualifiers,
Collection<? extends Value> values)
Performs value arbitration on a
Collection of
Value s that this Settings instance determined
were indistinguishable during value acquisition, and returns the
Value to be used instead (normally drawn from the Collection according to some heuristic). |
protected void |
Settings.handleMalformedValues(String name,
Set<Annotation> qualifiers,
Collection<? extends Value> badValues)
Processes a
Collection of Value instances that
were determined to be malformed in some way during the execution
of a Settings.get(String, Set, Converter, BiFunction) operation. |
Constructor and Description |
---|
Value(Value other)
Creates a new
Value . |
Value(Value other,
String value)
Creates a new
Value . |
Value(Value other,
Supplier<? extends String> valueSupplier)
Creates a new
Value . |
Constructor and Description |
---|
AmbiguousValuesException(Collection<Value> values)
Creates a new
AmbiguousValuesException . |
Modifier and Type | Method and Description |
---|---|
Level |
LevelConverter.convert(Value value) |
Period |
PeriodConverter.convert(Value value) |
Byte |
ByteConverter.convert(Value value) |
Calendar |
CalendarConverter.convert(Value value) |
LocalDateTime |
LocalDateTimeConverter.convert(Value value) |
YearMonth |
YearMonthConverter.convert(Value value) |
Class<T> |
ClassConverter.convert(Value value) |
LocalTime |
LocalTimeConverter.convert(Value value) |
T |
ExecutableBasedConverter.convert(Value value) |
URI |
URIConverter.convert(Value value) |
MonthDay |
MonthDayConverter.convert(Value value) |
Double |
DoubleConverter.convert(Value value) |
Year |
YearConverter.convert(Value value) |
StringBuilder |
StringBuilderConverter.convert(Value value) |
OffsetDateTime |
OffsetDateTimeConverter.convert(Value value) |
Integer |
IntegerConverter.convert(Value value) |
Date |
DateConverter.convert(Value value) |
C |
CollectionConverter.convert(Value value) |
BigDecimal |
BigDecimalConverter.convert(Value value) |
Boolean |
BooleanConverter.convert(Value value) |
Map.Entry<K,V> |
EntryConverter.convert(Value value) |
ZonedDateTime |
ZonedDateTimeConverter.convert(Value value) |
Instant |
InstantConverter.convert(Value value) |
URL |
URLConverter.convert(Value value) |
Float |
FloatConverter.convert(Value value) |
BigInteger |
BigIntegerConverter.convert(Value value) |
String |
StringConverter.convert(Value value) |
LocalDate |
LocalDateConverter.convert(Value value) |
Short |
ShortConverter.convert(Value value) |
T |
PropertyEditorConverter.convert(Value value) |
T[] |
ArrayConverter.convert(Value value)
Converts the supplied
Value into an appropriately-typed
array and returns the result. |
Long |
LongConverter.convert(Value value) |
Map<K,V> |
MapConverter.convert(Value value) |
Serializable |
SerializableConverter.convert(Value value) |
Duration |
DurationConverter.convert(Value value) |
CharSequence |
CharSequenceConverter.convert(Value value) |
StringBuffer |
StringBufferConverter.convert(Value value) |
Optional<T> |
OptionalConverter.convert(Value value) |
OffsetTime |
OffsetTimeConverter.convert(Value value) |
Object |
ObjectConverter.convert(Value value) |
Copyright © 2019–2020, microBean™. All rights reserved.