Path: blob/master/sourcetools/objectmodel/com/ibm/j9tools/om/Property.java
6004 views
/*******************************************************************************1* Copyright (c) 2007, 2011 IBM Corp. and others2*3* This program and the accompanying materials are made available under4* the terms of the Eclipse Public License 2.0 which accompanies this5* distribution and is available at https://www.eclipse.org/legal/epl-2.0/6* or the Apache License, Version 2.0 which accompanies this distribution and7* is available at https://www.apache.org/licenses/LICENSE-2.0.8*9* This Source Code may also be made available under the following10* Secondary Licenses when the conditions for such availability set11* forth in the Eclipse Public License, v. 2.0 are satisfied: GNU12* General Public License, version 2 with the GNU Classpath13* Exception [1] and GNU General Public License, version 2 with the14* OpenJDK Assembly Exception [2].15*16* [1] https://www.gnu.org/software/classpath/license.html17* [2] http://openjdk.java.net/legal/assembly-exception.html18*19* 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-exception20*******************************************************************************/21package com.ibm.j9tools.om;2223/**24* A container classes used to keep track of build spec properties.25*26* @author Maciek Klimkowski27* @author Gabriel Castro28*/29public class Property extends OMObject implements Comparable<Property> {30private String _name;31private String _value;3233/**34* Creates a property with the given name and value.35*36* @param name the property name37* @param value the property value38*/39public Property(String name, String value) {40this._name = name;41this._value = value;42}4344/**45* Retrieves the name of this property.46*47* @return the name48*/49public String getName() {50return _name;51}5253/**54* Sets the name of this property.55*56* @param name the name57*/58public void setName(String name) {59_name = name;60}6162/**63* Retrieves this property's value.64*65* @return the value66*/67public String getValue() {68return _value;69}7071/**72* Sets this property's value.73*74* @param value the new value75*/76public void setValue(String value) {77_value = value;78}7980/**81* @see java.lang.Comparable#compareTo(java.lang.Object)82*/83public int compareTo(Property arg0) {84return _name.compareToIgnoreCase(arg0.getName());85}8687}888990