EAtom type = am_set;
EAtom access = am_protected;
int keypos = 1;
boolean write_concurrency = false;
boolean read_concurrency = false;
EInternalPID heir_pid = null;
EObject heir_data = null;
boolean is_named = false;
for (; !opts.isNil(); opts = opts.tail()) {
EObject option = opts.head();
EAtom atom;
ETuple2 t2;
ETuple3 t3;
if ((atom = option.testAtom()) != null) {
if (atom == am_bag || atom == am_duplicate_bag
|| atom == am_set || atom == am_ordered_set) {
type = atom;
continue;
} else if (atom == am_public || atom == am_private
|| atom == am_protected) {
access = atom;
continue;
} else if (atom == am_named_table) {
is_named = true;
continue;
}
} else if ((t2 = ETuple2.cast(option)) != null) {
ESmall pos;
if (t2.elem1 == am_heir && t2.elem2 == am_none) {
heir_data = null;
heir_pid = null;
continue;
} else if (t2.elem1 == am_keypos
&& ((pos = t2.elem2.testSmall()) != null)
&& pos.value >= 1) {
keypos = pos.value;
continue;
} else if (t2.elem1 == am_write_concurrency) {
write_concurrency = (t2.elem2 == ERT.TRUE);
continue;
} else if (t2.elem1 == am_read_concurrency) {
read_concurrency = (t2.elem2 == ERT.TRUE);
continue;
}
} else if ((t3 = ETuple3.cast(option)) != null) {
if (t3.elem1 == am_heir
&& ((heir_pid = t3.elem2.testInternalPID()) != null)) {
if (!heir_pid.is_alive()) {
heir_pid = null;
} else {
heir_data = t3.elem3;
}