Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
PojavLauncherTeam
GitHub Repository: PojavLauncherTeam/openj9
Path: blob/master/sourcetools/objectmodel/com/ibm/j9tools/om/Property.java
6004 views
1
/*******************************************************************************
2
* Copyright (c) 2007, 2011 IBM Corp. and others
3
*
4
* This program and the accompanying materials are made available under
5
* the terms of the Eclipse Public License 2.0 which accompanies this
6
* distribution and is available at https://www.eclipse.org/legal/epl-2.0/
7
* or the Apache License, Version 2.0 which accompanies this distribution and
8
* is available at https://www.apache.org/licenses/LICENSE-2.0.
9
*
10
* This Source Code may also be made available under the following
11
* Secondary Licenses when the conditions for such availability set
12
* forth in the Eclipse Public License, v. 2.0 are satisfied: GNU
13
* General Public License, version 2 with the GNU Classpath
14
* Exception [1] and GNU General Public License, version 2 with the
15
* OpenJDK Assembly Exception [2].
16
*
17
* [1] https://www.gnu.org/software/classpath/license.html
18
* [2] http://openjdk.java.net/legal/assembly-exception.html
19
*
20
* SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 OR LicenseRef-GPL-2.0 WITH Assembly-exception
21
*******************************************************************************/
22
package com.ibm.j9tools.om;
23
24
/**
25
* A container classes used to keep track of build spec properties.
26
*
27
* @author Maciek Klimkowski
28
* @author Gabriel Castro
29
*/
30
public class Property extends OMObject implements Comparable<Property> {
31
private String _name;
32
private String _value;
33
34
/**
35
* Creates a property with the given name and value.
36
*
37
* @param name the property name
38
* @param value the property value
39
*/
40
public Property(String name, String value) {
41
this._name = name;
42
this._value = value;
43
}
44
45
/**
46
* Retrieves the name of this property.
47
*
48
* @return the name
49
*/
50
public String getName() {
51
return _name;
52
}
53
54
/**
55
* Sets the name of this property.
56
*
57
* @param name the name
58
*/
59
public void setName(String name) {
60
_name = name;
61
}
62
63
/**
64
* Retrieves this property's value.
65
*
66
* @return the value
67
*/
68
public String getValue() {
69
return _value;
70
}
71
72
/**
73
* Sets this property's value.
74
*
75
* @param value the new value
76
*/
77
public void setValue(String value) {
78
_value = value;
79
}
80
81
/**
82
* @see java.lang.Comparable#compareTo(java.lang.Object)
83
*/
84
public int compareTo(Property arg0) {
85
return _name.compareToIgnoreCase(arg0.getName());
86
}
87
88
}
89
90