Package org.moeaframework.analysis.store
Interface Reference
public interface Reference
A reference that uniquely identifies or addresses as specific
Container.
References are generic in nature, treating the field names and values as strings. While names are expected to be case-insensitive, no other requirements are in place regarding their types and ordering.
-
Method Summary
Modifier and TypeMethodDescriptiondefault ReferenceDeprecated.fields()Returns the fields defined by this reference.Returns the value associated with the given field.default booleanisRoot()Returnstrueif this references the root container.static StringProduces a normalized version of a string that allows for case-insensitive operations.static ReferenceConstructs a reference containing the given field name and value.static ReferenceConstructs a reference containing the given field name and value.static ReferenceConstructs a reference containing the given field name and value.static ReferenceConstructs a reference containing the given field name and value.static ReferenceConstructs a reference containing the given field name and value.static ReferenceConstructs a reference containing the given field name and value.static ReferenceConstructs a reference containing the given field name and value.static ReferenceConstructs a reference containing the given field name and value.Constructs a reference containing the given field name and value.static Referenceof(TypedProperties properties) Constructs a reference with all the keys and values contained in aTypedProperties.static Referenceroot()Constructs a reference to the root container.default StringtoJSON()Returns this reference formatted as JSON.default ReferenceCreates a new reference with the designated field name added or overwritten with the given value.default ReferenceCreates a new reference with the designated field name added or overwritten with the given value.default ReferenceCreates a new reference with the designated field name added or overwritten with the given value.default ReferenceCreates a new reference with the designated field name added or overwritten with the given value.default ReferenceCreates a new reference with the designated field name added or overwritten with the given value.default ReferenceCreates a new reference with the designated field name added or overwritten with the given value.default ReferenceCreates a new reference with the designated field name added or overwritten with the given value.default ReferenceCreates a new reference with the designated field name added or overwritten with the given value.Creates a new reference with the designated field name added or overwritten with the given value.
-
Method Details
-
fields
Returns the fields defined by this reference.- Returns:
- the field names
-
get
Returns the value associated with the given field.- Parameters:
field- the field name- Returns:
- the value associated with the field
-
isRoot
default boolean isRoot()Returnstrueif this references the root container. SeeDataStore.getRootContainer()for more details.- Returns:
trueif this references the root container;falseotherwise
-
toJSON
Returns this reference formatted as JSON.- Returns:
- the JSON representation
-
extend
Deprecated.usewith(String, String)insteadExtends this reference, adding or overwriting one field with a new value.- Parameters:
name- the field namevalue- the new value- Returns:
- a new reference with this modification
-
with
Creates a new reference with the designated field name added or overwritten with the given value. The value can either be a single value or an array.- Parameters:
name- the new or overwritten field namevalues- the new value(s) assigned to the field- Returns:
- a new reference with this modification
-
with
Creates a new reference with the designated field name added or overwritten with the given value. The value can either be a single value or an array.- Parameters:
name- the new or overwritten field namevalues- the new value(s) assigned to the field- Returns:
- a new reference with this modification
-
with
Creates a new reference with the designated field name added or overwritten with the given value. The value can either be a single value or an array.- Parameters:
name- the new or overwritten field namevalues- the new value(s) assigned to the field- Returns:
- a new reference with this modification
-
with
Creates a new reference with the designated field name added or overwritten with the given value. The value can either be a single value or an array.- Parameters:
name- the new or overwritten field namevalues- the new value(s) assigned to the field- Returns:
- a new reference with this modification
-
with
Creates a new reference with the designated field name added or overwritten with the given value. The value can either be a single value or an array.- Parameters:
name- the new or overwritten field namevalues- the new value(s) assigned to the field- Returns:
- a new reference with this modification
-
with
Creates a new reference with the designated field name added or overwritten with the given value. The value can either be a single value or an array.- Parameters:
name- the new or overwritten field namevalues- the new value(s) assigned to the field- Returns:
- a new reference with this modification
-
with
Creates a new reference with the designated field name added or overwritten with the given value.- Parameters:
name- the new or overwritten field namevalue- the new value assigned to the field- Returns:
- a new reference with this modification
-
with
Creates a new reference with the designated field name added or overwritten with the given value.- Parameters:
name- the new or overwritten field namevalue- the new value assigned to the field- Returns:
- a new reference with this modification
-
with
Creates a new reference with the designated field name added or overwritten with the given value.- Type Parameters:
T- the enum type- Parameters:
name- the new or overwritten field namevalue- the new value assigned to the field- Returns:
- a new reference with this modification
-
of
Constructs a reference with all the keys and values contained in aTypedProperties.- Parameters:
properties- the typed properties object- Returns:
- a new reference based on the keys and values in the properties
-
of
Constructs a reference containing the given field name and value. The value can either be a single value or an array.- Parameters:
name- the field namevalues- the value(s) assigned to the field- Returns:
- a new reference based on the name and value
-
of
Constructs a reference containing the given field name and value. The value can either be a single value or an array.- Parameters:
name- the field namevalues- the value(s) assigned to the field- Returns:
- a new reference based on the name and value
-
of
Constructs a reference containing the given field name and value. The value can either be a single value or an array.- Parameters:
name- the field namevalues- the value(s) assigned to the field- Returns:
- a new reference based on the name and value
-
of
Constructs a reference containing the given field name and value. The value can either be a single value or an array.- Parameters:
name- the field namevalues- the value(s) assigned to the field- Returns:
- a new reference based on the name and value
-
of
Constructs a reference containing the given field name and value. The value can either be a single value or an array.- Parameters:
name- the field namevalues- the value(s) assigned to the field- Returns:
- a new reference based on the name and value
-
of
Constructs a reference containing the given field name and value. The value can either be a single value or an array.- Parameters:
name- the field namevalues- the value(s) assigned to the field- Returns:
- a new reference based on the name and value
-
of
Constructs a reference containing the given field name and value.- Parameters:
name- the field namevalue- the value assigned to the field- Returns:
- a new reference based on the name and value
-
of
Constructs a reference containing the given field name and value.- Parameters:
name- the field namevalue- the value assigned to the field- Returns:
- a new reference based on the name and value
-
of
Constructs a reference containing the given field name and value.- Type Parameters:
T- the enum type- Parameters:
name- the field namevalue- the value assigned to the field- Returns:
- a new reference based on the name and value
-
root
Constructs a reference to the root container.- Returns:
- a reference to the root container
-
normalize
Produces a normalized version of a string that allows for case-insensitive operations. This is based on the implementation of Apache Commons CaseInsensitiveMap.- Parameters:
str- the original string- Returns:
- the normalized string
- See Also:
-
with(String, String)instead