Package com.brightcove.player.model
Class Length
java.lang.Object
com.brightcove.player.model.Length
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
LengthVtt
Provides the representation of varying forms of length measure per the TTML specification.
- See Also:
-
Field Summary
-
Constructor Summary
ConstructorDescriptionLength
(double value, StyledElement.Unit unit) Initializes a Length object using the given numeric value and Unit specification.Initializes a Length object by parsing the given expression. -
Method Summary
Modifier and TypeMethodDescriptionboolean
getUnit()
TheStyledElement.Unit
of this Length.double
getValue()
The numeric value of this Length.int
hashCode()
-
Field Details
-
TAG
-
PATTERN
-
value
-
unit
-
-
Constructor Details
-
Length
Initializes a Length object by parsing the given expression. Valid expressions are those that include a decimal numeric value followed by one of the recognized unit suffixes:- %
- px
- ems
- 4.5%
- 200px
- 22ems
- Parameters:
expression
- the string expression to parse- See Also:
-
Length
Initializes a Length object using the given numeric value and Unit specification.- Parameters:
value
- the numeric value of the lengthunit
- the units for the length value
-
-
Method Details
-
getValue
public double getValue()The numeric value of this Length.- Returns:
- the double value
-
getUnit
TheStyledElement.Unit
of this Length.- Returns:
- the unit
-
equals
-
hashCode
public int hashCode()
-