CompositeDataSupport class is the open data class which
implements the CompositeData interface.
| Modifier and Type | Field and Description |
|---|---|
| private final CompositeType | |
| private final SortedMap | |
| pack-priv static final long |
| Access | Constructor and Description |
|---|---|
| public | CompositeDataSupport(CompositeType
the composite type of this composite
data instance; must not be null. compositeType, String[] itemNames must list, in any order, all the
item names defined in compositeType; the order in which the
names are listed, is used to match values in itemValues[]; must
not be null or empty.the values of the items, listed in the same order as
their respective names in itemValues)itemNames; each item value can be
null, but if it is non-null it must be a valid value for the open type
defined in compositeType for the corresponding item; must be of
the same size as itemNames; must not be null or empty.Constructs a |
| public | CompositeDataSupport(CompositeType
the composite type of this composite data instance;
must not be null. compositeType, Map<String, ?> the mappings of all the item names to their values;
items)items must contain all the item names defined in compositeType;
must not be null or empty.
Constructs a |
| private |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | containsKey(String key)
Implements javax. Returns |
| public boolean | containsValue(Object value)
Implements javax. Returns |
| private String | |
| public boolean | Returns: true if the specified object is equal to this
CompositeDataSupport instance.the object to be compared for equality with this
obj)CompositeDataSupport instance.Overrides java. Implements javax. Compares the specified obj parameter with this
|
| public Object | get(String key)
Implements javax. Returns the value of the item whose name is |
| public Object[] | getAll(String[] keys)
Implements javax. Returns an array of the values of the items whose names are specified by
|
| public CompositeType | getCompositeType()
Implements javax. Returns the composite type of this composite data instance. |
| public int | Returns: the hash code value for thisCompositeDataSupport instanceOverrides java. Implements javax. Returns the hash code value for this |
| private static SortedMap | |
| private static SortedMap | |
| public String | Returns: a string representation of thisCompositeDataSupport instanceOverrides java. Implements javax. Returns a string representation of this |
| public Collection | values()
Implements javax. Returns an unmodifiable Collection view of the item values contained in this
|
| compositeType | back to summary |
|---|---|
| private final CompositeType compositeType | |
| contents | back to summary |
|---|---|
private final SortedMap<String, Object> contents
| |
| serialVersionUID | back to summary |
|---|---|
| pack-priv static final long serialVersionUID | |
| CompositeDataSupport | back to summary |
|---|---|
| public CompositeDataSupport(CompositeType compositeType, String[] itemNames, Object[] itemValues) throws OpenDataException Constructs a The constructor checks that all the constraints listed below for each parameter are satisfied, and throws the appropriate exception if they are not.
| |
| CompositeDataSupport | back to summary |
|---|---|
| public CompositeDataSupport(CompositeType compositeType, Map<String, ?> items) throws OpenDataException
Constructs a
| |
| CompositeDataSupport | back to summary |
|---|---|
| private CompositeDataSupport(SortedMap<String, Object> items, CompositeType compositeType) throws OpenDataException | |
| containsKey | back to summary |
|---|---|
| public boolean containsKey(String key) Implements javax. Returns | |
| containsValue | back to summary |
|---|---|
| public boolean containsValue(Object value) Implements javax. Returns | |
| contentString | back to summary |
|---|---|
| private String contentString() | |
| equals | back to summary |
|---|---|
| public boolean equals(Object obj) Overrides java. Implements javax. Compares the specified obj parameter with this
Returns
This ensures that this | |
| get | back to summary |
|---|---|
| public Object get(String key) Implements javax. Returns the value of the item whose name is
| |
| getAll | back to summary |
|---|---|
| public Object[] getAll(String[] keys) Implements javax. Returns an array of the values of the items whose names are specified by
| |
| getCompositeType | back to summary |
|---|---|
| public CompositeType getCompositeType() Implements javax. Returns the composite type of this composite data instance. | |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Implements javax. Returns the hash code value for this
The hash code of a
This ensures that
Each item value's hash code is added to the returned hash code.
If an item value is an array,
its hash code is obtained as if by calling the
| |
| makeMap | back to summary |
|---|---|
| private static SortedMap | |
| makeMap | back to summary |
|---|---|
| private static SortedMap | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Implements javax. Returns a string representation of this
The string representation consists of the name of this class (ie | |
| values | back to summary |
|---|---|
| public Collection Implements javax. Returns an unmodifiable Collection view of the item values contained in this
| |