/** * Constructs a new instance that is a copy of the old instance. * * @param old instance to copy */ public LabeledList(LabeledList old) { super(old.size()); labelToIndex = old.labelToIndex.mutableCopy(); int sz = old.size(); for (int i = 0; i < sz; i++) { Object one = old.get0(i); if (one != null) { set0(i, one); } } }
/** * Constructs a new instance that is a copy of the old instance. * * @param old instance to copy */ protected LabeledList(LabeledList old) { super(old.size()); labelToIndex = old.labelToIndex.mutableCopy(); int sz = old.size(); for (int i = 0; i < sz; i++) { Object one = old.get0(i); if (one != null) { set0(i, one); } } }
/** * Constructs a new instance that is a copy of the old instance. * * @param old instance to copy */ public LabeledList(LabeledList old) { super(old.size()); labelToIndex = old.labelToIndex.mutableCopy(); int sz = old.size(); for (int i = 0; i < sz; i++) { Object one = old.get0(i); if (one != null) { set0(i, one); } } }
/** * Constructs a new instance that is a copy of the old instance. * * @param old instance to copy */ public LabeledList(LabeledList old) { super(old.size()); labelToIndex = old.labelToIndex.mutableCopy(); int sz = old.size(); for (int i = 0; i < sz; i++) { Object one = old.get0(i); if (one != null) { set0(i, one); } } }
/** * Constructs a new instance that is a copy of the old instance. * * @param old instance to copy */ public LabeledList(LabeledList old) { super(old.size()); labelToIndex = old.labelToIndex.mutableCopy(); int sz = old.size(); for (int i = 0; i < sz; i++) { Object one = old.get0(i); if (one != null) { set0(i, one); } } }
/** * Constructs a new instance that is a copy of the old instance. * * @param old instance to copy */ public LabeledList(LabeledList old) { super(old.size()); labelToIndex = old.labelToIndex.mutableCopy(); int sz = old.size(); for (int i = 0; i < sz; i++) { Object one = old.get0(i); if (one != null) { set0(i, one); } } }
/** * Constructs a new instance that is a copy of the old instance. * * @param old instance to copy */ public LabeledList(LabeledList old) { super(old.size()); labelToIndex = old.labelToIndex.mutableCopy(); int sz = old.size(); for (int i = 0; i < sz; i++) { Object one = old.get0(i); if (one != null) { set0(i, one); } } }
/** * Constructs a new instance that is a copy of the old instance. * * @param old instance to copy */ public LabeledList(LabeledList old) { super(old.size()); labelToIndex = old.labelToIndex.mutableCopy(); int sz = old.size(); for (int i = 0; i < sz; i++) { Object one = old.get0(i); if (one != null) { set0(i, one); } } }
/** * Sets the element at the given index. * * @param n {@code >= 0, < size();} which element * @param item {@code null-ok;} the value to store */ protected void set(int n, LabeledItem item) { LabeledItem old = (LabeledItem) getOrNull0(n); set0(n, item); if (old != null) { removeLabel(old.getLabel()); } if (item != null) { addLabelIndex(item.getLabel(), n); } } }
/** * Sets the element at the given index. * * @param n {@code >= 0, < size();} which element * @param item {@code null-ok;} the value to store */ protected void set(int n, LabeledItem item) { LabeledItem old = (LabeledItem) getOrNull0(n); set0(n, item); if (old != null) { removeLabel(old.getLabel()); } if (item != null) { addLabelIndex(item.getLabel(), n); } } }
/** * Sets the element at the given index. * * @param n {@code >= 0, < size();} which element * @param item {@code null-ok;} the value to store */ protected void set(int n, LabeledItem item) { LabeledItem old = (LabeledItem) getOrNull0(n); set0(n, item); if (old != null) { removeLabel(old.getLabel()); } if (item != null) { addLabelIndex(item.getLabel(), n); } } }
/** * Sets the element at the given index. * * @param n {@code >= 0, < size();} which element * @param item {@code null-ok;} the value to store */ protected void set(int n, LabeledItem item) { LabeledItem old = (LabeledItem) getOrNull0(n); set0(n, item); if (old != null) { removeLabel(old.getLabel()); } if (item != null) { addLabelIndex(item.getLabel(), n); } } }
/** * Sets the element at the given index. * * @param n {@code >= 0, < size();} which element * @param item {@code null-ok;} the value to store */ protected void set(int n, LabeledItem item) { LabeledItem old = (LabeledItem) getOrNull0(n); set0(n, item); if (old != null) { removeLabel(old.getLabel()); } if (item != null) { addLabelIndex(item.getLabel(), n); } } }
/** * Sets the element at the given index. * * @param n {@code >= 0, < size();} which element * @param item {@code null-ok;} the value to store */ protected void set(int n, LabeledItem item) { LabeledItem old = (LabeledItem) getOrNull0(n); set0(n, item); if (old != null) { removeLabel(old.getLabel()); } if (item != null) { addLabelIndex(item.getLabel(), n); } } }
/** * Sets the element at the given index. * * @param n {@code >= 0, < size();} which element * @param item {@code null-ok;} the value to store */ protected void set(int n, LabeledItem item) { LabeledItem old = (LabeledItem) getOrNull0(n); set0(n, item); if (old != null) { removeLabel(old.getLabel()); } if (item != null) { addLabelIndex(item.getLabel(), n); } } }
/** * Sets the element at the given index. * * @param n {@code >= 0, < size();} which element * @param item {@code null-ok;} the value to store */ protected void set(int n, LabeledItem item) { LabeledItem old = (LabeledItem) getOrNull0(n); set0(n, item); if (old != null) { removeLabel(old.getLabel()); } if (item != null) { addLabelIndex(item.getLabel(), n); } } }