jdk/src/java.management/share/classes/javax/management/openmbean/TabularData.java
author avstepan
Thu, 06 Aug 2015 13:59:10 +0300
changeset 32034 05676cfd40b5
parent 25859 3317bb8137f4
permissions -rw-r--r--
8133040: docs: replace <tt> tags (obsolete in html5) for java.management Reviewed-by: dfuchs
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     1
/*
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
     2
 * Copyright (c) 2000, 2007, Oracle and/or its affiliates. All rights reserved.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
90ce3da70b43 Initial load
duke
parents:
diff changeset
     4
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
90ce3da70b43 Initial load
duke
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
     7
 * published by the Free Software Foundation.  Oracle designates this
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     8
 * particular file as subject to the "Classpath" exception as provided
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
     9
 * by Oracle in the LICENSE file that accompanied this code.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    10
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    11
 * This code is distributed in the hope that it will be useful, but WITHOUT
90ce3da70b43 Initial load
duke
parents:
diff changeset
    12
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
90ce3da70b43 Initial load
duke
parents:
diff changeset
    13
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
90ce3da70b43 Initial load
duke
parents:
diff changeset
    14
 * version 2 for more details (a copy is included in the LICENSE file that
90ce3da70b43 Initial load
duke
parents:
diff changeset
    15
 * accompanied this code).
90ce3da70b43 Initial load
duke
parents:
diff changeset
    16
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    17
 * You should have received a copy of the GNU General Public License version
90ce3da70b43 Initial load
duke
parents:
diff changeset
    18
 * 2 along with this work; if not, write to the Free Software Foundation,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    19
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    20
 *
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    21
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    22
 * or visit www.oracle.com if you need additional information or have any
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    23
 * questions.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    24
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    25
90ce3da70b43 Initial load
duke
parents:
diff changeset
    26
90ce3da70b43 Initial load
duke
parents:
diff changeset
    27
package javax.management.openmbean;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    28
90ce3da70b43 Initial load
duke
parents:
diff changeset
    29
90ce3da70b43 Initial load
duke
parents:
diff changeset
    30
// java import
90ce3da70b43 Initial load
duke
parents:
diff changeset
    31
//
90ce3da70b43 Initial load
duke
parents:
diff changeset
    32
import java.util.Set;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    33
import java.util.Collection;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    34
90ce3da70b43 Initial load
duke
parents:
diff changeset
    35
// jmx import
90ce3da70b43 Initial load
duke
parents:
diff changeset
    36
//
90ce3da70b43 Initial load
duke
parents:
diff changeset
    37
90ce3da70b43 Initial load
duke
parents:
diff changeset
    38
90ce3da70b43 Initial load
duke
parents:
diff changeset
    39
/**
32034
05676cfd40b5 8133040: docs: replace <tt> tags (obsolete in html5) for java.management
avstepan
parents: 25859
diff changeset
    40
 * The {@code TabularData} interface specifies the behavior of a specific type of complex <i>open data</i> objects
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    41
 * which represent <i>tabular data</i> structures.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    42
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    43
 * @since 1.5
90ce3da70b43 Initial load
duke
parents:
diff changeset
    44
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    45
public interface TabularData /*extends Map*/ {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    46
90ce3da70b43 Initial load
duke
parents:
diff changeset
    47
90ce3da70b43 Initial load
duke
parents:
diff changeset
    48
    /* *** TabularData specific information methods *** */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    49
90ce3da70b43 Initial load
duke
parents:
diff changeset
    50
90ce3da70b43 Initial load
duke
parents:
diff changeset
    51
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    52
     * Returns the <i>tabular type</i> describing this
32034
05676cfd40b5 8133040: docs: replace <tt> tags (obsolete in html5) for java.management
avstepan
parents: 25859
diff changeset
    53
     * {@code TabularData} instance.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    54
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    55
     * @return the tabular type.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    56
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    57
    public TabularType getTabularType();
90ce3da70b43 Initial load
duke
parents:
diff changeset
    58
90ce3da70b43 Initial load
duke
parents:
diff changeset
    59
90ce3da70b43 Initial load
duke
parents:
diff changeset
    60
    /**
32034
05676cfd40b5 8133040: docs: replace <tt> tags (obsolete in html5) for java.management
avstepan
parents: 25859
diff changeset
    61
     * Calculates the index that would be used in this {@code TabularData} instance to refer to the specified
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    62
     * composite data <var>value</var> parameter if it were added to this instance.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    63
     * This method checks for the type validity of the specified <var>value</var>,
32034
05676cfd40b5 8133040: docs: replace <tt> tags (obsolete in html5) for java.management
avstepan
parents: 25859
diff changeset
    64
     * but does not check if the calculated index is already used to refer to a value in this {@code TabularData} instance.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    65
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    66
     * @param  value                      the composite data value whose index in this
32034
05676cfd40b5 8133040: docs: replace <tt> tags (obsolete in html5) for java.management
avstepan
parents: 25859
diff changeset
    67
     *                                    {@code TabularData} instance is to be calculated;
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    68
     *                                    must be of the same composite type as this instance's row type;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    69
     *                                    must not be null.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    70
     *
32034
05676cfd40b5 8133040: docs: replace <tt> tags (obsolete in html5) for java.management
avstepan
parents: 25859
diff changeset
    71
     * @return the index that the specified <var>value</var> would have in this {@code TabularData} instance.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    72
     *
32034
05676cfd40b5 8133040: docs: replace <tt> tags (obsolete in html5) for java.management
avstepan
parents: 25859
diff changeset
    73
     * @throws NullPointerException       if <var>value</var> is {@code null}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    74
     *
32034
05676cfd40b5 8133040: docs: replace <tt> tags (obsolete in html5) for java.management
avstepan
parents: 25859
diff changeset
    75
     * @throws InvalidOpenTypeException   if <var>value</var> does not conform to this {@code TabularData} instance's
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    76
     *                                    row type definition.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    77
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    78
    public Object[] calculateIndex(CompositeData value) ;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    79
90ce3da70b43 Initial load
duke
parents:
diff changeset
    80
90ce3da70b43 Initial load
duke
parents:
diff changeset
    81
90ce3da70b43 Initial load
duke
parents:
diff changeset
    82
90ce3da70b43 Initial load
duke
parents:
diff changeset
    83
    /* *** Content information query methods *** */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    84
90ce3da70b43 Initial load
duke
parents:
diff changeset
    85
    /**
32034
05676cfd40b5 8133040: docs: replace <tt> tags (obsolete in html5) for java.management
avstepan
parents: 25859
diff changeset
    86
     * Returns the number of {@code CompositeData} values (ie the
05676cfd40b5 8133040: docs: replace <tt> tags (obsolete in html5) for java.management
avstepan
parents: 25859
diff changeset
    87
     * number of rows) contained in this {@code TabularData}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    88
     * instance.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    89
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    90
     * @return the number of values contained.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    91
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    92
    public int size() ;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    93
90ce3da70b43 Initial load
duke
parents:
diff changeset
    94
    /**
32034
05676cfd40b5 8133040: docs: replace <tt> tags (obsolete in html5) for java.management
avstepan
parents: 25859
diff changeset
    95
     * Returns {@code true} if the number of {@code CompositeData}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    96
     * values (ie the number of rows) contained in this
32034
05676cfd40b5 8133040: docs: replace <tt> tags (obsolete in html5) for java.management
avstepan
parents: 25859
diff changeset
    97
     * {@code TabularData} instance is zero.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    98
     *
32034
05676cfd40b5 8133040: docs: replace <tt> tags (obsolete in html5) for java.management
avstepan
parents: 25859
diff changeset
    99
     * @return true if this {@code TabularData} is empty.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   100
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   101
    public boolean isEmpty() ;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   102
90ce3da70b43 Initial load
duke
parents:
diff changeset
   103
    /**
32034
05676cfd40b5 8133040: docs: replace <tt> tags (obsolete in html5) for java.management
avstepan
parents: 25859
diff changeset
   104
     * Returns {@code true} if and only if this {@code TabularData} instance contains a {@code CompositeData} value
05676cfd40b5 8133040: docs: replace <tt> tags (obsolete in html5) for java.management
avstepan
parents: 25859
diff changeset
   105
     * (ie a row) whose index is the specified <var>key</var>. If <var>key</var> is {@code null} or does not conform to
05676cfd40b5 8133040: docs: replace <tt> tags (obsolete in html5) for java.management
avstepan
parents: 25859
diff changeset
   106
     * this {@code TabularData} instance's {@code TabularType} definition, this method simply returns {@code false}.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   107
     *
32034
05676cfd40b5 8133040: docs: replace <tt> tags (obsolete in html5) for java.management
avstepan
parents: 25859
diff changeset
   108
     * @param  key  the index value whose presence in this {@code TabularData} instance is to be tested.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   109
     *
32034
05676cfd40b5 8133040: docs: replace <tt> tags (obsolete in html5) for java.management
avstepan
parents: 25859
diff changeset
   110
     * @return  {@code true} if this {@code TabularData} indexes a row value with the specified key.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   111
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   112
    public boolean containsKey(Object[] key) ;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   113
90ce3da70b43 Initial load
duke
parents:
diff changeset
   114
    /**
32034
05676cfd40b5 8133040: docs: replace <tt> tags (obsolete in html5) for java.management
avstepan
parents: 25859
diff changeset
   115
     * Returns {@code true} if and only if this {@code TabularData} instance contains the specified
05676cfd40b5 8133040: docs: replace <tt> tags (obsolete in html5) for java.management
avstepan
parents: 25859
diff changeset
   116
     * {@code CompositeData} value. If <var>value</var> is {@code null} or does not conform to
05676cfd40b5 8133040: docs: replace <tt> tags (obsolete in html5) for java.management
avstepan
parents: 25859
diff changeset
   117
     * this {@code TabularData} instance's row type definition, this method simply returns {@code false}.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   118
     *
32034
05676cfd40b5 8133040: docs: replace <tt> tags (obsolete in html5) for java.management
avstepan
parents: 25859
diff changeset
   119
     * @param  value  the row value whose presence in this {@code TabularData} instance is to be tested.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   120
     *
32034
05676cfd40b5 8133040: docs: replace <tt> tags (obsolete in html5) for java.management
avstepan
parents: 25859
diff changeset
   121
     * @return  {@code true} if this {@code TabularData} instance contains the specified row value.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   122
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   123
    public boolean containsValue(CompositeData value) ;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   124
90ce3da70b43 Initial load
duke
parents:
diff changeset
   125
    /**
32034
05676cfd40b5 8133040: docs: replace <tt> tags (obsolete in html5) for java.management
avstepan
parents: 25859
diff changeset
   126
     * Returns the {@code CompositeData} value whose index is
05676cfd40b5 8133040: docs: replace <tt> tags (obsolete in html5) for java.management
avstepan
parents: 25859
diff changeset
   127
     * <var>key</var>, or {@code null} if there is no value mapping
05676cfd40b5 8133040: docs: replace <tt> tags (obsolete in html5) for java.management
avstepan
parents: 25859
diff changeset
   128
     * to <var>key</var>, in this {@code TabularData} instance.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   129
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   130
     * @param key the key of the row to return.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   131
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   132
     * @return the value corresponding to <var>key</var>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   133
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   134
     * @throws NullPointerException if the <var>key</var> is
32034
05676cfd40b5 8133040: docs: replace <tt> tags (obsolete in html5) for java.management
avstepan
parents: 25859
diff changeset
   135
     * {@code null}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   136
     * @throws InvalidKeyException if the <var>key</var> does not
32034
05676cfd40b5 8133040: docs: replace <tt> tags (obsolete in html5) for java.management
avstepan
parents: 25859
diff changeset
   137
     * conform to this {@code TabularData} instance's *
05676cfd40b5 8133040: docs: replace <tt> tags (obsolete in html5) for java.management
avstepan
parents: 25859
diff changeset
   138
     * {@code TabularType} definition
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   139
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   140
    public CompositeData get(Object[] key) ;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   141
90ce3da70b43 Initial load
duke
parents:
diff changeset
   142
90ce3da70b43 Initial load
duke
parents:
diff changeset
   143
90ce3da70b43 Initial load
duke
parents:
diff changeset
   144
90ce3da70b43 Initial load
duke
parents:
diff changeset
   145
    /* *** Content modification operations (one element at a time) *** */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   146
90ce3da70b43 Initial load
duke
parents:
diff changeset
   147
90ce3da70b43 Initial load
duke
parents:
diff changeset
   148
    /**
32034
05676cfd40b5 8133040: docs: replace <tt> tags (obsolete in html5) for java.management
avstepan
parents: 25859
diff changeset
   149
     * Adds <var>value</var> to this {@code TabularData} instance.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   150
     * The composite type of <var>value</var> must be the same as this
90ce3da70b43 Initial load
duke
parents:
diff changeset
   151
     * instance's row type (ie the composite type returned by
32034
05676cfd40b5 8133040: docs: replace <tt> tags (obsolete in html5) for java.management
avstepan
parents: 25859
diff changeset
   152
     * <code>this.getTabularType().{@link TabularType#getRowType
05676cfd40b5 8133040: docs: replace <tt> tags (obsolete in html5) for java.management
avstepan
parents: 25859
diff changeset
   153
     * getRowType()}</code>), and there must not already be an existing
05676cfd40b5 8133040: docs: replace <tt> tags (obsolete in html5) for java.management
avstepan
parents: 25859
diff changeset
   154
     * value in this {@code TabularData} instance whose index is the
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   155
     * same as the one calculated for the <var>value</var> to be
90ce3da70b43 Initial load
duke
parents:
diff changeset
   156
     * added. The index for <var>value</var> is calculated according
32034
05676cfd40b5 8133040: docs: replace <tt> tags (obsolete in html5) for java.management
avstepan
parents: 25859
diff changeset
   157
     * to this {@code TabularData} instance's {@code TabularType}
05676cfd40b5 8133040: docs: replace <tt> tags (obsolete in html5) for java.management
avstepan
parents: 25859
diff changeset
   158
     * definition (see <code>TabularType.{@link
05676cfd40b5 8133040: docs: replace <tt> tags (obsolete in html5) for java.management
avstepan
parents: 25859
diff changeset
   159
     * TabularType#getIndexNames getIndexNames()}</code>).
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   160
     *
32034
05676cfd40b5 8133040: docs: replace <tt> tags (obsolete in html5) for java.management
avstepan
parents: 25859
diff changeset
   161
     * @param  value                      the composite data value to be added as a new row to this {@code TabularData} instance;
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   162
     *                                    must be of the same composite type as this instance's row type;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   163
     *                                    must not be null.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   164
     *
32034
05676cfd40b5 8133040: docs: replace <tt> tags (obsolete in html5) for java.management
avstepan
parents: 25859
diff changeset
   165
     * @throws NullPointerException       if <var>value</var> is {@code null}
05676cfd40b5 8133040: docs: replace <tt> tags (obsolete in html5) for java.management
avstepan
parents: 25859
diff changeset
   166
     * @throws InvalidOpenTypeException   if <var>value</var> does not conform to this {@code TabularData} instance's
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   167
     *                                    row type definition.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   168
     * @throws KeyAlreadyExistsException  if the index for <var>value</var>, calculated according to
32034
05676cfd40b5 8133040: docs: replace <tt> tags (obsolete in html5) for java.management
avstepan
parents: 25859
diff changeset
   169
     *                                    this {@code TabularData} instance's {@code TabularType} definition
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   170
     *                                    already maps to an existing value in the underlying HashMap.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   171
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   172
    public void put(CompositeData value) ;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   173
90ce3da70b43 Initial load
duke
parents:
diff changeset
   174
    /**
32034
05676cfd40b5 8133040: docs: replace <tt> tags (obsolete in html5) for java.management
avstepan
parents: 25859
diff changeset
   175
     * Removes the {@code CompositeData} value whose index is <var>key</var> from this {@code TabularData} instance,
05676cfd40b5 8133040: docs: replace <tt> tags (obsolete in html5) for java.management
avstepan
parents: 25859
diff changeset
   176
     * and returns the removed value, or returns {@code null} if there is no value whose index is <var>key</var>.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   177
     *
32034
05676cfd40b5 8133040: docs: replace <tt> tags (obsolete in html5) for java.management
avstepan
parents: 25859
diff changeset
   178
     * @param  key  the index of the value to get in this {@code TabularData} instance;
05676cfd40b5 8133040: docs: replace <tt> tags (obsolete in html5) for java.management
avstepan
parents: 25859
diff changeset
   179
     *              must be valid with this {@code TabularData} instance's row type definition;
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   180
     *              must not be null.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   181
     *
32034
05676cfd40b5 8133040: docs: replace <tt> tags (obsolete in html5) for java.management
avstepan
parents: 25859
diff changeset
   182
     * @return previous value associated with specified key, or {@code null}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   183
     *         if there was no mapping for key.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   184
     *
32034
05676cfd40b5 8133040: docs: replace <tt> tags (obsolete in html5) for java.management
avstepan
parents: 25859
diff changeset
   185
     * @throws NullPointerException  if the <var>key</var> is {@code null}
05676cfd40b5 8133040: docs: replace <tt> tags (obsolete in html5) for java.management
avstepan
parents: 25859
diff changeset
   186
     * @throws InvalidKeyException   if the <var>key</var> does not conform to this {@code TabularData} instance's
05676cfd40b5 8133040: docs: replace <tt> tags (obsolete in html5) for java.management
avstepan
parents: 25859
diff changeset
   187
     *                               {@code TabularType} definition
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   188
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   189
    public CompositeData remove(Object[] key) ;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   190
90ce3da70b43 Initial load
duke
parents:
diff changeset
   191
90ce3da70b43 Initial load
duke
parents:
diff changeset
   192
90ce3da70b43 Initial load
duke
parents:
diff changeset
   193
90ce3da70b43 Initial load
duke
parents:
diff changeset
   194
    /* ***   Content modification bulk operations   *** */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   195
90ce3da70b43 Initial load
duke
parents:
diff changeset
   196
90ce3da70b43 Initial load
duke
parents:
diff changeset
   197
    /**
32034
05676cfd40b5 8133040: docs: replace <tt> tags (obsolete in html5) for java.management
avstepan
parents: 25859
diff changeset
   198
     * Add all the elements in <var>values</var> to this {@code TabularData} instance.
05676cfd40b5 8133040: docs: replace <tt> tags (obsolete in html5) for java.management
avstepan
parents: 25859
diff changeset
   199
     * If any  element in <var>values</var> does not satisfy the constraints defined in {@link #put(CompositeData) put},
05676cfd40b5 8133040: docs: replace <tt> tags (obsolete in html5) for java.management
avstepan
parents: 25859
diff changeset
   200
     * or if any two elements in <var>values</var> have the same index calculated according to this {@code TabularData}
05676cfd40b5 8133040: docs: replace <tt> tags (obsolete in html5) for java.management
avstepan
parents: 25859
diff changeset
   201
     * instance's {@code TabularType} definition, then an exception describing the failure is thrown
05676cfd40b5 8133040: docs: replace <tt> tags (obsolete in html5) for java.management
avstepan
parents: 25859
diff changeset
   202
     * and no element of <var>values</var> is added,  thus leaving this {@code TabularData} instance unchanged.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   203
     *
32034
05676cfd40b5 8133040: docs: replace <tt> tags (obsolete in html5) for java.management
avstepan
parents: 25859
diff changeset
   204
     * @param  values  the array of composite data values to be added as new rows to this {@code TabularData} instance;
05676cfd40b5 8133040: docs: replace <tt> tags (obsolete in html5) for java.management
avstepan
parents: 25859
diff changeset
   205
     *                 if <var>values</var> is {@code null} or empty, this method returns without doing anything.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   206
     *
32034
05676cfd40b5 8133040: docs: replace <tt> tags (obsolete in html5) for java.management
avstepan
parents: 25859
diff changeset
   207
     * @throws NullPointerException       if an element of <var>values</var> is {@code null}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   208
     * @throws InvalidOpenTypeException   if an element of <var>values</var> does not conform to
32034
05676cfd40b5 8133040: docs: replace <tt> tags (obsolete in html5) for java.management
avstepan
parents: 25859
diff changeset
   209
     *                                    this {@code TabularData} instance's row type definition
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   210
     * @throws KeyAlreadyExistsException  if the index for an element of <var>values</var>, calculated according to
32034
05676cfd40b5 8133040: docs: replace <tt> tags (obsolete in html5) for java.management
avstepan
parents: 25859
diff changeset
   211
     *                                    this {@code TabularData} instance's {@code TabularType} definition
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   212
     *                                    already maps to an existing value in this instance,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   213
     *                                    or two elements of <var>values</var> have the same index.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   214
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   215
    public void putAll(CompositeData[] values) ;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   216
90ce3da70b43 Initial load
duke
parents:
diff changeset
   217
    /**
32034
05676cfd40b5 8133040: docs: replace <tt> tags (obsolete in html5) for java.management
avstepan
parents: 25859
diff changeset
   218
     * Removes all {@code CompositeData} values (ie rows) from this {@code TabularData} instance.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   219
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   220
    public void clear();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   221
90ce3da70b43 Initial load
duke
parents:
diff changeset
   222
90ce3da70b43 Initial load
duke
parents:
diff changeset
   223
90ce3da70b43 Initial load
duke
parents:
diff changeset
   224
90ce3da70b43 Initial load
duke
parents:
diff changeset
   225
    /* ***   Collection views of the keys and values   *** */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   226
90ce3da70b43 Initial load
duke
parents:
diff changeset
   227
90ce3da70b43 Initial load
duke
parents:
diff changeset
   228
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   229
     * Returns a set view of the keys (ie the index values) of the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   230
     * {@code CompositeData} values (ie the rows) contained in this
90ce3da70b43 Initial load
duke
parents:
diff changeset
   231
     * {@code TabularData} instance. The returned {@code Set} is a
90ce3da70b43 Initial load
duke
parents:
diff changeset
   232
     * {@code Set<List<?>>} but is declared as a {@code Set<?>} for
90ce3da70b43 Initial load
duke
parents:
diff changeset
   233
     * compatibility reasons. The returned set can be used to iterate
90ce3da70b43 Initial load
duke
parents:
diff changeset
   234
     * over the keys.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   235
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   236
     * @return a set view ({@code Set<List<?>>}) of the index values
90ce3da70b43 Initial load
duke
parents:
diff changeset
   237
     * used in this {@code TabularData} instance.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   238
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   239
    public Set<?> keySet();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   240
90ce3da70b43 Initial load
duke
parents:
diff changeset
   241
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   242
     * Returns a collection view of the {@code CompositeData} values
90ce3da70b43 Initial load
duke
parents:
diff changeset
   243
     * (ie the rows) contained in this {@code TabularData} instance.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   244
     * The returned {@code Collection} is a {@code Collection<CompositeData>}
90ce3da70b43 Initial load
duke
parents:
diff changeset
   245
     * but is declared as a {@code Collection<?>} for compatibility reasons.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   246
     * The returned collection can be used to iterate over the values.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   247
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   248
     * @return a collection view ({@code Collection<CompositeData>})
90ce3da70b43 Initial load
duke
parents:
diff changeset
   249
     * of the rows contained in this {@code TabularData} instance.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   250
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   251
    public Collection<?> values();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   252
90ce3da70b43 Initial load
duke
parents:
diff changeset
   253
90ce3da70b43 Initial load
duke
parents:
diff changeset
   254
90ce3da70b43 Initial load
duke
parents:
diff changeset
   255
90ce3da70b43 Initial load
duke
parents:
diff changeset
   256
    /* ***  Commodity methods from java.lang.Object  *** */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   257
90ce3da70b43 Initial load
duke
parents:
diff changeset
   258
90ce3da70b43 Initial load
duke
parents:
diff changeset
   259
    /**
32034
05676cfd40b5 8133040: docs: replace <tt> tags (obsolete in html5) for java.management
avstepan
parents: 25859
diff changeset
   260
     * Compares the specified <var>obj</var> parameter with this {@code TabularData} instance for equality.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   261
     * <p>
32034
05676cfd40b5 8133040: docs: replace <tt> tags (obsolete in html5) for java.management
avstepan
parents: 25859
diff changeset
   262
     * Returns {@code true} if and only if all of the following statements are true:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   263
     * <ul>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   264
     * <li><var>obj</var> is non null,</li>
32034
05676cfd40b5 8133040: docs: replace <tt> tags (obsolete in html5) for java.management
avstepan
parents: 25859
diff changeset
   265
     * <li><var>obj</var> also implements the {@code TabularData} interface,</li>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   266
     * <li>their row types are equal</li>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   267
     * <li>their contents (ie index to value mappings) are equal</li>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   268
     * </ul>
32034
05676cfd40b5 8133040: docs: replace <tt> tags (obsolete in html5) for java.management
avstepan
parents: 25859
diff changeset
   269
     * This ensures that this {@code equals} method works properly for <var>obj</var> parameters which are
05676cfd40b5 8133040: docs: replace <tt> tags (obsolete in html5) for java.management
avstepan
parents: 25859
diff changeset
   270
     * different implementations of the {@code TabularData} interface.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   271
     * <br>&nbsp;
32034
05676cfd40b5 8133040: docs: replace <tt> tags (obsolete in html5) for java.management
avstepan
parents: 25859
diff changeset
   272
     * @param  obj  the object to be compared for equality with this {@code TabularData} instance;
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   273
     *
32034
05676cfd40b5 8133040: docs: replace <tt> tags (obsolete in html5) for java.management
avstepan
parents: 25859
diff changeset
   274
     * @return  {@code true} if the specified object is equal to this {@code TabularData} instance.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   275
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   276
    public boolean equals(Object obj);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   277
90ce3da70b43 Initial load
duke
parents:
diff changeset
   278
    /**
32034
05676cfd40b5 8133040: docs: replace <tt> tags (obsolete in html5) for java.management
avstepan
parents: 25859
diff changeset
   279
     * Returns the hash code value for this {@code TabularData} instance.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   280
     * <p>
32034
05676cfd40b5 8133040: docs: replace <tt> tags (obsolete in html5) for java.management
avstepan
parents: 25859
diff changeset
   281
     * The hash code of a {@code TabularData} instance is the sum of the hash codes
05676cfd40b5 8133040: docs: replace <tt> tags (obsolete in html5) for java.management
avstepan
parents: 25859
diff changeset
   282
     * of all elements of information used in {@code equals} comparisons
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   283
     * (ie: its <i>tabular type</i> and its content, where the content is defined as all the index to value mappings).
90ce3da70b43 Initial load
duke
parents:
diff changeset
   284
     * <p>
32034
05676cfd40b5 8133040: docs: replace <tt> tags (obsolete in html5) for java.management
avstepan
parents: 25859
diff changeset
   285
     * This ensures that {@code t1.equals(t2)} implies that {@code t1.hashCode()==t2.hashCode()}
05676cfd40b5 8133040: docs: replace <tt> tags (obsolete in html5) for java.management
avstepan
parents: 25859
diff changeset
   286
     * for any two {@code TabularDataSupport} instances {@code t1} and {@code t2},
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   287
     * as required by the general contract of the method
90ce3da70b43 Initial load
duke
parents:
diff changeset
   288
     * {@link Object#hashCode() Object.hashCode()}.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   289
     *
32034
05676cfd40b5 8133040: docs: replace <tt> tags (obsolete in html5) for java.management
avstepan
parents: 25859
diff changeset
   290
     * @return  the hash code value for this {@code TabularDataSupport} instance
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   291
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   292
    public int hashCode();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   293
90ce3da70b43 Initial load
duke
parents:
diff changeset
   294
    /**
32034
05676cfd40b5 8133040: docs: replace <tt> tags (obsolete in html5) for java.management
avstepan
parents: 25859
diff changeset
   295
     * Returns a string representation of this {@code TabularData} instance.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   296
     * <p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   297
     * The string representation consists of the name of the implementing class,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   298
     * and the tabular type of this instance.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   299
     *
32034
05676cfd40b5 8133040: docs: replace <tt> tags (obsolete in html5) for java.management
avstepan
parents: 25859
diff changeset
   300
     * @return  a string representation of this {@code TabularData} instance
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   301
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   302
    public String toString();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   303
90ce3da70b43 Initial load
duke
parents:
diff changeset
   304
}