View Javadoc
1   /*
2     (C) Copyright IBM Corp. 2006, 2012
3   
4     THIS FILE IS PROVIDED UNDER THE TERMS OF THE ECLIPSE PUBLIC LICENSE
5     ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE
6     CONSTITUTES RECIPIENTS ACCEPTANCE OF THE AGREEMENT.
7   
8     You can obtain a current copy of the Eclipse Public License from
9     http://www.opensource.org/licenses/eclipse-1.0.php
10  
11    @author : Endre Bak, ebak@de.ibm.com
12   * 
13   * Flag       Date        Prog         Description
14   * -------------------------------------------------------------------------------
15   * 1565892    2006-10-06  ebak         Make SBLIM client JSR48 compliant
16   * 2003590    2008-06-30  blaschke-oss Change licensing from CPL to EPL
17   * 2524131    2009-01-21  raman_arora  Upgrade client to JDK 1.5 (Phase 1)
18   * 2750520    2009-04-10  blaschke-oss Code cleanup from empty statement et al
19   * 2797550    2009-06-01  raman_arora  JSR48 compliance - add Java Generics
20   * 2935258    2010-01-22  blaschke-oss Sync up javax.cim.* javadoc with JSR48 1.0.0
21   * 2944839    2010-02-08  blaschke-oss Remove redundant toString() methods
22   * 3400209    2011-08-31  blaschke-oss Highlighted Static Analysis (PMD) issues
23   * 3565581    2012-09-07  blaschke-oss TCK: remove unnecessary overriding methods
24   */
25  
26  package org.metricshub.wbem.javax.cim;
27  
28  /*-
29   * ╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲
30   * WBEM Java Client
31   * ჻჻჻჻჻჻
32   * Copyright 2023 - 2025 MetricsHub
33   * ჻჻჻჻჻჻
34   * Licensed under the Apache License, Version 2.0 (the "License");
35   * you may not use this file except in compliance with the License.
36   * You may obtain a copy of the License at
37   *
38   *      http://www.apache.org/licenses/LICENSE-2.0
39   *
40   * Unless required by applicable law or agreed to in writing, software
41   * distributed under the License is distributed on an "AS IS" BASIS,
42   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
43   * See the License for the specific language governing permissions and
44   * limitations under the License.
45   * ╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱
46   */
47  
48  //Sync'd against JSR48 1.0.0 javadoc (build 1.5.0_10) on Wed Jan 20 02:20:58 EST 2010
49  /**
50   * This class represents an instance of a <code>CIMParameter</code> used for a
51   * method invocation. A <code>CIMArgument</code> has a name, data type and
52   * value. A <code>CIMArgument</code> corresponds to a <code>CIMParameter</code>
53   * defined for a <code>CIMMethod</code>.
54   *
55   * @param <E>
56   *            Type parameter.
57   *
58   * @see CIMParameter
59   */
60  public class CIMArgument<E> extends CIMValuedElement<E> {
61  	private static final long serialVersionUID = 4727439564059428267L;
62  
63  	/**
64  	 * Constructs a <code>CIMArgument</code> to be used for method invocations.
65  	 * A <code>CIMArgument</code> corresponds to a <code>CIMParameter</code>.
66  	 * For each <code>CIMParameter</code> being populated during a method
67  	 * invocation a <code>CIMArgument</code> object must be created.
68  	 *
69  	 * @param pName
70  	 *            Name of the CIM argument.
71  	 * @param pType
72  	 *            <code>CIMDataType</code> of the argument.
73  	 * @param pValue
74  	 *            Value of the argument.
75  	 * @throws IllegalArgumentException
76  	 *             If the value does not match the type.
77  	 * @see CIMParameter
78  	 */
79  	public CIMArgument(String pName, CIMDataType pType, E pValue) throws IllegalArgumentException {
80  		super(pName, pType, pValue);
81  	}
82  
83  	/**
84  	 * Compares this object against the specified object. The result is
85  	 * <code>true</code> if and only if the argument is not <code>null</code>
86  	 * and is a <code>CIMArgument</code> that represents the same name, type and
87  	 * value as this <code>CIMArgument</code>.
88  	 *
89  	 * @param pObj
90  	 *            The object to compare with.
91  	 * @return <code>true</code> if the objects are the same; <code>false</code>
92  	 *         otherwise.
93  	 */
94  	@Override
95  	public boolean equals(Object pObj) {
96  		if (!(pObj instanceof CIMArgument)) return false;
97  		return super.equals(pObj);
98  	}
99  }