|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjpl.Term
jpl.Compound
jpl.Atom
public class Atom
Atom is a specialised Compound with zero arguments, representing a Prolog atom with the same name. An Atom is constructed with a String parameter (its name, unquoted), which cannot thereafter be changed.
Atom a = new Atom("hello");An Atom can be used (and re-used) as an argument of Compound Terms. Two Atom instances are equal (by equals()) iff they have equal names.
Copyright (C) 1998 Fred Dushin
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.
Term
,
Compound
Constructor Summary | |
---|---|
Atom(java.lang.String name)
|
Method Summary | |
---|---|
java.lang.String |
debugString()
Deprecated. |
int |
type()
returns the type of this term, as jpl.fli.Prolog.COMPOUND |
java.lang.String |
typeName()
returns the name of the type of this term, as "Atom" |
Methods inherited from class jpl.Compound |
---|
arg, arg0, args, arity, equals, hasFunctor, isJFalse, isJNull, isJObject, isJRef, isJTrue, isJVoid, name, setArg, toString |
Methods inherited from class jpl.Term |
---|
debugString, doubleValue, floatValue, hasFunctor, hasFunctor, intValue, isAtom, isCompound, isFloat, isInteger, isVariable, listLength, longValue, put, putParams, putParams, putTerm, toString, toTermArray |
Methods inherited from class java.lang.Object |
---|
getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Atom(java.lang.String name)
name
- the Atom's name (unquoted)Method Detail |
---|
public final int type()
Compound
type
in class Compound
public java.lang.String typeName()
typeName
in class Compound
public java.lang.String debugString()
debugString
in class Compound
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |