Class CssLength


  • public class CssLength
    extends Object
    Parses a width or height layout attribute, for the determining the layout of AMP tags.
    Author:
    nhant01, GeorgeLuo
    • Constructor Detail

      • CssLength

        public CssLength​(@Nonnull
                         String input,
                         boolean allowAuto,
                         boolean allowFluid)
        Constructor.
        Parameters:
        input - The input attribute value to be parsed.
        allowAuto - Whether or not to allow the 'auto' value as a value.
        allowFluid - whether or not to allow the 'fluid' value as a value.
    • Method Detail

      • isValid

        public boolean isValid()
        Returns isValid.
        Returns:
        returns boolean isSet.
      • isSet

        public boolean isSet()
        Returns isSet.
        Returns:
        returns boolean isSet.
      • isAuto

        public boolean isAuto()
        Returns isAuto.
        Returns:
        returns a float isAuto.
      • isFluid

        public boolean isFluid()
        Returns a isFluid.
        Returns:
        returns a boolean isFluid.
      • getNumeral

        public Float getNumeral()
        Returns a isNumeral.
        Returns:
        returns a float isNumeral.
      • getUnit

        public String getUnit()
        Returns a isUnit.
        Returns:
        returns a String isUnit.