Package jp.ac.kobe_u.cs.prolog.lang

Examples of jp.ac.kobe_u.cs.prolog.lang.IllegalDomainException


      if (!a3.isInteger()) {
        throw new IllegalTypeException(this, 3, "integer", a3);
      }
      int n = ((IntegerTerm) a3).intValue();
      if (n < 0) {
        throw new IllegalDomainException(this, 3, "not_less_than_zero",
            a3);
      }
      if (n == 0) {
        if (!a1.unify(a2, engine.trail)) {
          return engine.fail();
View Full Code Here


      stream = ((JavaObjectTerm) engine.getStreamManager().get(a1))
          .object();
    } else if (a1.isJavaObject()) {
      stream = ((JavaObjectTerm) a1).object();
    } else {
      throw new IllegalDomainException(this, 1, "stream_or_alias", a1);
    }
    if (!(stream instanceof PushbackReader)) {
      throw new PermissionException(this, "input", "stream", a1, "");
    }
    // read single character
View Full Code Here

      stream = ((JavaObjectTerm) engine.getStreamManager().get(a1))
          .object();
    } else if (a1.isJavaObject()) {
      stream = ((JavaObjectTerm) a1).object();
    } else {
      throw new IllegalDomainException(this, 1, "stream_or_alias", a1);
    }
    if (!(stream instanceof PushbackReader)) {
      throw new PermissionException(this, "input", "stream", a1, "");
    }
    // read single character
View Full Code Here

      }
      hash = ((JavaObjectTerm) engine.getHashManager().get(a1)).object();
    } else if (a1.isJavaObject()) {
      hash = ((JavaObjectTerm) a1).object();
    } else {
      throw new IllegalDomainException(this, 1, "hash_or_alias", a1);
    }
    if (!(hash instanceof HashMapOfTerm)) {
      throw new InternalException(this + ": Hash is not HashtableOfTerm");
    }
    a2 = a2.dereference();
View Full Code Here

      stream = ((JavaObjectTerm) engine.getStreamManager().get(a1))
          .object();
    } else if (a1.isJavaObject()) {
      stream = ((JavaObjectTerm) a1).object();
    } else {
      throw new IllegalDomainException(this, 1, "stream_or_alias", a1);
    }
    if (!(stream instanceof PrintWriter)) {
      throw new PermissionException(this, "output", "stream", a1, "");
    }
    ((PrintWriter) stream).flush();
View Full Code Here

      }
      hash = ((JavaObjectTerm) engine.getHashManager().get(a1)).object();
    } else if (a1.isJavaObject()) {
      hash = ((JavaObjectTerm) a1).object();
    } else {
      throw new IllegalDomainException(this, 1, "hash_or_alias", a1);
    }
    if (!(hash instanceof HashMapOfTerm)) {
      throw new InternalException(this + ": Hash is not HashtableOfTerm");
    }
    a2 = a2.dereference();
View Full Code Here

      }
      hash = ((JavaObjectTerm) engine.getHashManager().get(a1)).object();
    } else if (a1.isJavaObject()) {
      hash = ((JavaObjectTerm) a1).object();
    } else {
      throw new IllegalDomainException(this, 1, "hash_or_alias", a1);
    }
    if (!(hash instanceof HashMapOfTerm)) {
      throw new InternalException(this + ": Hash is not HashtableOfTerm");
    }
    a2 = a2.dereference();
View Full Code Here

      }
      hash = ((JavaObjectTerm) engine.getHashManager().get(a1)).object();
    } else if (a1.isJavaObject()) {
      hash = ((JavaObjectTerm) a1).object();
    } else {
      throw new IllegalDomainException(this, 1, "hash_or_alias", a1);
    }
    if (!(hash instanceof HashMapOfTerm)) {
      throw new InternalException(this + ": Hash is not HashtableOfTerm");
    }
    a2 = a2.dereference();
View Full Code Here

      }
      hash = ((JavaObjectTerm) engine.getHashManager().get(a1)).object();
    } else if (a1.isJavaObject()) {
      hash = ((JavaObjectTerm) a1).object();
    } else {
      throw new IllegalDomainException(this, 1, "hash_or_alias", a1);
    }
    if (!(hash instanceof HashMapOfTerm)) {
      throw new InternalException(this + ": Hash is not HashtableOfTerm");
    }
    if (!((HashMapOfTerm) hash).isEmpty()) {
View Full Code Here

      if (!a1.unify(new JavaObjectTerm(engine.getCurrentOutput()),
          engine.trail)) {
        return engine.fail();
      }
    } else {
      throw new IllegalDomainException(this, 1, "stream", a1);
    }
    return cont;
  }
View Full Code Here

TOP

Related Classes of jp.ac.kobe_u.cs.prolog.lang.IllegalDomainException

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.