]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.diagram/src/org/simantics/diagram/synchronization/graph/layer/LayersSpec.java
Bringing layers back to life
[simantics/platform.git] / bundles / org.simantics.diagram / src / org / simantics / diagram / synchronization / graph / layer / LayersSpec.java
1 package org.simantics.diagram.synchronization.graph.layer;
2
3 import java.util.Collection;
4
5 public class LayersSpec {
6     private Collection<GraphLayer> graphLayers;
7
8     public LayersSpec(Collection<GraphLayer> gls) {
9         this.graphLayers = gls;
10     }
11
12     public Collection<GraphLayer> getGraphLayers() {
13         return graphLayers;
14     }
15
16     @Override
17     public int hashCode() {
18         final int prime = 31;
19         int result = 1;
20         result = prime * result + ((graphLayers == null) ? 0 : graphLayers.hashCode());
21         return result;
22     }
23
24     @Override
25     public boolean equals(Object obj) {
26         if (this == obj)
27             return true;
28         if (obj == null)
29             return false;
30         if (getClass() != obj.getClass())
31             return false;
32         LayersSpec other = (LayersSpec) obj;
33         if (graphLayers == null) {
34             if (other.graphLayers != null)
35                 return false;
36         } else if (!graphLayers.equals(other.graphLayers))
37             return false;
38         return true;
39     }
40
41 }