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.sentrysoftware.wbem.javax.cim;
27  
28  /*-
29   * ╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲
30   * WBEM Java Client
31   * ჻჻჻჻჻჻
32   * Copyright (C) 2023 Sentry Software
33   * ჻჻჻჻჻჻
34   * This program is free software: you can redistribute it and/or modify
35   * it under the terms of the GNU Lesser General Public License as
36   * published by the Free Software Foundation, either version 3 of the
37   * License, or (at your option) any later version.
38   *
39   * This program is distributed in the hope that it will be useful,
40   * but WITHOUT ANY WARRANTY; without even the implied warranty of
41   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
42   * GNU General Lesser Public License for more details.
43   *
44   * You should have received a copy of the GNU General Lesser Public
45   * License along with this program.  If not, see
46   * <http://www.gnu.org/licenses/lgpl-3.0.html>.
47   * ╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱
48   */
49  
50  //Sync'd against JSR48 1.0.0 javadoc (build 1.5.0_10) on Wed Jan 20 02:20:58 EST 2010
51  /**
52   * This class represents an instance of a <code>CIMParameter</code> used for a
53   * method invocation. A <code>CIMArgument</code> has a name, data type and
54   * value. A <code>CIMArgument</code> corresponds to a <code>CIMParameter</code>
55   * defined for a <code>CIMMethod</code>.
56   * 
57   * @param <E>
58   *            Type parameter.
59   * 
60   * @see CIMParameter
61   */
62  public class CIMArgument<E> extends CIMValuedElement<E> {
63  
64  	private static final long serialVersionUID = 4727439564059428267L;
65  
66  	/**
67  	 * Constructs a <code>CIMArgument</code> to be used for method invocations.
68  	 * A <code>CIMArgument</code> corresponds to a <code>CIMParameter</code>.
69  	 * For each <code>CIMParameter</code> being populated during a method
70  	 * invocation a <code>CIMArgument</code> object must be created.
71  	 * 
72  	 * @param pName
73  	 *            Name of the CIM argument.
74  	 * @param pType
75  	 *            <code>CIMDataType</code> of the argument.
76  	 * @param pValue
77  	 *            Value of the argument.
78  	 * @throws IllegalArgumentException
79  	 *             If the value does not match the type.
80  	 * @see CIMParameter
81  	 */
82  	public CIMArgument(String pName, CIMDataType pType, E pValue) throws IllegalArgumentException {
83  		super(pName, pType, pValue);
84  	}
85  
86  	/**
87  	 * Compares this object against the specified object. The result is
88  	 * <code>true</code> if and only if the argument is not <code>null</code>
89  	 * and is a <code>CIMArgument</code> that represents the same name, type and
90  	 * value as this <code>CIMArgument</code>.
91  	 * 
92  	 * @param pObj
93  	 *            The object to compare with.
94  	 * @return <code>true</code> if the objects are the same; <code>false</code>
95  	 *         otherwise.
96  	 */
97  	@Override
98  	public boolean equals(Object pObj) {
99  		if (!(pObj instanceof CIMArgument)) return false;
100 		return super.equals(pObj);
101 	}
102 }