public abstract class AbstractJavaConverter extends Object implements PrologJavaConverter
PrologJavaConverter
interface.Modifier | Constructor and Description |
---|---|
protected |
AbstractJavaConverter(PrologProvider provider) |
Modifier and Type | Method and Description |
---|---|
boolean |
containQuotes(String functor)
Check if the current functor have quotes at the start and end of the given
functor.
|
boolean |
equals(Object obj) |
int |
hashCode() |
String |
removeQuotes(String functor)
Remove functor quotes if they are present.
|
Object |
toObject(PrologTerm prologTerm)
Create a Java object from given Prolog term.
|
List<Object> |
toObjectList(PrologTerm[] terms)
Create a Java objects list from given Prolog term array.
|
List<List<Object>> |
toObjectLists(PrologTerm[][] terms)
Create an equivalent list of objects lists using the given Prolog terms
matrix.
|
Map<String,Object> |
toObjectMap(Map<String,PrologTerm> map)
Create an equivalent Java object map using the given Prolog terms map.
|
List<Map<String,Object>> |
toObjectMaps(Map<String,PrologTerm>[] maps)
Create an equivalent Java object map list using the given Prolog terms map
array.
|
Object[] |
toObjectsArray(PrologTerm[] terms)
Create a Java objects array from given Prolog term array.
|
PrologTerm |
toTerm(Object object)
Create an equivalent Prolog term using the given Java object.
|
PrologTerm[] |
toTermsArray(Object[] objects)
Create an equivalent Prolog terms array using the given Java objects array.
|
protected AbstractJavaConverter(PrologProvider provider)
public final boolean containQuotes(String functor)
PrologJavaConverter
containQuotes
in interface PrologJavaConverter
functor
- string functor to be checkedpublic final String removeQuotes(String functor)
PrologJavaConverter
removeQuotes
in interface PrologJavaConverter
functor
- string functor to remove quotes if they are present.public final Object toObject(PrologTerm prologTerm)
PrologJavaConverter
toObject
in interface PrologJavaConverter
prologTerm
- Prolog term to be converted to Java object.public final Object[] toObjectsArray(PrologTerm[] terms)
PrologJavaConverter
toObjectsArray
in interface PrologJavaConverter
terms
- Prolog term array to be converted to Java objects array.public final PrologTerm toTerm(Object object)
PrologJavaConverter
toTerm
in interface PrologJavaConverter
object
- Java object to be convertedpublic final PrologTerm[] toTermsArray(Object[] objects)
PrologJavaConverter
toTermsArray
in interface PrologJavaConverter
objects
- Java objects array representation to be convertedpublic final List<Map<String,Object>> toObjectMaps(Map<String,PrologTerm>[] maps)
PrologJavaConverter
toObjectMaps
in interface PrologJavaConverter
maps
- Prolog terms map list to be converted in Java objects map list.public final Map<String,Object> toObjectMap(Map<String,PrologTerm> map)
PrologJavaConverter
toObjectMap
in interface PrologJavaConverter
map
- Prolog terms map representation to be convertedpublic final List<Object> toObjectList(PrologTerm[] terms)
PrologJavaConverter
toObjectList
in interface PrologJavaConverter
terms
- Prolog term array to be converted to Java objects array.public final List<List<Object>> toObjectLists(PrologTerm[][] terms)
PrologJavaConverter
toObjectLists
in interface PrologJavaConverter
terms
- Prolog terms matrix to be convertedCopyright © 2020–2024 Prolobjectlink Project. All rights reserved.