Oracle Fusion Middleware Java API Reference for Oracle ADF Mobile Client
11g Release 1 (11.1.1)

E17503-02

oracle.jbo
Class NameValuePairs

java.lang.Object
  extended by oracle.jbo.NameValuePairs
All Implemented Interfaces:
AttributeList, ExprValueSupplier
Direct Known Subclasses:
AttributeListImpl

public class NameValuePairs
extends java.lang.Object
implements AttributeList, ExprValueSupplier

Holder of name/value pairs.

This class provides methods for setting and getting values either by index or by name.


Field Summary
 
Fields inherited from interface oracle.jbo.AttributeList
CLASS_INSTANCE
 
Constructor Summary
NameValuePairs()
          Creates an empty attribute list.
NameValuePairs(int size)
          Constructs a new attribute list with a specified initial capacity.
NameValuePairs(java.lang.String[] nameArr, java.lang.Object[] valArr)
           
 
Method Summary
 void clear()
           
 java.lang.Object getAttribute(int index)
          Gets the value of an attribute identified by its index.
 java.lang.Object getAttribute(java.lang.String name)
          Gets the value of an attribute identified by name.
 int getAttributeCount()
          Counts the attributes.
 int getAttributeIndexOf(java.lang.String name)
          Gets the index of a named attribute.
 java.lang.String[] getAttributeNames()
          Returns an array of attribute names in this list.
 java.lang.Object[] getAttributeValues()
          Returns an array of attribute values in this list.
 java.lang.Object getExprVarVal(java.lang.String varName)
           
 void setAttribute(int index, java.lang.Object value)
          Sets the value for the specified attribute.
 void setAttribute(java.lang.String name, java.lang.Object value)
          Sets the value for the named attribute.
 void setExprVarVal(java.lang.String varName, java.lang.Object val)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NameValuePairs

public NameValuePairs()
Creates an empty attribute list.


NameValuePairs

public NameValuePairs(int size)
Constructs a new attribute list with a specified initial capacity.

Parameters:
size - the initial cacpacity.

NameValuePairs

public NameValuePairs(java.lang.String[] nameArr,
                      java.lang.Object[] valArr)
Method Detail

getAttribute

public java.lang.Object getAttribute(int index)
Gets the value of an attribute identified by its index.

Specified by:
getAttribute in interface AttributeList
Parameters:
index - the attribute's index.
Returns:
the value of the attribute, or null if index is out of range.

getAttribute

public java.lang.Object getAttribute(java.lang.String name)
Gets the value of an attribute identified by name.

Specified by:
getAttribute in interface AttributeList
Parameters:
name - the attribute's name.
Returns:
the value of the attribute, or null if index is out of range.

setAttribute

public void setAttribute(int index,
                         java.lang.Object value)
Sets the value for the specified attribute.

Specified by:
setAttribute in interface AttributeList
Parameters:
index - the attribute index.
value - the attribute's new value.

setAttribute

public void setAttribute(java.lang.String name,
                         java.lang.Object value)
Sets the value for the named attribute.

Specified by:
setAttribute in interface AttributeList
Parameters:
name - the attribute name.
value - the attribute's new value.

getAttributeCount

public int getAttributeCount()
Counts the attributes.

Specified by:
getAttributeCount in interface AttributeList
Returns:
the number of attributes.

getAttributeIndexOf

public int getAttributeIndexOf(java.lang.String name)
Gets the index of a named attribute.

Specified by:
getAttributeIndexOf in interface AttributeList
Parameters:
name - the attribute's name.
Returns:
the attribute's index, or -1 if not found.

getAttributeNames

public java.lang.String[] getAttributeNames()
Description copied from interface: AttributeList
Returns an array of attribute names in this list.

Specified by:
getAttributeNames in interface AttributeList
Returns:
an array of attribute names.

getAttributeValues

public java.lang.Object[] getAttributeValues()
Description copied from interface: AttributeList
Returns an array of attribute values in this list.

Specified by:
getAttributeValues in interface AttributeList
Returns:
an array of attribute values.

clear

public void clear()

getExprVarVal

public java.lang.Object getExprVarVal(java.lang.String varName)
Specified by:
getExprVarVal in interface ExprValueSupplier

setExprVarVal

public void setExprVarVal(java.lang.String varName,
                          java.lang.Object val)
Specified by:
setExprVarVal in interface ExprValueSupplier

Oracle Fusion Middleware Java API Reference for Oracle ADF Mobile Client
11g Release 1 (11.1.1)

E17503-02

Copyright © 2011, Oracle and/or its affiliates. All rights reserved.