public class Long_JPL extends Term
Long i = new Long( 1024 );A Long can be used (and re-used) in Compound Terms. Note that since the long type has a non-standard size in Prolog, it is impossible to use Java longs as values and maintain portability, so we just use int values, which covers the currently supported implementations. This class, therefore, currently provides no more functionality than the Integer class.
This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library Public License for more details.
| Modifier and Type | Field and Description |
|---|---|
protected int |
value_
This Long's value
|
| Constructor and Description |
|---|
Long_JPL(int value) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
computeSubstitution(Hashtable bindings,
Hashtable vars)
Nothing needs to be done if the Term is an Atom.
|
String |
debugString() |
boolean |
equals(Object obj)
Two Longs are equal if their values are equal
|
protected static Term |
from_term_t(Hashtable vars,
term_t term)
Converts a term_t to an Atom.
|
protected void |
put(Hashtable var_table,
term_t term)
To put an Long in a term, we put an integer.
|
String |
toString()
Converts a Long to its String form -- its value.
|
int |
value() |
computeSubstitutions, debugString, from_term_t, terms_equals, terms_to_term_ts, toStringpublic final int value()
protected final void put(Hashtable var_table, term_t term)
put in class Termvar_table - A Hashtable containing term_t's that are
bound to (have packed in) Prolog variables as elements. The
Elements are keyed by jpl.Variable instances. Cf. the put()
implementation in the Variable class.term - A (previously created) term_t which is to be
packed with a Prolog term-type appropriate to the Term type
(e.g., Atom, Variable, Compound, etc.) on which the method is
invoked.)protected static Term from_term_t(Hashtable vars, term_t term)
term - The term_t to convertprotected final void computeSubstitution(Hashtable bindings, Hashtable vars)
computeSubstitution in class Termtable - table holding Term substitutions, keyed on
Variables.public String toString()
public String debugString()
debugString in class TermCopyright © 2015. All rights reserved.