Class BaseResourceList<T extends Resource>

All Implemented Interfaces:
Countable, Addable<T>, Appendable<T>, Indexable<T>, Prependable<T>, Sequence<T>, Sized, DoubleQuantizable, Quantizable, Stringable, StringSource, Instantiable<BaseList<T>>, Iterable<T>, Collection<T>, List<T>, RandomAccess
Direct Known Subclasses:
FileList, ResourceList

public abstract class BaseResourceList<T extends Resource> extends ObjectList<T>
  • Constructor Details

    • BaseResourceList

      public BaseResourceList()
  • Method Details

    • add

      public void add(int index, T resource)
      Description copied from class: BaseList
      Specified by:
      add in interface List<T extends Resource>
      Overrides:
      add in class BaseList<T extends Resource>
    • add

      public boolean add(T resource)
      Description copied from class: BaseList
      Adds the given value
      Specified by:
      add in interface Addable<T extends Resource>
      Specified by:
      add in interface Collection<T extends Resource>
      Specified by:
      add in interface List<T extends Resource>
      Overrides:
      add in class BaseList<T extends Resource>
      Returns:
      True if the value was added
    • asSet

      public Set<T> asSet()
      Returns:
      This sequence as a list
    • count

      public Count count()
      Description copied from interface: Countable
      The size of this object as a Count
      Returns:
      This object's size as a Count
    • digest

      public byte[] digest()
      Returns a message digest of this resource list's resource metadata, including the absolute path to the resource, its creation and last modification times, and its size in bytes.
      Returns:
      The message digest
    • largest

      public Resource largest()
    • matching

      public BaseResourceList<T> matching(Extension extension)
    • matching

      public BaseResourceList<T> matching(Matcher<T> matcher)
      Description copied from class: ObjectList
      Returns a new list containing the elements in this list that match the given matcher.
      Overrides:
      matching in class ObjectList<T extends Resource>
      Parameters:
      matcher - The matcher to use
      Returns:
      The list of elements matching the matcher
    • relativeTo

      public BaseResourceList<T> relativeTo(ResourceFolder<?> folder)
    • set

      public T set(int index, T resource)
      Description copied from class: BaseList
      Specified by:
      set in interface List<T extends Resource>
      Overrides:
      set in class BaseList<T extends Resource>
    • smallest

      public Resource smallest()
    • sortedLargestToSmallest

      public BaseResourceList<T> sortedLargestToSmallest()
    • sortedOldestToNewest

      public BaseResourceList<T> sortedOldestToNewest()
    • totalSize

      public Bytes totalSize()
    • accepts

      protected boolean accepts(FileName name)
    • newResource

      protected abstract T newResource(ResourcePath path)
    • newResourceList

      protected abstract BaseResourceList<T> newResourceList()