Package com.helger.css.utils
Class CSSRectHelper
- java.lang.Object
-
- com.helger.css.utils.CSSRectHelper
-
@Immutable public final class CSSRectHelper extends Object
Provides rectangle handling sanity methods.- Author:
- Philip Helger
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static CSSRectgetAsRect(String sCSSValue)Interpret the passed value as a CSS rectangle and convert it to aCSSRect.static String[]getRectValues(String sCSSValue)Get all the values from within a CSS rectangle definition.static booleanisRectValue(String sCSSValue)Check if the passed value is CSS rectangle definition or not.
-
-
-
Method Detail
-
isRectValue
public static boolean isRectValue(@Nullable String sCSSValue)
Check if the passed value is CSS rectangle definition or not. It checks both the current syntax (rect(a,b,c,d)) and the old syntax (rect(a b c d)).- Parameters:
sCSSValue- The value to check. May benull.- Returns:
trueif the passed value is a rect value,falseif not
-
getRectValues
@Nullable public static String[] getRectValues(@Nullable String sCSSValue)
Get all the values from within a CSS rectangle definition.- Parameters:
sCSSValue- The CSS values to check. May benull.- Returns:
nullif the passed String is not a CSS rectangle. An array with 4 Strings if the passed value is a CSS rectangle.
-
-