Oracle® Content Services Web Services Java API Reference
10g Release 1 (10.1.1)

B19047-01


oracle.ifs.fdk
Class NamedValue

java.lang.Object
  extended byoracle.ifs.fdk.NamedValue

All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
Preference

public class NamedValue
extends java.lang.Object
implements java.io.Serializable

Represents a Java Bean name/value pair. It is suitable for representing attributes, options, preferences, etc.


Constructor Summary
NamedValue()
Required constructor in order to be a Java Bean.
NamedValue(java.lang.String name, java.lang.Object value)
Convenience constructor that sets the name and value.

Method Summary
java.lang.String getName()
Returns the name.
java.lang.Object getValue()
Returns the value.
static NamedValue[] mapToNamedValues(java.util.Map map)
Converts an Map of named values to NamedValue[].
static java.util.Map namedValuesToMap(NamedValue[] namedValues)
Converts a NamedValue[] to a Map for easy access.
void setName(java.lang.String name)
Sets the name.
void setValue(java.lang.Object value)
Sets the value.
java.lang.String toString()

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

NamedValue

public NamedValue()
Required constructor in order to be a Java Bean.

NamedValue

public NamedValue(java.lang.String name,
                  java.lang.Object value)
Convenience constructor that sets the name and value.

Method Detail

getName

public final java.lang.String getName()
Returns the name.

getValue

public final java.lang.Object getValue()
Returns the value.

mapToNamedValues

public static final NamedValue[] mapToNamedValues(java.util.Map map)
Converts an Map of named values to NamedValue[]. If the Map instance guarantees a certain order, it will be preserved in the array.
Parameters:
map - The Map to convert. The keys in the map must be of type String. An empty map will result in a zero-length NamedValue[] and a null map will result into a null return value.

namedValuesToMap

public static final java.util.Map namedValuesToMap(NamedValue[] namedValues)
Converts a NamedValue[] to a Map for easy access. This method guarantees that an Iterator over the Map will return the entries in the same order they were in the array. The keys in the returned map will be of type String.
Parameters:
namedValues - The NamedValue[] to convert. A zero-length array will result into an empty map and a null array will result into a null return value.

setName

public final void setName(java.lang.String name)
Sets the name.

setValue

public final void setValue(java.lang.Object value)
Sets the value.

toString

public java.lang.String toString()

Oracle® Content Services Web Services Java API Reference
10g Release 1 (10.1.1)

B19047-01


Copyright © 2002, 2005, Oracle. All rights reserved.