jpl

Class Atom

public class Atom extends Compound

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) 2004 Paul Singleton

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.


See Also: Term Compound

Constructor Summary
Atom(String name)
Method Summary
StringdebugString()
Returns a debug-friendly String representation of an Atom.
inttype()
StringtypeName()
returns the name of the type of this term, as "Atom"

Constructor Detail

Atom

public Atom(String name)

Parameters: name the Atom's name (unquoted)

Method Detail

debugString

public String debugString()

Deprecated:

Returns a debug-friendly String representation of an Atom.

Returns: a debug-friendly String representation of an Atom

type

public final int type()

typeName

public String typeName()
returns the name of the type of this term, as "Atom"

Returns: the name of the type of this term, as "Atom"