hash = ((JavaObjectTerm) a1).object();
} else {
throw new IllegalDomainException(this, 1, "hash_or_alias", a1);
}
if (!(hash instanceof HashMapOfTerm)) {
throw new InternalException(this + ": Hash is not HashtableOfTerm");
}
a2 = a2.dereference();
Term elem = ((HashMapOfTerm) hash).get(a2);
if (elem == null) {
elem = SYM_NIL;
}
a3 = a3.dereference();
if (elem.isNil()) {
elem = new ListTerm(a3, elem);
} else {
Term x = elem;
Term y;
while (true) {
if (!x.isList()) {
throw new InternalException(this + ": the valus of " + a2
+ " is not list structure");
}
y = ((ListTerm) x).cdr().dereference();
if (y.isNil()) {
((ListTerm) x).setCdr(new ListTerm(a3, SYM_NIL));