/** * Adds a string entry to this lookup table. A special index will be * assigned to this entry which points to a alternative name defined by the * system. * * @param entry * Any string. * @param index * The entry index. */ public void add(QualifiedAttributeID entry, int index) { if (entry != null) { putEntry(entry, index); register(index); } }
/** * Removes the given entry from the lookup table. * This action is followed by the removal of the alternative name, if necessary. * * NOTE: USED IN TESTS ONLY */ public void remove(String entry) { removeEntry(entry); unregister(); }
private void removeEntry(String entry) { final String sourceEntry = getCanonicalForm(entry); var2NumMap.remove(sourceEntry); }
putAliasEntry(entry, index);
/** * Removes more than one entry from the lookup table. * This action is followed by the removal of the alternative name, if necessary. * * NOTE: USED IN TESTS ONLY */ public void remove(String[] entries) { for (int i = 0; i < entries.length; i++) { removeEntry(entries[i]); } unregister(); }
/** * Adds a collection of strings to this lookup table. All those strings will * point to a same alternative name defined by the system. * * @param entries * An array of strings. * @param index * The entries index, all entries share the same index number. */ public void add(QualifiedAttributeID[] entries, int index) { for (int i = 0; i < entries.length; i++) { if (entries[i] != null) { putEntry(entries[i], index); } } register(index); }