1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 package io.github.prolobjectlink.prolog.jtrolog;
23
24 import static io.github.prolobjectlink.prolog.PrologTermType.ATOM_TYPE;
25
26 import io.github.prolobjectlink.prolog.PrologAtom;
27 import io.github.prolobjectlink.prolog.PrologProvider;
28 import io.github.prolobjectlink.prolog.PrologTerm;
29 import jTrolog.terms.StructAtom;
30
31
32
33
34
35
36 final class JTrologAtom extends JTrologTerm implements PrologAtom {
37
38 JTrologAtom(PrologProvider provider, String name) {
39 super(ATOM_TYPE, provider, new StructAtom(name));
40 }
41
42 public String getStringValue() {
43 return getFunctor();
44 }
45
46 public void setStringValue(String value) {
47 this.value = new StructAtom(value);
48 }
49
50 public PrologTerm[] getArguments() {
51 return new JTrologAtom[0];
52 }
53
54 public int getArity() {
55 return 0;
56 }
57
58 public String getFunctor() {
59 return "" + value + "";
60 }
61
62 }