X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.spreadsheet.graph%2Fsrc%2Forg%2Fsimantics%2Fspreadsheet%2Fgraph%2FSpreadsheetSCLConstant.java;fp=bundles%2Forg.simantics.spreadsheet.graph%2Fsrc%2Forg%2Fsimantics%2Fspreadsheet%2Fgraph%2FSpreadsheetSCLConstant.java;h=e8d38b2c592d71bdcfa135e24fe78a18c69cecc1;hb=0ae2b770234dfc3cbb18bd38f324125cf0faca07;hp=0986f783359faf591bc61d5d30f0c7643235e74b;hpb=24e2b34260f219f0d1644ca7a138894980e25b14;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.spreadsheet.graph/src/org/simantics/spreadsheet/graph/SpreadsheetSCLConstant.java b/bundles/org.simantics.spreadsheet.graph/src/org/simantics/spreadsheet/graph/SpreadsheetSCLConstant.java index 0986f7833..e8d38b2c5 100644 --- a/bundles/org.simantics.spreadsheet.graph/src/org/simantics/spreadsheet/graph/SpreadsheetSCLConstant.java +++ b/bundles/org.simantics.spreadsheet.graph/src/org/simantics/spreadsheet/graph/SpreadsheetSCLConstant.java @@ -1,52 +1,52 @@ -package org.simantics.spreadsheet.graph; - -import java.io.Serializable; - -import org.simantics.databoard.Bindings; -import org.simantics.databoard.binding.Binding; - -public class SpreadsheetSCLConstant implements Serializable { - - private static final long serialVersionUID = 428064772427245449L; - - public String expression; - public Object content; - - public static final Binding BINDING = Bindings.getBindingUnchecked(SpreadsheetSCLConstant.class); - - public SpreadsheetSCLConstant(String expression, Object object) { - this.content = object; - this.expression = expression; - } - - @Override - public String toString() { - return super.toString(); - } - - @Override - public int hashCode() { - final int prime = 31; - int result = 1; - result = prime * result + ((expression == null) ? 0 : expression.hashCode()); - return result; - } - - @Override - public boolean equals(Object obj) { - if (this == obj) - return true; - if (obj == null) - return false; - if (getClass() != obj.getClass()) - return false; - SpreadsheetSCLConstant other = (SpreadsheetSCLConstant) obj; - if (expression == null) { - if (other.expression != null) - return false; - } else if (!expression.equals(other.expression)) - return false; - return true; - } - -} +package org.simantics.spreadsheet.graph; + +import java.io.Serializable; + +import org.simantics.databoard.Bindings; +import org.simantics.databoard.binding.Binding; + +public class SpreadsheetSCLConstant implements Serializable { + + private static final long serialVersionUID = 428064772427245449L; + + public String expression; + public Object content; + + public static final Binding BINDING = Bindings.getBindingUnchecked(SpreadsheetSCLConstant.class); + + public SpreadsheetSCLConstant(String expression, Object object) { + this.content = object; + this.expression = expression; + } + + @Override + public String toString() { + return super.toString(); + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((expression == null) ? 0 : expression.hashCode()); + return result; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + if (getClass() != obj.getClass()) + return false; + SpreadsheetSCLConstant other = (SpreadsheetSCLConstant) obj; + if (expression == null) { + if (other.expression != null) + return false; + } else if (!expression.equals(other.expression)) + return false; + return true; + } + +}