X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;ds=sidebyside;f=bundles%2Forg.simantics.databoard%2Fsrc%2Forg%2Fsimantics%2Fdataboard%2Fbinding%2Fimpl%2FByteBindingDefault.java;fp=bundles%2Forg.simantics.databoard%2Fsrc%2Forg%2Fsimantics%2Fdataboard%2Fbinding%2Fimpl%2FByteBindingDefault.java;h=af9bd89a74a1879adf8662d5aea805483ed16dbf;hb=0ae2b770234dfc3cbb18bd38f324125cf0faca07;hp=bc599e7589826df048cff3d62647002b8fa97e0d;hpb=24e2b34260f219f0d1644ca7a138894980e25b14;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.databoard/src/org/simantics/databoard/binding/impl/ByteBindingDefault.java b/bundles/org.simantics.databoard/src/org/simantics/databoard/binding/impl/ByteBindingDefault.java index bc599e758..af9bd89a7 100644 --- a/bundles/org.simantics.databoard/src/org/simantics/databoard/binding/impl/ByteBindingDefault.java +++ b/bundles/org.simantics.databoard/src/org/simantics/databoard/binding/impl/ByteBindingDefault.java @@ -1,20 +1,20 @@ -/******************************************************************************* - * Copyright (c) 2010 Association for Decentralized Information Management in - * Industry THTH ry. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * VTT Technical Research Centre of Finland - initial API and implementation - *******************************************************************************/ +/******************************************************************************* + * Copyright (c) 2010 Association for Decentralized Information Management in + * Industry THTH ry. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * VTT Technical Research Centre of Finland - initial API and implementation + *******************************************************************************/ package org.simantics.databoard.binding.impl; -import org.simantics.databoard.binding.ByteBinding; -import org.simantics.databoard.binding.error.BindingException; -import org.simantics.databoard.binding.error.UnsupportedOperationException; -import org.simantics.databoard.type.ByteType; +import org.simantics.databoard.binding.ByteBinding; +import org.simantics.databoard.binding.error.BindingException; +import org.simantics.databoard.binding.error.UnsupportedOperationException; +import org.simantics.databoard.type.ByteType; /** * Binds ByteType to java.lang.Byte-class @@ -44,11 +44,11 @@ public class ByteBindingDefault extends ByteBinding { @Override public Object create(String value) throws BindingException { - try { - return Byte.parseByte(value); - } catch (java.lang.NumberFormatException e) { - throw new BindingException( e ); - } + try { + return Byte.parseByte(value); + } catch (java.lang.NumberFormatException e) { + throw new BindingException( e ); + } } public Byte getValue(Object obj) @@ -83,16 +83,16 @@ public class ByteBindingDefault extends ByteBinding { public boolean isImmutable() { return true; } - - @Override - public int compare(Object o1, Object o2) - { - Byte d1 = (Byte) o1; - Byte d2 = (Byte) o2; - int d = d1-d2; - return d == 0 ? 0 : (d<0?-1:1); - } - + + @Override + public int compare(Object o1, Object o2) + { + Byte d1 = (Byte) o1; + Byte d2 = (Byte) o2; + int d = d1-d2; + return d == 0 ? 0 : (d<0?-1:1); + } + }