-/*******************************************************************************\r
- * Copyright (c) 2010 Association for Decentralized Information Management in\r
- * Industry THTH ry.\r
- * All rights reserved. This program and the accompanying materials\r
- * are made available under the terms of the Eclipse Public License v1.0\r
- * which accompanies this distribution, and is available at\r
- * http://www.eclipse.org/legal/epl-v10.html\r
- *\r
- * Contributors:\r
- * VTT Technical Research Centre of Finland - initial API and implementation\r
- *******************************************************************************/\r
+/*******************************************************************************
+ * 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;\r
-import java.util.regex.Pattern;\r
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
public static Range valueOf(String txt)
throws RangeException
- {\r
+ {
Matcher m = RANGE_PATTERN.matcher(txt);
if (!m.matches()) throw new RangeException("Illegal range '" + txt + "'");
Long l = Long.parseLong( m.group(3) );
l2 = m.group(4).equals("]") ? Limit.inclusive(l) : Limit.exclusive(l);
} catch (NumberFormatException nfe) {
- try {\r
+ try {
Double d = Double.parseDouble( m.group(3) );
l2 = m.group(4).equals("]") ? Limit.inclusive(d) : Limit.exclusive(d);
} catch (NumberFormatException e) {