View Javadoc

1   /**
2    * Copyright (c) 2008-2012, 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.extensions.compactnotation;
17  
18  public class Row {
19      private String id;
20      private int size;
21      private double ratio;
22      private float floatRatio;
23      private String description;
24  
25      public Row(String id) {
26          super();
27          this.id = id;
28      }
29  
30      public int getSize() {
31          return size;
32      }
33  
34      public void setSize(int size) {
35          this.size = size;
36      }
37  
38      public double getRatio() {
39          return ratio;
40      }
41  
42      public void setRatio(double ratio) {
43          this.ratio = ratio;
44      }
45  
46      public float getFloatRatio() {
47          return floatRatio;
48      }
49  
50      public void setFloatRatio(float floatRatio) {
51          this.floatRatio = floatRatio;
52      }
53  
54      public String getDescription() {
55          return description;
56      }
57  
58      public void setDescription(String description) {
59          this.description = description;
60      }
61  
62      public String getId() {
63          return id;
64      }
65  
66      @Override
67      public boolean equals(Object obj) {
68          return toString().equals(obj.toString());
69      }
70  
71      @Override
72      public int hashCode() {
73          return id.hashCode();
74      }
75  
76      @Override
77      public String toString() {
78          return "Row id=" + id;
79      }
80  }