@Nonnull public CSSUnknownRule setParameterList (@Nullable final String sParameterList) { m_sParameterList = StringHelper.trim (sParameterList); return this; }
@Nonnull public CSSUnknownRule setBody (@Nullable final String sBody) { m_sBody = StringHelper.trim (sBody); return this; }
@Nonnull public CSSUnknownRule setBody (@Nullable final String sBody) { m_sBody = StringHelper.trim (sBody); return this; }
@Nonnull public CSSUnknownRule setParameterList (@Nullable final String sParameterList) { m_sParameterList = StringHelper.trim (sParameterList); return this; }
@Nullable public String getTextContentTrimmed () { return StringHelper.trim (getTextContent ()); }
/** * Utility method to get all tokens from a single value * * @param sValue * The value to use. May not be <code>null</code>. * @return An array of tokens to use. Never <code>null</code>. */ @Nonnull public static String [] getTokensFromValue (@Nonnull final String sValue) { return RegExHelper.getSplitToArray (StringHelper.trim (sValue), "\\W+"); } }
/** * Utility method to get all tokens from a single value * * @param sValue * The value to use. May not be <code>null</code>. * @return An array of tokens to use. Never <code>null</code>. */ @Nonnull public static String [] getTokensFromValue (@Nonnull final String sValue) { return RegExHelper.getSplitToArray (StringHelper.trim (sValue), "\\W+"); } }
@Nullable @CheckReturnValue public static String getCleanedLine (@Nullable final String sLine) { String ret = StringHelper.trim (sLine); if (StringHelper.hasText (ret)) { // Remove the Skype highlighting :) ret = RegExHelper.stringReplacePattern ("begin_of_the_skype_highlighting.+end_of_the_skype_highlighting", ret, ""); } return ret; } }
@Override public boolean canConvertToNode (@Nonnull final IHCConversionSettingsToNode aConversionSettings) { m_sJSCode = StringHelper.trim (getJSCode ()); // Don't create script elements with empty content.... return StringHelper.hasText (m_sJSCode); }
public static boolean isNumberValue (@Nullable final String sCSSValue) { final String sRealValue = StringHelper.trim (sCSSValue); return StringHelper.hasText (sRealValue) && StringParser.isDouble (sRealValue); }
public static boolean isNumberValue (@Nullable final String sCSSValue) { final String sRealValue = StringHelper.trim (sCSSValue); return StringHelper.hasText (sRealValue) && StringParser.isDouble (sRealValue); }
/** * Check if the passed String is valid CSS RGB color value. Example value: * <code>rgb(255,0,0)</code> * * @param sValue * The value to check. May be <code>null</code>. * @return <code>true</code> if it is a CSS RGB color value, * <code>false</code> if not */ public static boolean isRGBColorValue (@Nullable final String sValue) { final String sRealValue = StringHelper.trim (sValue); return StringHelper.hasText (sRealValue) && RegExHelper.stringMatchesPattern (PATTERN_RGB, sRealValue); }
/** * Check if the passed String is valid CSS HSLA color value. Example value: * <code>hsla(255,0%,0%, 0.1)</code> * * @param sValue * The value to check. May be <code>null</code>. * @return <code>true</code> if it is a CSS HSLA color value, * <code>false</code> if not */ public static boolean isHSLAColorValue (@Nullable final String sValue) { final String sRealValue = StringHelper.trim (sValue); return StringHelper.hasText (sRealValue) && RegExHelper.stringMatchesPattern (PATTERN_HSLA, sRealValue); }
/** * Check if the passed String is valid CSS hex color value. Example value: * <code>#ff0000</code> * * @param sValue * The value to check. May be <code>null</code>. * @return <code>true</code> if it is a CSS hex color value, * <code>false</code> if not */ public static boolean isHexColorValue (@Nullable final String sValue) { final String sRealValue = StringHelper.trim (sValue); return StringHelper.hasText (sRealValue) && RegExHelper.stringMatchesPattern (PATTERN_HEX, sRealValue); }
@Nullable public static CSSRGBA getParsedRGBAColorValue (@Nullable final String sValue) { final String sRealValue = StringHelper.trim (sValue); if (StringHelper.hasText (sRealValue)) { final String [] aValues = RegExHelper.getAllMatchingGroupValues (PATTERN_RGBA, sRealValue); if (aValues != null) return new CSSRGBA (aValues[0], aValues[1], aValues[2], aValues[3]); } return null; }
@Nullable public static CSSRGBA getParsedRGBAColorValue (@Nullable final String sValue) { final String sRealValue = StringHelper.trim (sValue); if (StringHelper.hasText (sRealValue)) { final String [] aValues = RegExHelper.getAllMatchingGroupValues (PATTERN_RGBA, sRealValue); if (aValues != null) return new CSSRGBA (aValues[0], aValues[1], aValues[2], aValues[3]); } return null; }
@Nullable public static CSSHSL getParsedHSLColorValue (@Nullable final String sValue) { final String sRealValue = StringHelper.trim (sValue); if (StringHelper.hasText (sRealValue)) { final String [] aValues = RegExHelper.getAllMatchingGroupValues (PATTERN_HSL, sRealValue); if (aValues != null) return new CSSHSL (aValues[0], aValues[1], aValues[2]); } return null; }
@Nullable public static CSSHSLA getParsedHSLAColorValue (@Nullable final String sValue) { final String sRealValue = StringHelper.trim (sValue); if (StringHelper.hasText (sRealValue)) { final String [] aValues = RegExHelper.getAllMatchingGroupValues (PATTERN_HSLA, sRealValue); if (aValues != null) return new CSSHSLA (aValues[0], aValues[1], aValues[2], aValues[3]); } return null; }
@Nullable public static CSSHSL getParsedHSLColorValue (@Nullable final String sValue) { final String sRealValue = StringHelper.trim (sValue); if (StringHelper.hasText (sRealValue)) { final String [] aValues = RegExHelper.getAllMatchingGroupValues (PATTERN_HSL, sRealValue); if (aValues != null) return new CSSHSL (aValues[0], aValues[1], aValues[2]); } return null; }
@Nullable public static CSSHSLA getParsedHSLAColorValue (@Nullable final String sValue) { final String sRealValue = StringHelper.trim (sValue); if (StringHelper.hasText (sRealValue)) { final String [] aValues = RegExHelper.getAllMatchingGroupValues (PATTERN_HSLA, sRealValue); if (aValues != null) return new CSSHSLA (aValues[0], aValues[1], aValues[2], aValues[3]); } return null; }