Package net.sourceforge.processdash.data

Examples of net.sourceforge.processdash.data.MalformedValueException


  public void setString(String s) throws MalformedValueException {
    try {
      value = new DoubleData(FormatUtil.parseNumber(s), true);
    } catch (Exception e) {
      throw new MalformedValueException();
    }
  }
View Full Code Here


      try {
        CompiledFunction f = new CompiledFunction
          (name, Compiler.compile(expression), this, prefix);
        putValue(name, f, IS_NOT_DEFAULT_VAL);
      } catch (CompilationException e) {
        throw new MalformedValueException();
      }
    }
View Full Code Here

    private static CompiledScript compileScript(String name)
            throws MalformedValueException {
        int flagPos = name.indexOf(PERCENTAGE_FLAG);
        if (flagPos <= 0)
            throw new MalformedValueException
                ("PercentageFunction: '" + name + "' does not contain '" +
                 PERCENTAGE_FLAG + "'.");

        String dataName = name.substring(flagPos + PERCENTAGE_FLAG.length());
        String childPrefix = name.substring(0, flagPos);
        String numeratorName = DataRepository.createDataName(childPrefix,
            dataName);

        int slashPos = childPrefix.lastIndexOf('/');
        if (slashPos == -1)
            throw new MalformedValueException
                ("PercentageFunction: '" + name + "' does not have a parent.");

        String parentPrefix = name.substring(0, slashPos);
        String denominatorName = DataRepository.createDataName(parentPrefix,
            dataName);
View Full Code Here

            this.script = Compiler.compile(script);
            this.data = r;
            this.name = name;
            this.prefix = prefix;
        } catch (Exception ce) {
            throw new MalformedValueException();
        }
    }
View Full Code Here

                try {
                    Number d = NUMBER_FORMAT.parse(value);
                    if (d != null)
                        result = new DoubleData(d.doubleValue(), false);
                } catch (ParseException e) {
                    throw new MalformedValueException();
                }
            }
            return result;
        }
View Full Code Here

  public void setString(String s) throws MalformedValueException {
    try {
      Number n = FMT.parse(s);
      value = new DoubleData(n.doubleValue());
    } catch (Exception pe) {
      throw new MalformedValueException();
    }
  }
View Full Code Here

 
  public void setString(String s) throws MalformedValueException {
    try {
      value = new DoubleData(FormatUtil.parsePercent(s.trim()), true);
    } catch (Exception e) {
      throw new MalformedValueException();
    }
  }
View Full Code Here

TOP

Related Classes of net.sourceforge.processdash.data.MalformedValueException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.