]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.spreadsheet.graph/src/org/simantics/spreadsheet/graph/SpreadsheetCellContentExpression.java
First step to enable reading of cache when not writing
[simantics/platform.git] / bundles / org.simantics.spreadsheet.graph / src / org / simantics / spreadsheet / graph / SpreadsheetCellContentExpression.java
1 package org.simantics.spreadsheet.graph;
2
3 import java.util.Collections;
4 import java.util.Map;
5
6 public class SpreadsheetCellContentExpression implements SheetNode {
7
8         public final SpreadsheetCell cell;
9         
10         public SpreadsheetCellContentExpression(SpreadsheetCell cell) {
11                 this.cell = cell;
12         }
13         
14     @Override
15         public String getName() {
16                 return "expression";
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         SpreadsheetCellContentExpression other = (SpreadsheetCellContentExpression) 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 }