public class SchemeUtils
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.Object |
NO_RESULT |
Constructor and Description |
---|
SchemeUtils() |
Modifier and Type | Method and Description |
---|---|
static gnu.lists.Pair |
acons(java.lang.String key,
java.lang.Object value) |
static java.lang.Object |
alistGet(java.lang.Object key,
gnu.lists.LList alist,
java.lang.Object defaultValue) |
static java.util.List<java.lang.String> |
anySchemeValueListToStringList(java.util.List p) |
static java.lang.String |
anyToString(java.lang.Object schemeVal) |
static java.lang.String |
bytesToString(byte[] bs) |
static java.lang.String |
className(java.lang.Object object) |
static <P,T> java.util.List<T> |
convertList(java.util.List<P> list,
java.util.function.Function<P,T> f) |
static <T> java.util.List<T> |
convList(gnu.lists.Pair p,
java.util.function.Function<java.lang.Object,T> conv)
Deprecated.
|
static void |
defineLambda(gnu.mapping.Environment env,
gnu.mapping.Procedure value) |
static void |
defineVar(gnu.mapping.Environment env,
java.lang.Object value,
java.util.Collection<java.lang.String> names) |
static void |
defineVar(gnu.mapping.Environment env,
java.lang.Object value,
java.lang.String... names) |
static void |
defineVar(gnu.mapping.Environment env,
gnu.mapping.Procedure value,
java.lang.String... names) |
static <T> T |
errorIfNull(T object) |
static java.lang.Object |
eval(gnu.mapping.Environment env,
gnu.lists.LList llist) |
static java.lang.Object |
eval(gnu.mapping.Environment env,
java.lang.String scriptString) |
static java.lang.Object |
eval(gnu.lists.LList llist) |
static java.lang.Object |
eval(java.lang.String scriptString) |
static java.lang.String |
fromSymbol(java.lang.Object schemeVal) |
static java.util.List<java.lang.String> |
getAllKey(kawa.standard.Scheme scheme) |
static java.util.List<java.lang.String> |
getAllKey(SchemeEvaluator evaluator) |
static java.lang.Object |
getVar(gnu.mapping.Environment env,
java.lang.String name) |
static <T> T |
getVar(java.lang.String name,
java.lang.Object defaultValue) |
static boolean |
isDefined(gnu.mapping.Environment env,
java.lang.String name) |
static boolean |
isQuantity(java.lang.Object schemeVal) |
static java.lang.Object |
javaNullCheck(java.lang.Object object) |
static java.util.List<gnu.lists.IString> |
javaStringListToSchemeStringList(java.util.List<java.lang.String> stringList) |
static java.util.List<gnu.mapping.Symbol> |
javaStringListToSchemeSymbolList(java.util.List<java.lang.String> stringList) |
static java.util.Map<java.lang.String,java.lang.Object> |
list2map(gnu.lists.AbstractSequence<java.lang.Object> list,
java.util.function.Function<java.lang.Object,java.util.function.Function<java.lang.Integer,java.lang.String>> idx2nameGenerator) |
static java.util.Map<gnu.mapping.Symbol,java.lang.Object> |
list2map2(gnu.lists.LList list) |
static gnu.lists.LList |
ls(java.lang.Object... vals) |
static void |
main(java.lang.String[] args) |
static void |
main2(java.lang.String[] args) |
static void |
putVar(gnu.mapping.Environment env,
java.lang.String name,
java.lang.Object value) |
static byte[] |
readAll(java.io.InputStream in) |
static <T> T |
schemeNullCheck(T object) |
static java.util.List<java.lang.String> |
schemeStringListToJavaStringList(java.util.List p) |
static java.lang.String |
schemeStringToJavaString(java.lang.Object arg1) |
static gnu.mapping.Symbol |
schemeSymbol(java.lang.String string) |
static java.lang.String |
schemeSymbolToJavaString(java.lang.Object schemeVal) |
static gnu.mapping.Symbol[] |
stringListToSymbolList(java.util.List<java.lang.String> stringSymbols) |
static gnu.mapping.Symbol[] |
stringListToSymbolList(java.lang.String... stringSymbols) |
static java.util.List<java.lang.String> |
symbolListToStringList(java.util.List p) |
static gnu.lists.Pair |
symbols(java.lang.String... args) |
static java.lang.String[] |
symbolsToStrings(gnu.mapping.Symbol... symbols) |
static void |
testEval2() |
static java.lang.Boolean |
toBoolean(java.lang.Object schemeVal)
Treat everything as Java's //true// except
Scheme's //#f// and Java's //null//.
|
static double |
toDouble(java.lang.Object schemeVal) |
static float |
toFloat(java.lang.Object schemeVal) |
static int |
toInteger(java.lang.Object schemeVal) |
static long |
toLong(java.lang.Object schemeVal) |
static gnu.math.DFloNum |
toSchemeNumber(double value) |
static gnu.math.IntNum |
toSchemeNumber(int value) |
static gnu.lists.IString |
toSchemeString(java.lang.String value) |
static gnu.mapping.Symbol |
toSchemeSymbol(java.lang.String value) |
static java.lang.String |
toString(java.lang.Object value) |
public static java.util.Map<java.lang.String,java.lang.Object> list2map(gnu.lists.AbstractSequence<java.lang.Object> list, java.util.function.Function<java.lang.Object,java.util.function.Function<java.lang.Integer,java.lang.String>> idx2nameGenerator)
public static java.util.Map<gnu.mapping.Symbol,java.lang.Object> list2map2(gnu.lists.LList list)
public static gnu.lists.LList ls(java.lang.Object... vals)
public static java.lang.Object eval(gnu.lists.LList llist)
public static java.lang.Object eval(gnu.mapping.Environment env, gnu.lists.LList llist)
public static java.lang.Object eval(java.lang.String scriptString)
public static java.lang.Object eval(gnu.mapping.Environment env, java.lang.String scriptString)
public static void testEval2()
public static gnu.lists.Pair symbols(java.lang.String... args)
public static java.util.List<gnu.mapping.Symbol> javaStringListToSchemeSymbolList(java.util.List<java.lang.String> stringList)
public static java.util.List<gnu.lists.IString> javaStringListToSchemeStringList(java.util.List<java.lang.String> stringList)
public static gnu.mapping.Symbol schemeSymbol(java.lang.String string)
public static java.lang.String schemeStringToJavaString(java.lang.Object arg1)
public static java.lang.String anyToString(java.lang.Object schemeVal)
public static java.lang.Boolean toBoolean(java.lang.Object schemeVal)
public static java.lang.String toString(java.lang.Object value)
public static java.lang.String schemeSymbolToJavaString(java.lang.Object schemeVal)
public static boolean isQuantity(java.lang.Object schemeVal)
public static java.lang.String fromSymbol(java.lang.Object schemeVal)
public static double toDouble(java.lang.Object schemeVal)
public static float toFloat(java.lang.Object schemeVal)
public static int toInteger(java.lang.Object schemeVal)
public static long toLong(java.lang.Object schemeVal)
public static java.lang.String className(java.lang.Object object)
@Deprecated public static <T> java.util.List<T> convList(gnu.lists.Pair p, java.util.function.Function<java.lang.Object,T> conv)
public static <P,T> java.util.List<T> convertList(java.util.List<P> list, java.util.function.Function<P,T> f)
public static java.util.List<java.lang.String> symbolListToStringList(java.util.List p)
public static java.util.List<java.lang.String> schemeStringListToJavaStringList(java.util.List p)
public static java.util.List<java.lang.String> anySchemeValueListToStringList(java.util.List p)
public static gnu.mapping.Symbol[] stringListToSymbolList(java.util.List<java.lang.String> stringSymbols)
public static gnu.mapping.Symbol[] stringListToSymbolList(java.lang.String... stringSymbols)
public static gnu.lists.IString toSchemeString(java.lang.String value)
public static gnu.math.DFloNum toSchemeNumber(double value)
public static gnu.math.IntNum toSchemeNumber(int value)
public static gnu.mapping.Symbol toSchemeSymbol(java.lang.String value)
public static <T> T errorIfNull(T object)
public static <T> T schemeNullCheck(T object)
public static java.lang.Object javaNullCheck(java.lang.Object object)
public static gnu.lists.Pair acons(java.lang.String key, java.lang.Object value)
public static final void defineVar(gnu.mapping.Environment env, java.lang.Object value, java.util.Collection<java.lang.String> names)
public static final void defineVar(gnu.mapping.Environment env, java.lang.Object value, java.lang.String... names)
public static final void defineVar(gnu.mapping.Environment env, gnu.mapping.Procedure value, java.lang.String... names)
public static final void defineLambda(gnu.mapping.Environment env, gnu.mapping.Procedure value)
public static final boolean isDefined(gnu.mapping.Environment env, java.lang.String name)
public static final void putVar(gnu.mapping.Environment env, java.lang.String name, java.lang.Object value)
public static final java.lang.Object getVar(gnu.mapping.Environment env, java.lang.String name)
public static final <T> T getVar(java.lang.String name, java.lang.Object defaultValue)
public static void main2(java.lang.String[] args)
public static byte[] readAll(java.io.InputStream in) throws java.io.IOException
java.io.IOException
public static java.util.List<java.lang.String> getAllKey(kawa.standard.Scheme scheme)
public static final java.lang.String bytesToString(byte[] bs)
public static java.util.List<java.lang.String> getAllKey(SchemeEvaluator evaluator)
public static java.lang.Object alistGet(java.lang.Object key, gnu.lists.LList alist, java.lang.Object defaultValue)
public static void main(java.lang.String[] args) throws java.lang.Throwable
java.lang.Throwable
public static java.lang.String[] symbolsToStrings(gnu.mapping.Symbol... symbols)