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

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


      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 byte
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 byte
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 a non-blank single character
View Full Code Here

        return engine.fail();
      }
    } else if (a2.isInteger()) {
      int n = ((IntegerTerm) a2).intValue();
      if (n < 0) {
        throw new IllegalDomainException(this, 2, "not_less_than_zero",
            a2);
      }
      if (length != n) {
        return engine.fail();
      }
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

      if (!a1.unify(new JavaObjectTerm(engine.getCurrentInput()),
          engine.trail)) {
        return engine.fail();
      }
    } else {
      throw new IllegalDomainException(this, 1, "stream", a1);
    }
    return cont;
  }
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, "");
    }
    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, "");
    }
    // print term
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");
    }
    ((HashMapOfTerm) hash).clear();
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.