public class NamedList<T extends NamedObject> extends ArrayList<T>
modCount
Constructor and Description |
---|
NamedList() |
Modifier and Type | Method and Description |
---|---|
String |
findUniqueName(String prefix)
Pick a name (for a new object)
|
T |
getByName(String name) |
boolean |
isNameValid(int idx,
String name) |
boolean |
rename(int idx,
String name)
Change the name of one element.
|
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, forEach, get, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeIf, removeRange, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSize
equals, hashCode
containsAll, toString
finalize, getClass, notify, notifyAll, wait, wait, wait
containsAll, equals, hashCode
parallelStream, stream
public String findUniqueName(String prefix)
prefix
- public boolean rename(int idx, String name)
idx
- the position of the element to renamename
- the new namepublic boolean isNameValid(int idx, String name)
Copyright © 2005–2020. All rights reserved.