Package com.helger.css.media
Interface ICSSMediaList
- All Known Implementing Classes:
CSSMediaList
public interface ICSSMediaList
A read only version of a CSS media list
- Author:
- Philip Helger
-
Method Summary
Modifier and TypeMethodDescriptionbooleancontainsMedium(ECSSMedium eMedium) Check if the passed medium is explicitly specifieddefault booleancontainsMediumOrAll(ECSSMedium eMedium) Check if the passed medium or theECSSMedium.ALLis explicitly specifiedcom.helger.commons.collection.impl.ICommonsOrderedSet<ECSSMedium>intdefault StringgetMediaString(String sSeparator) default booleanbooleandefault booleandefault booleanCheck if the passed medium is usable for the screen.
-
Method Details
-
getMediaCount
- Returns:
- The number of contained media. Always ≥ 0.
-
hasAnyMedia
default boolean hasAnyMedia()- Returns:
trueif any explicit media is defined,falseif not.
-
hasNoMedia
boolean hasNoMedia()- Returns:
trueif no explicit media is defined,falseif a media is defined.
-
hasNoMediaOrAll
default boolean hasNoMediaOrAll()- Returns:
trueif no explicit media is defined or ifECSSMedium.ALLis contained.
-
containsMedium
Check if the passed medium is explicitly specified- Parameters:
eMedium- The medium to be checked. May benull.- Returns:
trueif it is contained,falseotherwise
-
containsMediumOrAll
Check if the passed medium or theECSSMedium.ALLis explicitly specified- Parameters:
eMedium- The medium to be checked. May benull.- Returns:
trueif the passed medium or the "all" medium is contained,falseotherwise
-
isForScreen
default boolean isForScreen()Check if the passed medium is usable for the screen. This is the case if either the "screen" medium, the "all" medium or no medium at all is contained.- Returns:
trueif the media list is usable for screen display
-
getAllMedia
@Nonnull @ReturnsMutableCopy com.helger.commons.collection.impl.ICommonsOrderedSet<ECSSMedium> getAllMedia()- Returns:
- A copy of all specified media in the order they were specified.
Never
nullbut maybe empty.
-
getMediaString
- Returns:
- A non-
nullbut maybe empty String with all media in the order they where inserted and separated byCSSMediaList.DEFAULT_MEDIA_STRING_SEPARATOR - See Also:
-
getMediaString
- Parameters:
sSeparator- The separator to be used. May not benull.- Returns:
- A non-
nullbut maybe empty String with all media in the order they where inserted and separated by the specified separator
-