Class Folder<T extends AbstractUnit>

  • All Implemented Interfaces:
    TreeUnit, Unit, java.io.Serializable, java.lang.Cloneable, java.lang.Iterable<T>, java.util.Collection<T>, java.util.List<T>, java.util.RandomAccess

    public class Folder<T extends AbstractUnit>
    extends java.util.concurrent.CopyOnWriteArrayList<T>
    implements TreeUnit, Unit
    A entry is a group of suborned definition.
    See Also:
    Serialized Form
    • Field Detail

      • childClass

        public final java.lang.Class childClass
      • checked

        protected boolean checked
      • decimalFormat000

        public static final java.text.DecimalFormat decimalFormat000
    • Constructor Detail

      • Folder

        public Folder​(java.lang.String childrenName,
                      AbstractUnit parent,
                      java.lang.Class childClass)
      • Folder

        public Folder​(java.lang.String childrenName,
                      AbstractUnit parent,
                      java.lang.Class childClass,
                      boolean ordered)
      • Folder

        public Folder​(java.lang.String name,
                      java.lang.String childrenName,
                      AbstractUnit parent,
                      java.lang.Class childClass)
      • Folder

        public Folder​(java.lang.String name,
                      java.lang.String childrenName,
                      AbstractUnit parent,
                      java.lang.Class childClass,
                      boolean ordered)
    • Method Detail

      • isStoringChildrenClass

        public boolean isStoringChildrenClass​(java.lang.Class cls)
      • getChildClass

        public java.lang.Class getChildClass()
      • getByName

        public T getByName​(java.lang.String name)
        Returns the child with the specified name. First return case sensitive, if no case sensitive found return case insensitive
        Specified by:
        getByName in interface TreeUnit
        Parameters:
        name - the name of the child to return
        Returns:
        the unit
      • getByKey

        public T getByKey​(java.lang.String key)
      • isNameOkFor

        public boolean isNameOkFor​(java.lang.String name,
                                   T unit)
      • moveUp

        public boolean moveUp​(int idx)
      • moveDown

        public boolean moveDown​(int idx)
      • moveUp

        public boolean moveUp​(T t)
      • moveDown

        public boolean moveDown​(T t)
      • moveUp

        public static boolean moveUp​(java.util.List list,
                                     int idx)
      • moveDown

        public static boolean moveDown​(java.util.List list,
                                       int idx)
      • isChecked

        public boolean isChecked()
      • exchangePosition

        public boolean exchangePosition​(Unit unit1,
                                        Unit unit2)
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.util.concurrent.CopyOnWriteArrayList<T extends AbstractUnit>
      • sameWith

        public boolean sameWith​(Folder<? extends AbstractUnit> folder,
                                boolean inclusionAdmitted)
      • proposeName

        public java.lang.String proposeName​(java.lang.String name)
      • add

        public boolean add​(T t)
        Specified by:
        add in interface java.util.Collection<T extends AbstractUnit>
        Specified by:
        add in interface java.util.List<T extends AbstractUnit>
        Overrides:
        add in class java.util.concurrent.CopyOnWriteArrayList<T extends AbstractUnit>
      • add

        public void add​(int idx,
                        T t)
        Specified by:
        add in interface java.util.List<T extends AbstractUnit>
        Overrides:
        add in class java.util.concurrent.CopyOnWriteArrayList<T extends AbstractUnit>
      • addAll

        public boolean addAll​(java.util.Collection<? extends T> es)
        Specified by:
        addAll in interface java.util.Collection<T extends AbstractUnit>
        Specified by:
        addAll in interface java.util.List<T extends AbstractUnit>
        Overrides:
        addAll in class java.util.concurrent.CopyOnWriteArrayList<T extends AbstractUnit>
      • remove

        public boolean remove​(java.lang.Object obj)
        Specified by:
        remove in interface java.util.Collection<T extends AbstractUnit>
        Specified by:
        remove in interface java.util.List<T extends AbstractUnit>
        Overrides:
        remove in class java.util.concurrent.CopyOnWriteArrayList<T extends AbstractUnit>
      • removeAll

        public boolean removeAll​(java.util.Collection<?> objects)
        Specified by:
        removeAll in interface java.util.Collection<T extends AbstractUnit>
        Specified by:
        removeAll in interface java.util.List<T extends AbstractUnit>
        Overrides:
        removeAll in class java.util.concurrent.CopyOnWriteArrayList<T extends AbstractUnit>
      • remove

        public T remove​(int i)
        Specified by:
        remove in interface java.util.List<T extends AbstractUnit>
        Overrides:
        remove in class java.util.concurrent.CopyOnWriteArrayList<T extends AbstractUnit>
      • clear

        public void clear()
        Specified by:
        clear in interface java.util.Collection<T extends AbstractUnit>
        Specified by:
        clear in interface java.util.List<T extends AbstractUnit>
        Overrides:
        clear in class java.util.concurrent.CopyOnWriteArrayList<T extends AbstractUnit>
      • getName

        public java.lang.String getName()
        Specified by:
        getName in interface TreeUnit
        Specified by:
        getName in interface Unit
      • equals

        public boolean equals​(java.lang.Object o)
        Specified by:
        equals in interface java.util.Collection<T extends AbstractUnit>
        Specified by:
        equals in interface java.util.List<T extends AbstractUnit>
        Overrides:
        equals in class java.util.concurrent.CopyOnWriteArrayList<T extends AbstractUnit>
      • hashCode

        public int hashCode()
        Specified by:
        hashCode in interface java.util.Collection<T extends AbstractUnit>
        Specified by:
        hashCode in interface java.util.List<T extends AbstractUnit>
        Overrides:
        hashCode in class java.util.concurrent.CopyOnWriteArrayList<T extends AbstractUnit>
      • getSymbolicName

        public java.lang.String getSymbolicName()
        Specified by:
        getSymbolicName in interface Unit
      • markForDeletion

        public void markForDeletion()
        Specified by:
        markForDeletion in interface Unit
      • setComment

        public void setComment​(java.lang.String comment)
        Specified by:
        setComment in interface Unit
      • getChildrenName

        public java.lang.String getChildrenName()
      • getComment

        public java.lang.String getComment()
        Specified by:
        getComment in interface Unit
      • refresh

        public void refresh()
      • rename

        public boolean rename​(java.lang.String name,
                              java.lang.String childrenName)
      • orderAlphabetically

        public void orderAlphabetically()
      • childrenNamesAreTheSame

        public boolean childrenNamesAreTheSame​(Folder<T> other)
      • setTouchId

        public void setTouchId​(int id)
        Specified by:
        setTouchId in interface TreeUnit