Home | History | Annotate | Download | only in issue332
      1 /**
      2  * Copyright (c) 2008, http://www.snakeyaml.org
      3  *
      4  * Licensed under the Apache License, Version 2.0 (the "License");
      5  * you may not use this file except in compliance with the License.
      6  * You may obtain a copy of the License at
      7  *
      8  *     http://www.apache.org/licenses/LICENSE-2.0
      9  *
     10  * Unless required by applicable law or agreed to in writing, software
     11  * distributed under the License is distributed on an "AS IS" BASIS,
     12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     13  * See the License for the specific language governing permissions and
     14  * limitations under the License.
     15  */
     16 package org.yaml.snakeyaml.issues.issue332;
     17 
     18 import java.beans.ConstructorProperties;
     19 import java.math.BigDecimal;
     20 
     21 public class Data {
     22     private String label;
     23 
     24     private String unit;
     25 
     26     private BigDecimal value;
     27 
     28     public BigDecimal getValue() {
     29         return value;
     30     }
     31 
     32     public String getLabel() {
     33         return label;
     34     }
     35 
     36     @ConstructorProperties({"label", "value", "unit"})
     37     public Data(String label, BigDecimal value, String unit) {
     38         this.label = label;
     39         this.value = value;
     40         this.unit = unit;
     41     }
     42 
     43 //    public void setLabel(String label) {
     44 //        this.label = label;
     45 //    }
     46 //
     47 //    public void setUnit(String unit) {
     48 //        this.unit = unit;
     49 //    }
     50 //
     51 //    public void setValue(BigDecimal value) {
     52 //        this.value = value;
     53 //    }
     54 
     55     public String getUnit() {
     56         return unit;
     57     }
     58 
     59     public Data() {
     60     }
     61 
     62     @Override
     63     public String toString() {
     64         return "Data{" +
     65                 "label='" + label + '\'' +
     66                 ", unit='" + unit + '\'' +
     67                 ", value=" + value +
     68                 '}';
     69     }
     70 }
     71