Skip to main content
summaryrefslogtreecommitdiffstats
blob: 629829950e7f6cf179f836c886b62bd35f04ed89 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
/*******************************************************************************
 * Copyright (c) 2000, 2005 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License 2.0
 * which accompanies this distribution, and is available at
 * https://www.eclipse.org/legal/epl-2.0/
 *
 * SPDX-License-Identifier: EPL-2.0
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/

package org.eclipse.wst.ws.internal.datamodel;

/**
* This is the abstract class for properties of a Node.
* Every property has an immutable name and a value of type Object.
*/
public interface Property
{

  // Copyright
  public static final String copyright = "(c) Copyright IBM Corporation 2000, 2002.";

  /**
  * Every Node has a property called "name" that is equivalent
  * to and kept synchronized with Node.getName() and Node.setName().
  */
  public static final String NAME = "name";

  /**
  * Returns a shallow clone of this <code>Property</code>.
  * Property key and value references are cloned,
  * but the value objects themselves are not cloned.
  * @return Property A new Property.
  */
  public Property shallowClone ();

  /**
  * Returns the name of this node.
  * @return String The name of this node.
  */
  public String getName ();

  /**
  * Sets the value of this property.
  * @param value The value to set. Any previous value is replaced.
  */
  public void setValue ( Object value );

  /**
  * Returns the value of this property.
  * @return Object The value of this property, possibly null.
  */
  public Object getValue ();

  /**
  * Sets the value of this property as a string.
  * @param value The string to set. Any previous value is replaced.
  * The type of the previous value, if any, is of no consequence.
  */
  public void setValueAsString ( String value );

  /**
  * Returns the value of this property as a string.
  * @return String the value of this property as a string, possibly null.
  * If the set value is an arbitrary Object, then Object.toString() is
  * returned.
  */
  public String getValueAsString ();
}

Back to the top