Interface IWebResourceSet<T extends com.helger.html.resource.IHTMLResourceProvider>

Type Parameters:
T - The contained data type.
All Superinterfaces:
com.helger.commons.collection.impl.ICommonsIterable<T>, Iterable<T>
All Known Implementing Classes:
CSSResourceSet, JSResourceSet

public interface IWebResourceSet<T extends com.helger.html.resource.IHTMLResourceProvider> extends com.helger.commons.collection.impl.ICommonsIterable<T>
Base interface for CSS and JS resource sets.
Author:
Philip Helger
  • Method Summary

    Modifier and Type
    Method
    Description
    com.helger.commons.state.EChange
    addItem(int nIndex, T aItem)
    Add an item at the specified index
    com.helger.commons.state.EChange
    addItem(T aItem)
    Add an item
    com.helger.commons.state.EChange
    addItems(int nIndex, IWebResourceSet<? extends T> aItems)
    Add all items from another list at the specified index.
    com.helger.commons.state.EChange
    addItems(IWebResourceSet<? extends T> aItems)
    Add all items from another list.
    com.helger.commons.collection.impl.ICommonsOrderedSet<T>
     
    void
    getAllItems(Collection<? super T> aTarget)
    Add all items to the provided target container.
    boolean
     
    boolean
     
    void
    Call this method to mark the resource set as "collected for further processing".
    com.helger.commons.state.EChange
    Remove all items.
    com.helger.commons.state.EChange
    removeItem(T aItem)
    Unregister an existing item

    Methods inherited from interface com.helger.commons.collection.impl.ICommonsIterable

    containsAny, containsNone, containsOnly, findAll, findAllInstanceOf, findAllMapped, findAllMapped, findAllMapped, findFirst, findFirst, findFirstIndex, findFirstMapped, findFirstMapped, findLastIndex, forEachBreakable, forEachByIndex, forEachThrowing, getCount, getCount

    Methods inherited from interface java.lang.Iterable

    forEach, iterator, spliterator
  • Method Details

    • addItem

      @Nonnull com.helger.commons.state.EChange addItem(@Nonnull T aItem)
      Add an item
      Parameters:
      aItem - The item to add. May not be null.
      Returns:
      EChange
    • addItem

      @Nonnull com.helger.commons.state.EChange addItem(int nIndex, @Nonnull T aItem)
      Add an item at the specified index
      Parameters:
      nIndex - The index to be used. If the value is < 0 the value is ignored and item is appended.
      aItem - The item to add. May not be null.
      Returns:
      EChange
    • addItems

      @Nonnull com.helger.commons.state.EChange addItems(@Nonnull IWebResourceSet<? extends T> aItems)
      Add all items from another list.
      Parameters:
      aItems - The items to be added. May not be null.
      Returns:
      EChange
    • addItems

      @Nonnull com.helger.commons.state.EChange addItems(int nIndex, @Nonnull IWebResourceSet<? extends T> aItems)
      Add all items from another list at the specified index.
      Parameters:
      nIndex - The index to be used. If the value is < 0 the value is ignored and item is appended.
      aItems - The items to be added. May not be null.
      Returns:
      EChange
    • removeItem

      @Nonnull com.helger.commons.state.EChange removeItem(@Nonnull T aItem)
      Unregister an existing item
      Parameters:
      aItem - The item to be removed. May not be null.
      Returns:
      EChange
    • removeAll

      @Nonnull com.helger.commons.state.EChange removeAll()
      Remove all items.
      Returns:
      EChange
    • getAllItems

      @Nonnull @ReturnsMutableCopy com.helger.commons.collection.impl.ICommonsOrderedSet<T> getAllItems()
      Returns:
      A non-null set with all items.
    • getAllItems

      void getAllItems(@Nonnull Collection<? super T> aTarget)
      Add all items to the provided target container.
      Parameters:
      aTarget - The container to add the items to. May not be null.
    • markAsCollected

      void markAsCollected()
      Call this method to mark the resource set as "collected for further processing". This state may be used to determine additions afterwards which will potentially not be gathered.
    • isEmpty

      boolean isEmpty()
      Returns:
      true if no item is contained
    • isNotEmpty

      boolean isNotEmpty()
      Returns:
      true if at least a single item is contained