Package org.eclipse.imp.pdb.facts

Examples of org.eclipse.imp.pdb.facts.IValueFactory.integer()


          return makeResult(getTypeFactory().integerType(), vf.integer(getValue().getMinuteOfHour()), ctx);
        }
        throw new UnsupportedOperation("Can not retrieve the minute on a date value",ctx.getCurrentAST());
      } else if (name.equals("second")) {
        if (!dt.isDate()) {
          return makeResult(getTypeFactory().integerType(), vf.integer(getValue().getSecondOfMinute()), ctx);
        }
        throw new UnsupportedOperation("Can not retrieve the second on a date value",ctx.getCurrentAST());
      } else if (name.equals("millisecond")) {
        if (!dt.isDate()) {
          return makeResult(getTypeFactory().integerType(), vf.integer(getValue().getMillisecondsOfSecond()), ctx);
View Full Code Here


          return makeResult(getTypeFactory().integerType(), vf.integer(getValue().getSecondOfMinute()), ctx);
        }
        throw new UnsupportedOperation("Can not retrieve the second on a date value",ctx.getCurrentAST());
      } else if (name.equals("millisecond")) {
        if (!dt.isDate()) {
          return makeResult(getTypeFactory().integerType(), vf.integer(getValue().getMillisecondsOfSecond()), ctx);
        }
        throw new UnsupportedOperation("Can not retrieve the millisecond on a date value",ctx.getCurrentAST());
      } else if (name.equals("timezoneOffsetHours")) {
        if (!dt.isDate()) {
          return makeResult(getTypeFactory().integerType(), vf.integer(getValue().getTimezoneOffsetHours()), ctx);
View Full Code Here

          return makeResult(getTypeFactory().integerType(), vf.integer(getValue().getMillisecondsOfSecond()), ctx);
        }
        throw new UnsupportedOperation("Can not retrieve the millisecond on a date value",ctx.getCurrentAST());
      } else if (name.equals("timezoneOffsetHours")) {
        if (!dt.isDate()) {
          return makeResult(getTypeFactory().integerType(), vf.integer(getValue().getTimezoneOffsetHours()), ctx);
        }
        throw new UnsupportedOperation("Can not retrieve the timezone offset hours on a date value",ctx.getCurrentAST());
      } else if (name.equals("timezoneOffsetMinutes")) {
        if (!dt.isDate()) {
          return makeResult(getTypeFactory().integerType(), vf.integer(getValue().getTimezoneOffsetMinutes()), ctx);
View Full Code Here

          return makeResult(getTypeFactory().integerType(), vf.integer(getValue().getTimezoneOffsetHours()), ctx);
        }
        throw new UnsupportedOperation("Can not retrieve the timezone offset hours on a date value",ctx.getCurrentAST());
      } else if (name.equals("timezoneOffsetMinutes")) {
        if (!dt.isDate()) {
          return makeResult(getTypeFactory().integerType(), vf.integer(getValue().getTimezoneOffsetMinutes()), ctx);
        }
        throw new UnsupportedOperation("Can not retrieve the timezone offset minutes on a date value",ctx.getCurrentAST());
      } else if (name.equals("century")) {
        if (!dt.isTime()) {
          return makeResult(getTypeFactory().integerType(), vf.integer(getValue().getCentury()), ctx);
View Full Code Here

          return makeResult(getTypeFactory().integerType(), vf.integer(getValue().getTimezoneOffsetMinutes()), ctx);
        }
        throw new UnsupportedOperation("Can not retrieve the timezone offset minutes on a date value",ctx.getCurrentAST());
      } else if (name.equals("century")) {
        if (!dt.isTime()) {
          return makeResult(getTypeFactory().integerType(), vf.integer(getValue().getCentury()), ctx);
        }
        throw new UnsupportedOperation("Can not retrieve the century on a time value",ctx.getCurrentAST());
      } else if (name.equals("isDate")) {
        return makeResult(getTypeFactory().boolType(), vf.bool(getValue().isDate()), ctx);
      } else if (name.equals("isTime")) {
View Full Code Here

    TypeFactory TF = TypeFactory.getInstance();
    Type elemType = TF.tupleType(TF.sourceLocationType(), TF.integerType());
    IValueFactory VF = ValueFactoryFactory.getValueFactory();
    IListWriter w = VF.listWriter(elemType);
    for(Map.Entry<ISourceLocation, Count> e : sortData()){
      w.insert(VF.tuple(e.getKey(), VF.integer(e.getValue().getTicks())));
    }
    return w.done();
  }
 
  public void report() {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.