View Javadoc

1   /**
2    * Copyright (c) 2008-2011, 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  
17  package org.yaml.snakeyaml.extensions.compactnotation;
18  
19  public class Row {
20      private String id;
21      private int size;
22      private double ratio;
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 String getDescription() {
47          return description;
48      }
49  
50      public void setDescription(String description) {
51          this.description = description;
52      }
53  
54      public String getId() {
55          return id;
56      }
57  
58      @Override
59      public boolean equals(Object obj) {
60          return toString().equals(obj.toString());
61      }
62  
63      @Override
64      public int hashCode() {
65          return id.hashCode();
66      }
67  
68      @Override
69      public String toString() {
70          return "Row id=" + id;
71      }
72  }