1 /*
2 * Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. Oracle designates this
8 * particular file as subject to the "Classpath" exception as provided
9 * by Oracle in the LICENSE file that accompanied this code.
10 *
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
42 * The <code>TabularType</code> class is the <i> open type</i> class
43 * whose instances describe the types of {@link TabularData TabularData} values.
44 *
45 * @since 1.5
46 */
47 public class TabularType extends OpenType<TabularData> {
48
49 /* Serial version */
50 static final long serialVersionUID = 6554071860220659261L;
51
52
53 /**
54 * @serial The composite type of rows
55 */
56 private CompositeType rowType;
57
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>
81 * @param description The human readable description of the tabular type this instance represents;
|
1 /*
2 * Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. Oracle designates this
8 * particular file as subject to the "Classpath" exception as provided
9 * by Oracle in the LICENSE file that accompanied this code.
10 *
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
42 * The <code>TabularType</code> class is the <i> open type</i> class
43 * whose instances describe the types of {@link TabularData TabularData} values.
44 *
45 * @since 1.5
46 */
47 public class TabularType extends OpenType<TabularData> {
48
49 /* Serial version */
50 static final long serialVersionUID = 6554071860220659261L;
51
52
53 /**
54 * @serial The composite type of rows
55 */
56 private CompositeType rowType;
57
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 @SuppressWarnings("serial") // Conditionally serializable
63 private List<String> indexNames;
64
65
66 private transient Integer myHashCode = null; // As this instance is immutable, these two values
67 private transient String myToString = null; // need only be calculated once.
68
69
70 /* *** Constructor *** */
71
72 /**
73 * Constructs a <code>TabularType</code> instance, checking for the validity of the given parameters.
74 * The validity constraints are described below for each parameter.
75 * <p>
76 * The Java class name of tabular data values this tabular type represents
77 * (ie the class name returned by the {@link OpenType#getClassName() getClassName} method)
78 * is set to the string value returned by <code>TabularData.class.getName()</code>.
79 *
80 * @param typeName The name given to the tabular type this instance represents; cannot be a null or empty string.
81 * <br>
82 * @param description The human readable description of the tabular type this instance represents;
|