Package org.eclipse.imp.pdb.facts

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


    }
    if (intResult != null) {
      return makeResult(tf.integerType(), vf.integer(intResult), ctx);
    }
    if (tupleA != null && tupleB != null) {
      return makeResult(intTuple, vf.tuple(vf.integer(tupleA), vf.integer(tupleB)), ctx);
    }
    throw new RuntimeException("A case not handled? " + name);
  }

  @Override
View Full Code Here


    }
    if (intResult != null) {
      return makeResult(tf.integerType(), vf.integer(intResult), ctx);
    }
    if (tupleA != null && tupleB != null) {
      return makeResult(intTuple, vf.tuple(vf.integer(tupleA), vf.integer(tupleB)), ctx);
    }
    throw new RuntimeException("A case not handled? " + name);
  }

  @Override
View Full Code Here

    if (stringResult != null) {
      return makeResult(tf.stringType(), vf.string(stringResult), ctx);
    }
    if (intResult != null) {
      return makeResult(tf.integerType(), vf.integer(intResult), ctx);
    }
    if (tupleA != null && tupleB != null) {
      return makeResult(intTuple, vf.tuple(vf.integer(tupleA), vf.integer(tupleB)), ctx);
    }
    throw new RuntimeException("A case not handled? " + name);
View Full Code Here

      String keySym = "" + (char)e.keyCode;
      return vf.constructor(KeySym_keyPrintable, vf.string(keySym));
    } else {
      Type cons = unPrintableKeyName(e);
      if(cons == KeySym_keyUnknown){
        return vf.constructor(KeySym_keyUnknown,vf.integer(e.keyCode));
      } else {
        return vf.constructor(cons);
      }
    }
   
View Full Code Here

      String keySym = "" + (char)e.keyCode;
      return vf.constructor(KeySym_keyPrintable, vf.string(keySym));
    } else {
      Type cons = unPrintableKeyName(e);
      if(cons == KeySym_keyUnknown){
        return vf.constructor(KeySym_keyUnknown,vf.integer(e.keyCode));
      } else {
        return vf.constructor(cons);
      }
    }
   
View Full Code Here

    try {

      if (name.equals("year")) {
        if (!dt.isTime()) {
          return makeResult(getTypeFactory().integerType(), vf.integer(dt.getYear()), ctx);
        }
        throw new UnsupportedOperation("Can not retrieve the year on a time value",ctx.getCurrentAST());
      } else if (name.equals("month")) {
        if (!dt.isTime()) {
          return makeResult(getTypeFactory().integerType(), vf.integer(getValue().getMonthOfYear()), ctx);
View Full Code Here

          return makeResult(getTypeFactory().integerType(), vf.integer(dt.getYear()), ctx);
        }
        throw new UnsupportedOperation("Can not retrieve the year on a time value",ctx.getCurrentAST());
      } else if (name.equals("month")) {
        if (!dt.isTime()) {
          return makeResult(getTypeFactory().integerType(), vf.integer(getValue().getMonthOfYear()), ctx);
        }
        throw new UnsupportedOperation("Can not retrieve the month on a time value",ctx.getCurrentAST());
      } else if (name.equals("day")) {
        if (!dt.isTime()) {
          return makeResult(getTypeFactory().integerType(), vf.integer(getValue().getDayOfMonth()), ctx);
View Full Code Here

          return makeResult(getTypeFactory().integerType(), vf.integer(getValue().getMonthOfYear()), ctx);
        }
        throw new UnsupportedOperation("Can not retrieve the month on a time value",ctx.getCurrentAST());
      } else if (name.equals("day")) {
        if (!dt.isTime()) {
          return makeResult(getTypeFactory().integerType(), vf.integer(getValue().getDayOfMonth()), ctx);
        }
        throw new UnsupportedOperation("Can not retrieve the day on a time value",ctx.getCurrentAST());
      } else if (name.equals("hour")) {
        if (!dt.isDate()) {
          return makeResult(getTypeFactory().integerType(), vf.integer(getValue().getHourOfDay()), ctx);
View Full Code Here

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

          return makeResult(getTypeFactory().integerType(), vf.integer(getValue().getHourOfDay()), ctx);
        }
        throw new UnsupportedOperation("Can not retrieve the hour on a date value",ctx.getCurrentAST());
      } else if (name.equals("minute")) {
        if (!dt.isDate()) {
          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);
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.