CompositeType class is the open type class
whose instances describe the types of CompositeData values.
| Modifier and Type | Field and Description |
|---|---|
| private transient Integer | |
| private transient Set | |
| private transient String | |
| private TreeMap | |
| private TreeMap | |
| pack-priv static final long |
| Access | Constructor and Description |
|---|---|
| public | CompositeType(String
The name given to the composite type this instance represents; cannot be a null or empty string. typeName, String The human readable description of the composite type this instance represents;
cannot be a null or empty string. description, String[] The names of the items contained in the
composite data values described by this itemNames, String[] CompositeType instance;
cannot be null and should contain at least one element; no element can be a null or empty string.
Note that the order in which the item names are given is not important to differentiate a
CompositeType instance from another;
the item names are internally stored sorted in ascending alphanumeric order.The descriptions, in the same order as itemNames, of the items contained in the
composite data values described by this itemDescriptions, OpenType<?>[] CompositeType instance;
should be of the same size as itemNames;
no element can be null or an empty string.The open type instances, in the same order as itemNames, describing the items contained
in the composite data values described by this itemTypes)CompositeType instance;
should be of the same size as itemNames;
no element can be null.Constructs a |
| Modifier and Type | Method and Description |
|---|---|
| private static void | |
| private static void | |
| public boolean | Returns: true if an item of this name is present.the name of the item. itemName)Returns |
| public boolean | Returns: true if the specified object is equal to this CompositeType instance.the object to be compared for equality with this obj)CompositeType instance;
if obj is null, equals returns false.Implements abstract javax. Compares the specified |
| public String | Returns: the description.the name of the item. itemName)Returns the description of the item whose name is itemName,
or |
| public OpenType | |
| public int | Returns: the hash code value for thisCompositeType instanceImplements abstract javax. Returns the hash code value for this |
| pack-priv boolean | Returns: true ifot is assignable to this open type.the type to be tested. ot)Overrides javax. Tests whether values of the given type can be assigned to this open type. |
| public boolean | Returns: true if obj is a value for this
composite type, false otherwise.the value whose open type is to be tested for compatibility
with this obj)CompositeType instance.Implements abstract javax. Tests whether obj is a value which could be
described by this |
| public Set | |
| public String | Returns: a string representation of thisCompositeType instanceImplements abstract javax. Returns a string representation of this |
| myHashCode | back to summary |
|---|---|
| private transient Integer myHashCode | |
| myNamesSet | back to summary |
|---|---|
| private transient Set<String> myNamesSet | |
| myToString | back to summary |
|---|---|
| private transient String myToString | |
| nameToDescription | back to summary |
|---|---|
| private TreeMap<String, String> nameToDescription | |
| nameToType | back to summary |
|---|---|
| private TreeMap<String, OpenType<?>> nameToType | |
| serialVersionUID | back to summary |
|---|---|
| pack-priv static final long serialVersionUID | |
| CompositeType | back to summary |
|---|---|
| public CompositeType(String typeName, String description, String[] itemNames, String[] itemDescriptions, OpenType<?>[] itemTypes) throws OpenDataException Constructs a
Note that the contents of the three array parameters
itemNames, itemDescriptions and itemTypes
are internally copied so that any subsequent modification of these arrays by the caller of this constructor
has no impact on the constructed
The Java class name of composite data values this composite type represents
(ie the class name returned by the
| |
| checkForEmptyString | back to summary |
|---|---|
| private static void checkForEmptyString(String[] arg, String argName) | |
| checkForNullElement | back to summary |
|---|---|
| private static void checkForNullElement(Object[] arg, String argName) | |
| containsKey | back to summary |
|---|---|
| public boolean containsKey(String itemName) Returns
| |
| equals | back to summary |
|---|---|
| public boolean equals(Object obj) Implements abstract javax. Compares the specified
Two
| |
| getDescription | back to summary |
|---|---|
| public String getDescription(String itemName) Returns the description of the item whose name is itemName,
or | |
| getType | back to summary |
|---|---|
| public OpenType Returns the open type of the item whose name is itemName,
or | |
| hashCode | back to summary |
|---|---|
| public int hashCode() Implements abstract javax. Returns the hash code value for this
The hash code of a
As
| |
| isAssignableFrom | back to summary |
|---|---|
| pack-priv boolean isAssignableFrom(OpenType<?> ot) Overrides javax. Tests whether values of the given type can be assigned to this
open type. The result is true if the given type is also a
CompositeType with the same name ( | |
| isValue | back to summary |
|---|---|
| public boolean isValue(Object obj) Implements abstract javax. Tests whether obj is a value which could be
described by this If obj is null or is not an instance of
If obj is an instance of
A An In every other case, an These rules mean that extra items can be added to a
| |
| keySet | back to summary |
|---|---|
| public Set Returns an unmodifiable Set view of all the item names defined by this | |
| toString | back to summary |
|---|---|
| public String toString() Implements abstract javax. Returns a string representation of this
The string representation consists of
the name of this class (ie
As
| |