Package com.helger.photon.app.html
Class CSSResourceSet
java.lang.Object
com.helger.photon.app.html.CSSResourceSet
- All Implemented Interfaces:
com.helger.commons.collection.impl.ICommonsIterable<com.helger.html.resource.css.ICSSPathProvider>,IWebResourceSet<com.helger.html.resource.css.ICSSPathProvider>,Iterable<com.helger.html.resource.css.ICSSPathProvider>
@ThreadSafe
public class CSSResourceSet
extends Object
implements IWebResourceSet<com.helger.html.resource.css.ICSSPathProvider>
This class keeps track of all the CSS files that must be included for a
single request, so that the controls are working properly.
- Author:
- Philip Helger
-
Constructor Summary
ConstructorsConstructorDescriptionCSSResourceSet(com.helger.html.resource.css.ICSSPathProvider... aOther) CSSResourceSet(CSSResourceSet aOther) CSSResourceSet(Collection<? extends com.helger.html.resource.css.ICSSPathProvider> aOther) -
Method Summary
Modifier and TypeMethodDescriptioncom.helger.commons.state.EChangeaddItem(int nIndex, com.helger.html.resource.css.ICSSPathProvider aCSSPathProvider) Add an item at the specified indexcom.helger.commons.state.EChangeaddItem(com.helger.html.resource.css.ICSSPathProvider aCSSPathProvider) Add an itemcom.helger.commons.state.EChangeaddItems(int nIndex, IWebResourceSet<? extends com.helger.html.resource.css.ICSSPathProvider> aItems) Add all items from another list at the specified index.com.helger.commons.state.EChangeaddItems(IWebResourceSet<? extends com.helger.html.resource.css.ICSSPathProvider> aItems) Add all items from another list.booleancom.helger.commons.collection.impl.ICommonsOrderedSet<com.helger.html.resource.css.ICSSPathProvider>voidgetAllItems(Collection<? super com.helger.html.resource.css.ICSSPathProvider> aTarget) Add all items to the provided target container.intgetCount()inthashCode()booleanbooleanisEmpty()booleanIterator<com.helger.html.resource.css.ICSSPathProvider>iterator()voidCall this method to mark the resource set as "collected for further processing".com.helger.commons.state.EChangeRemove all items.com.helger.commons.state.EChangeremoveItem(com.helger.html.resource.css.ICSSPathProvider aCSSPathProvider) Unregister an existing itemtoString()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods 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, getCountMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
CSSResourceSet
public CSSResourceSet() -
CSSResourceSet
-
CSSResourceSet
public CSSResourceSet(@Nonnull Collection<? extends com.helger.html.resource.css.ICSSPathProvider> aOther) -
CSSResourceSet
-
-
Method Details
-
addItem
@Nonnull public com.helger.commons.state.EChange addItem(@Nonnull com.helger.html.resource.css.ICSSPathProvider aCSSPathProvider) Description copied from interface:IWebResourceSetAdd an item- Specified by:
addItemin interfaceIWebResourceSet<com.helger.html.resource.css.ICSSPathProvider>- Parameters:
aCSSPathProvider- The item to add. May not benull.- Returns:
EChange
-
addItem
@Nonnull public com.helger.commons.state.EChange addItem(int nIndex, @Nonnull com.helger.html.resource.css.ICSSPathProvider aCSSPathProvider) Description copied from interface:IWebResourceSetAdd an item at the specified index- Specified by:
addItemin interfaceIWebResourceSet<com.helger.html.resource.css.ICSSPathProvider>- Parameters:
nIndex- The index to be used. If the value is < 0 the value is ignored and item is appended.aCSSPathProvider- The item to add. May not benull.- Returns:
EChange
-
addItems
@Nonnull public com.helger.commons.state.EChange addItems(@Nonnull IWebResourceSet<? extends com.helger.html.resource.css.ICSSPathProvider> aItems) Description copied from interface:IWebResourceSetAdd all items from another list.- Specified by:
addItemsin interfaceIWebResourceSet<com.helger.html.resource.css.ICSSPathProvider>- Parameters:
aItems- The items to be added. May not benull.- Returns:
EChange
-
addItems
@Nonnull public com.helger.commons.state.EChange addItems(int nIndex, @Nonnull IWebResourceSet<? extends com.helger.html.resource.css.ICSSPathProvider> aItems) Description copied from interface:IWebResourceSetAdd all items from another list at the specified index.- Specified by:
addItemsin interfaceIWebResourceSet<com.helger.html.resource.css.ICSSPathProvider>- 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 benull.- Returns:
EChange
-
removeItem
@Nonnull public com.helger.commons.state.EChange removeItem(@Nonnull com.helger.html.resource.css.ICSSPathProvider aCSSPathProvider) Description copied from interface:IWebResourceSetUnregister an existing item- Specified by:
removeItemin interfaceIWebResourceSet<com.helger.html.resource.css.ICSSPathProvider>- Parameters:
aCSSPathProvider- The item to be removed. May not benull.- Returns:
EChange
-
removeAll
Description copied from interface:IWebResourceSetRemove all items.- Specified by:
removeAllin interfaceIWebResourceSet<com.helger.html.resource.css.ICSSPathProvider>- Returns:
EChange
-
getAllItems
@Nonnull @ReturnsMutableCopy public com.helger.commons.collection.impl.ICommonsOrderedSet<com.helger.html.resource.css.ICSSPathProvider> getAllItems()- Specified by:
getAllItemsin interfaceIWebResourceSet<com.helger.html.resource.css.ICSSPathProvider>- Returns:
- A non-
nullset with all items.
-
getAllItems
public void getAllItems(@Nonnull Collection<? super com.helger.html.resource.css.ICSSPathProvider> aTarget) Description copied from interface:IWebResourceSetAdd all items to the provided target container.- Specified by:
getAllItemsin interfaceIWebResourceSet<com.helger.html.resource.css.ICSSPathProvider>- Parameters:
aTarget- The container to add the items to. May not benull.
-
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin interfaceIWebResourceSet<com.helger.html.resource.css.ICSSPathProvider>- Returns:
trueif no item is contained
-
isNotEmpty
public boolean isNotEmpty()- Specified by:
isNotEmptyin interfaceIWebResourceSet<com.helger.html.resource.css.ICSSPathProvider>- Returns:
trueif at least a single item is contained
-
getCount
- Specified by:
getCountin interfacecom.helger.commons.collection.impl.ICommonsIterable<com.helger.html.resource.css.ICSSPathProvider>
-
iterator
-
isCollected
public boolean isCollected() -
markAsCollected
public void markAsCollected()Description copied from interface:IWebResourceSetCall 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.- Specified by:
markAsCollectedin interfaceIWebResourceSet<com.helger.html.resource.css.ICSSPathProvider>
-
equals
-
hashCode
public int hashCode() -
toString
-