src/share/classes/javax/management/openmbean/TabularType.java

Print this page




  58     /**
  59      * @serial The items used to index each row element, kept in the order the user gave
  60      *         This is an unmodifiable {@link ArrayList}
  61      */
  62     private List<String> indexNames;
  63 
  64 
  65     private transient Integer myHashCode = null; // As this instance is immutable, these two values
  66     private transient String  myToString = null; // need only be calculated once.
  67 
  68 
  69     /* *** Constructor *** */
  70 
  71     /**
  72      * Constructs a <code>TabularType</code> instance, checking for the validity of the given parameters.
  73      * The validity constraints are described below for each parameter.
  74      * <p>
  75      * The Java class name of tabular data values this tabular type represents
  76      * (ie the class name returned by the {@link OpenType#getClassName() getClassName} method)
  77      * is set to the string value returned by <code>TabularData.class.getName()</code>.
  78      * <p>
  79      * @param  typeName  The name given to the tabular type this instance represents; cannot be a null or empty string.
  80      * <br>&nbsp;
  81      * @param  description  The human readable description of the tabular type this instance represents;
  82      *                      cannot be a null or empty string.
  83      * <br>&nbsp;
  84      * @param  rowType  The type of the row elements of tabular data values described by this tabular type instance;
  85      *                  cannot be null.
  86      * <br>&nbsp;
  87      * @param  indexNames  The names of the items the values of which are used to uniquely index each row element in the
  88      *                     tabular data values described by this tabular type instance;
  89      *                     cannot be null or empty. Each element should be an item name defined in <var>rowType</var>
  90      *                     (no null or empty string allowed).
  91      *                     It is important to note that the <b>order</b> of the item names in <var>indexNames</var>
  92      *                     is used by the methods {@link TabularData#get(java.lang.Object[]) get} and
  93      *                     {@link TabularData#remove(java.lang.Object[]) remove} of class
  94      *                     <code>TabularData</code> to match their array of values parameter to items.
  95      * <br>&nbsp;
  96      * @throws IllegalArgumentException  if <var>rowType</var> is null,
  97      *                                   or <var>indexNames</var> is a null or empty array,
  98      *                                   or an element in <var>indexNames</var> is a null or empty string,




  58     /**
  59      * @serial The items used to index each row element, kept in the order the user gave
  60      *         This is an unmodifiable {@link ArrayList}
  61      */
  62     private List<String> indexNames;
  63 
  64 
  65     private transient Integer myHashCode = null; // As this instance is immutable, these two values
  66     private transient String  myToString = null; // need only be calculated once.
  67 
  68 
  69     /* *** Constructor *** */
  70 
  71     /**
  72      * Constructs a <code>TabularType</code> instance, checking for the validity of the given parameters.
  73      * The validity constraints are described below for each parameter.
  74      * <p>
  75      * The Java class name of tabular data values this tabular type represents
  76      * (ie the class name returned by the {@link OpenType#getClassName() getClassName} method)
  77      * is set to the string value returned by <code>TabularData.class.getName()</code>.
  78      *
  79      * @param  typeName  The name given to the tabular type this instance represents; cannot be a null or empty string.
  80      * <br>&nbsp;
  81      * @param  description  The human readable description of the tabular type this instance represents;
  82      *                      cannot be a null or empty string.
  83      * <br>&nbsp;
  84      * @param  rowType  The type of the row elements of tabular data values described by this tabular type instance;
  85      *                  cannot be null.
  86      * <br>&nbsp;
  87      * @param  indexNames  The names of the items the values of which are used to uniquely index each row element in the
  88      *                     tabular data values described by this tabular type instance;
  89      *                     cannot be null or empty. Each element should be an item name defined in <var>rowType</var>
  90      *                     (no null or empty string allowed).
  91      *                     It is important to note that the <b>order</b> of the item names in <var>indexNames</var>
  92      *                     is used by the methods {@link TabularData#get(java.lang.Object[]) get} and
  93      *                     {@link TabularData#remove(java.lang.Object[]) remove} of class
  94      *                     <code>TabularData</code> to match their array of values parameter to items.
  95      * <br>&nbsp;
  96      * @throws IllegalArgumentException  if <var>rowType</var> is null,
  97      *                                   or <var>indexNames</var> is a null or empty array,
  98      *                                   or an element in <var>indexNames</var> is a null or empty string,