]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.spreadsheet.graph/src/org/simantics/spreadsheet/graph/SpreadsheetCellStyle.java
Fixed all line endings of the repository
[simantics/platform.git] / bundles / org.simantics.spreadsheet.graph / src / org / simantics / spreadsheet / graph / SpreadsheetCellStyle.java
1 package org.simantics.spreadsheet.graph;
2
3 import java.util.Collections;
4 import java.util.Map;
5
6 public class SpreadsheetCellStyle implements SheetNode {
7
8     public final SpreadsheetCell cell;
9     
10     public SpreadsheetCellStyle(SpreadsheetCell spreadsheetCell) {
11         this.cell = spreadsheetCell;
12     }
13
14     @Override
15     public String getName() {
16         return "style";
17     }
18
19     @Override
20     public Map getChildren() {
21         return Collections.emptyMap();
22     }
23
24     @Override
25     public Map getProperties() {
26         return Collections.emptyMap();
27     }
28     
29     @Override
30     public int hashCode() {
31         final int prime = 31;
32         int result = 1;
33         result = prime * result + ((cell == null) ? 0 : cell.hashCode());
34         return result;
35     }
36
37     @Override
38     public boolean equals(Object obj) {
39         if (this == obj)
40             return true;
41         if (obj == null)
42             return false;
43         if (getClass() != obj.getClass())
44             return false;
45         SpreadsheetCellStyle other = (SpreadsheetCellStyle) obj;
46         if (cell == null) {
47             if (other.cell != null)
48                 return false;
49         } else if (!cell.equals(other.cell))
50             return false;
51         return true;
52     }
53
54 }