org.odata4j.core
Class NamedValues

java.lang.Object
  extended by org.odata4j.core.NamedValues

public class NamedValues
extends Object

A static factory to create immutable NamedValue instances.


Method Summary
static
<T> NamedValue<T>
copy(NamedValue<T> value)
          Create a copy of a named-value.
static
<T> NamedValue<T>
create(String name, T value)
          Create an named-value from a name and a value.
static Set<NamedValue<Object>> fromMap(Map<String,Object> values)
          Create multiple named-values from a string->object map.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

copy

public static <T> NamedValue<T> copy(NamedValue<T> value)
Create a copy of a named-value.

Type Parameters:
T - the value's java-type
Parameters:
value - the named-value to copy
Returns:
a new named-value instance with the same name and value

create

public static <T> NamedValue<T> create(String name,
                                       T value)
Create an named-value from a name and a value.

Type Parameters:
T - the value's java-type
Parameters:
name - the name
value - the value
Returns:
a new named-value instance

fromMap

public static Set<NamedValue<Object>> fromMap(Map<String,Object> values)
Create multiple named-values from a string->object map.

Parameters:
values - names and values
Returns:
a set of new named-value instances


http://odata4j.org