|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.clarkparsia.stardog.metadata.Metadata
public class Metadata
Mapping from Stardog meta properties to values. Similar to a standard Map but with some key differences.
This class does not allow null options to be used as keys. The get(MetaProperty) function
may return a value even though an option is not contained in the map explicitly.
In such cases the default value of the option is returned.
| Method Summary | ||
|---|---|---|
|
contains(MetaProperty<V> option)
Returns true if this collection contains an explicit value for the specified option. |
|
Metadata |
copy()
Creates a copy of the StardogOptions instance. |
|
static Metadata |
create()
Creates a new empty mutable StardogOptions instance. |
|
static Metadata |
empty()
Creates a new empty immutable StardogOptions instance. |
|
boolean |
equals(Object o)
|
|
|
get(MetaProperty<V> option)
Returns the value associated with the given property or the default value
of the property if there is no associated
value. |
|
int |
hashCode()
|
|
Metadata |
immutable()
Creates an immutable shallow copy of the StardogOptions instance. |
|
boolean |
is(MetaProperty<Boolean> option)
Returns the value associated with the given boolean option or the default value of the option if there is no associated value and the default value is not null or false otherwise. |
|
Iterator<MetaProperty<Object>> |
iterator()
|
|
static
|
of(MetaProperty<V> key,
V value)
Creates an immutable metadata instance with the given single mapping. |
|
|
remove(MetaProperty<V> option)
Removes any previous value associated with this option. |
|
|
set(MetaProperty<V> option,
V value)
Associate the given value with the given option overriding any previous value. |
|
|
setAll(Metadata theOtherMap)
Copies all of the option value mappings from the specified map to this map overriding Sets all the options in the given map the given option overriding any previous value . |
|
String |
toString()
|
|
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Method Detail |
|---|
public Iterator<MetaProperty<Object>> iterator()
iterator in interface Iterable<MetaProperty<Object>>public Metadata copy()
copy in interface Copyable<Metadata>public Metadata immutable()
aMetadata.copy().immutable() can be used.
public static Metadata empty()
public static <V> Metadata of(MetaProperty<V> key,
V value)
public static Metadata create()
public <V> boolean contains(MetaProperty<V> option)
public <V> V get(MetaProperty<V> option)
default value
of the property if there is no associated
value. The default value for an option might be null so there are cases this function will return
a null value. Must be used with care in autoboxing.
is(MetaProperty)public boolean is(MetaProperty<Boolean> option)
null or false otherwise. This function
serves the same purpose as get but treats null values as false.
It is a safe alternative to avoid NullPointerException during auto-unboxing for boolean properties.
public <V> Metadata set(MetaProperty<V> option,
V value)
public <V> Metadata setAll(Metadata theOtherMap)
public <V> V remove(MetaProperty<V> option)
public boolean equals(Object o)
equals in class Objectpublic int hashCode()
hashCode in class Objectpublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||