Class AbstractNamedObjects<E extends NamedObject>

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Iterable<E>, NamedObjects<E>
    Direct Known Subclasses:
    AbstractAnimationObjects, AbstractFaceObjects

    public abstract class AbstractNamedObjects<E extends NamedObject>
    extends java.lang.Object
    implements NamedObjects<E>
    This class manages NamedObjects, managing their tree as well as providing a method for showing a dialog for browsing their tree and selecting one from it. NamedObjects are iterated in Unicode (=ASCII) order.
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected AbstractNamedObjects​(java.lang.String name)
      Creates a new instance.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean containsKey​(@NotNull java.lang.String name)
      Check whether an object is defined.
      E get​(@NotNull java.lang.String objectName)
      Gets a AbstractNamedObject.
      @NotNull java.lang.String getName()
      Returns the tree name.
      @NotNull NamedTreeNode<E> getTreeRoot()
      Get the object tree root.
      java.util.Iterator<E> iterator()
      NamedObjects are iterated in Unicode (=case sensitive ASCII) order.
      protected void put​(E object)
      Stores an AbstractNamedObject.
      int size()
      Get the number of objects.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.lang.Iterable

        forEach, spliterator
    • Constructor Detail

      • AbstractNamedObjects

        protected AbstractNamedObjects​(java.lang.String name)
        Creates a new instance.
        Parameters:
        name - the localized name of the object type, e.g. used in dialogs
    • Method Detail

      • getName

        @NotNull
        public @NotNull java.lang.String getName()
        Description copied from interface: NamedObjects
        Returns the tree name.
        Specified by:
        getName in interface NamedObjects<E extends NamedObject>
        Returns:
        the tree name
      • get

        @Nullable
        public E get​(@NotNull
                     @NotNull java.lang.String objectName)
        Description copied from interface: NamedObjects
        Gets a AbstractNamedObject.
        Specified by:
        get in interface NamedObjects<E extends NamedObject>
        Parameters:
        objectName - name of object
        Returns:
        named object for name objectName or null if none found
      • containsKey

        public boolean containsKey​(@NotNull
                                   @NotNull java.lang.String name)
        Description copied from interface: NamedObjects
        Check whether an object is defined.
        Specified by:
        containsKey in interface NamedObjects<E extends NamedObject>
        Parameters:
        name - object name to look for
        Returns:
        true if an object with that name is defined, otherwise false
      • iterator

        public java.util.Iterator<E> iterator()
        Description copied from interface: NamedObjects
        NamedObjects are iterated in Unicode (=case sensitive ASCII) order.
        Specified by:
        iterator in interface java.lang.Iterable<E extends NamedObject>
        Specified by:
        iterator in interface NamedObjects<E extends NamedObject>