2  * ============LICENSE_START=======================================================
 
   4  * ================================================================================
 
   5  * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
 
   6  * ================================================================================
 
   7  * Licensed under the Apache License, Version 2.0 (the "License");
 
   8  * you may not use this file except in compliance with the License.
 
   9  * You may obtain a copy of the License at
 
  11  *      http://www.apache.org/licenses/LICENSE-2.0
 
  13  * Unless required by applicable law or agreed to in writing, software
 
  14  * distributed under the License is distributed on an "AS IS" BASIS,
 
  15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 
  16  * See the License for the specific language governing permissions and
 
  17  * limitations under the License.
 
  18  * ============LICENSE_END=========================================================
 
  21 package org.openecomp.mso.openstack.utils;
 
  25 public class MsoHeatEnvironmentResource {
 
  30         public MsoHeatEnvironmentResource(String name, String value) {
 
  35         public MsoHeatEnvironmentResource(String name) {
 
  36                 // Allow to initialize with a null value
 
  39         public MsoHeatEnvironmentResource() {
 
  43         public String getName() {
 
  46         public void setName(String name) {
 
  50         public String getValue() {
 
  53         public void setValue(String value) {
 
  56         public String toString() {
 
  57                 return "\"" + this.name + "\": " + this.value;
 
  60         public boolean equals(Object o) {       
 
  61                 if (!(o instanceof MsoHeatEnvironmentResource)) {
 
  67                 MsoHeatEnvironmentResource her = (MsoHeatEnvironmentResource) o;        
 
  68                 // If the name of the parameter is the same, then they're equal
 
  69                 if (her.getName().equals(this.getName())) {
 
  75         public int hashCode() {
 
  78                         result = this.name.hashCode();
 
  79                 } catch (Exception e) {
 
  80                         // in case it's null - return zero