Class DirectoryEntryList

    • Constructor Detail

      • DirectoryEntryList

        public DirectoryEntryList()
      • DirectoryEntryList

        public DirectoryEntryList​(DirectoryEntryList list)
        Create one from an existing DirectoryEntryList Makes a shallow copy of the argument list
        Parameters:
        list - the existing list to copy into this one
      • DirectoryEntryList

        public DirectoryEntryList​(DirectoryEntryList list,
                                  boolean deepCopy)
        Create one from an existing DirectoryEntryList
        Parameters:
        list - the existing list to copy into this one
        deepCopy - true if should be a deep copy
      • DirectoryEntryList

        protected DirectoryEntryList​(@Nullable
                                     DirectoryEntryList list,
                                     boolean deepCopy,
                                     boolean preserveTime)
        Create one from an existing DirectoryEntryList
        Parameters:
        list - the existing list to copy into this one
        deepCopy - true if should be a deep copy
        preserveTime - true if time should be preserved on entries
    • Method Detail

      • getEntry

        public DirectoryEntry getEntry​(int i)
        Get entry at specified position
        Parameters:
        i - the position
        Returns:
        DirectoryEntry at position i
      • sort

        public void sort()
        Sort the list when we have made external cost modifications
      • pickOneOf

        public DirectoryEntry pickOneOf​(int desiredExpense)
        Pick one of any that are tied for expense at random
        Parameters:
        desiredExpense - the expense we want
      • fromXml

        public static DirectoryEntryList fromXml​(org.jdom2.Element e)
        Build an entry list from the supplied xml fragment
      • getXml

        public org.jdom2.Element getXml()
        Turn this list into an XML fragment
      • deepCopy

        public static List<DirectoryEntry> deepCopy​(@Nullable
                                                    List<DirectoryEntry> that,
                                                    boolean sort)
        Utility method to make a deep copy of a List<DirectoryEntry>
        Parameters:
        that - the list to copy
        sort - true if returned list should be sorted
        Returns:
        the new list