X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.databoard%2Fsrc%2Forg%2Fsimantics%2Fdataboard%2Futil%2FRange.java;h=e69927976121e16b55016dbc4f90c9c05769f2f2;hb=48bb50bb6640506d1f150ca8e4fa5a6e878464be;hp=4488ed7056802a0c96c767298d537dd5801dd132;hpb=969bd23cab98a79ca9101af33334000879fb60c5;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.databoard/src/org/simantics/databoard/util/Range.java b/bundles/org.simantics.databoard/src/org/simantics/databoard/util/Range.java index 4488ed705..e69927976 100644 --- a/bundles/org.simantics.databoard/src/org/simantics/databoard/util/Range.java +++ b/bundles/org.simantics.databoard/src/org/simantics/databoard/util/Range.java @@ -1,18 +1,18 @@ -/******************************************************************************* - * 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.util; -import java.util.regex.Matcher; -import java.util.regex.Pattern; +import java.util.regex.Matcher; +import java.util.regex.Pattern; @@ -218,7 +218,7 @@ public class Range { public static Range valueOf(String txt) throws RangeException - { + { Matcher m = RANGE_PATTERN.matcher(txt); if (!m.matches()) throw new RangeException("Illegal range '" + txt + "'"); @@ -250,7 +250,7 @@ public class Range { Long l = Long.parseLong( m.group(3) ); l2 = m.group(4).equals("]") ? Limit.inclusive(l) : Limit.exclusive(l); } catch (NumberFormatException nfe) { - try { + try { Double d = Double.parseDouble( m.group(3) ); l2 = m.group(4).equals("]") ? Limit.inclusive(d) : Limit.exclusive(d); } catch (NumberFormatException e) {