public final class Util
extends java.lang.Object
Copyright (C) 1998 Fred Dushin
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Constructor and Description |
---|
Util() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String[] |
atomListToStringArray(Term t)
Deprecated.
|
static Term |
intArrayArrayToList(int[][] a)
Deprecated.
|
static Term |
intArrayToList(int[] a)
Deprecated.
|
static boolean |
isList(Term term)
Deprecated.
|
static int |
listToLength(Term term)
Deprecated.
|
static Term[] |
listToTermArray(Term t)
Deprecated.
|
static java.util.Map<term_t,Variable> |
namevarsToMap(Term nvs)
Converts a (JPL) list of Name=Var pairs (as yielded by atom_to_term/3) to a Map from Prolog variables
(necessarily in term_t holders) to named JPL Variables
|
static Term |
stringArrayToList(java.lang.String[] a)
Deprecated.
|
static java.lang.String |
subsToString(java.util.Map<java.lang.String,Term> varnames_to_Terms)
Converts a substitution, in the form of a Map from variable names to Terms, to a String.
|
static Term |
termArrayToList(Term[] terms)
Deprecated.
|
static Term |
textParamsToTerm(java.lang.String text,
Term[] params)
Converts a Prolog source text to a corresponding JPL Term (in which each Variable has the appropriate name from
the source text), replacing successive occurrences of ? in the text by the corresponding element of Term[]
params.
|
static Term |
textToTerm(java.lang.String text)
Deprecated.
|
static java.lang.String |
toString(java.util.Map<java.lang.String,Term> varnames_to_Terms)
Deprecated.
|
@Deprecated public static Term termArrayToList(Term[] terms)
Term.termArrayToList(Term[] terms)
terms
- An array of Termpublic static java.lang.String subsToString(java.util.Map<java.lang.String,Term> varnames_to_Terms)
varnames_to_Terms
- A Map from variable names to Terms.@Deprecated public static java.lang.String toString(java.util.Map<java.lang.String,Term> varnames_to_Terms)
subsToString(Map)
public static java.util.Map<term_t,Variable> namevarsToMap(Term nvs)
nvs
- A JPL list of Name=Var pairs (as yielded by atom_to_term/3)@Deprecated public static Term textToTerm(java.lang.String text)
Term.textToTerm(String text)
public static Term textParamsToTerm(java.lang.String text, Term[] params)
text
- A Prolog source text denoting a termparams
- parameters to be injected in each ?@Deprecated public static Term stringArrayToList(java.lang.String[] a)
Term.stringArrayToList(String[] a)
@Deprecated public static Term intArrayToList(int[] a)
Term.intArrayToList(int[] a)
@Deprecated public static Term intArrayArrayToList(int[][] a)
Term.intArrayArrayToList(int[][] a)
@Deprecated public static final boolean isList(Term term)
Term.isList(Term)
term
- a term@Deprecated public static int listToLength(Term term)
Term.listLength(Term)
term
- any Term@Deprecated public static Term[] listToTermArray(Term t)
Term.listToTermArray(Term)
t
- a compound term that is a list@Deprecated public static java.lang.String[] atomListToStringArray(Term t)
Term.atomListToStringArray(Term)
t
- a compound term that is a list of atoms