Package com.helger.html.resource.css
Class ConstantCSSCodeProvider
- java.lang.Object
-
- com.helger.html.resource.css.ConstantCSSCodeProvider
-
- All Implemented Interfaces:
ICSSCodeProvider,ICSSProvider,IHTMLResourceProvider,Serializable
public final class ConstantCSSCodeProvider extends Object implements ICSSCodeProvider
Implementation ofICSSCodeProviderwith constant values.- Author:
- Philip Helger
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from interface com.helger.html.resource.css.ICSSProvider
DEFAULT_CONDITIONAL_COMMENT, DEFAULT_CSS_MEDIA_LIST
-
Fields inherited from interface com.helger.html.resource.IHTMLResourceProvider
DEFAULT_IS_BUNDLABLE
-
-
Constructor Summary
Constructors Constructor Description ConstantCSSCodeProvider(String sCSSCode, String sConditionalComment, com.helger.css.media.ICSSMediaList aMediaList, boolean bIsBundlable)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ConstantCSSCodeProvidercreate(String sCSSCode)static ConstantCSSCodeProvidercreateBundlable(String sCSSCode, boolean bBundlable)static ConstantCSSCodeProvidercreateBundlable(String sCSSCode, com.helger.css.media.ICSSMediaList aMediaList, boolean bBundlable)static ConstantCSSCodeProvidercreateWithConditionalComment(String sCSSCode, String sConditionalComment)static ConstantCSSCodeProvidercreateWithConditionalComment(String sCSSCode, String sConditionalComment, com.helger.css.media.ICSSMediaList aMediaList)booleanequals(Object o)StringgetConditionalComment()StringgetCSSCode()com.helger.css.media.ICSSMediaListgetMediaList()inthashCode()booleanisBundlable()StringtoString()
-
-
-
Method Detail
-
getCSSCode
@Nonnull @Nonempty public String getCSSCode()
- Specified by:
getCSSCodein interfaceICSSCodeProvider- Returns:
- The CSS code of the CSS inline item.
-
getConditionalComment
@Nullable public String getConditionalComment()
- Specified by:
getConditionalCommentin interfaceICSSProvider- Returns:
- The conditional comment required for this JS item or
nullif it applies to all browsers.
-
getMediaList
@Nonnull @ReturnsMutableCopy public com.helger.css.media.ICSSMediaList getMediaList()
- Specified by:
getMediaListin interfaceICSSProvider- Returns:
- The media list for which this CSS item applies. Never
nullbut maybe empty.
-
isBundlable
public boolean isBundlable()
- Specified by:
isBundlablein interfaceICSSProvider- Specified by:
isBundlablein interfaceIHTMLResourceProvider- Returns:
- Whether or not this script can be bundled to a big CSS profile. For some files this is not possible.
-
create
@Nonnull public static ConstantCSSCodeProvider create(@Nonnull @Nonempty String sCSSCode)
-
createWithConditionalComment
@Nonnull public static ConstantCSSCodeProvider createWithConditionalComment(@Nonnull @Nonempty String sCSSCode, @Nullable String sConditionalComment)
-
createWithConditionalComment
@Nonnull public static ConstantCSSCodeProvider createWithConditionalComment(@Nonnull @Nonempty String sCSSCode, @Nullable String sConditionalComment, @Nullable com.helger.css.media.ICSSMediaList aMediaList)
-
createBundlable
@Nonnull public static ConstantCSSCodeProvider createBundlable(@Nonnull @Nonempty String sCSSCode, boolean bBundlable)
-
createBundlable
@Nonnull public static ConstantCSSCodeProvider createBundlable(@Nonnull @Nonempty String sCSSCode, @Nullable com.helger.css.media.ICSSMediaList aMediaList, boolean bBundlable)
-
-