TextDecorationLineType
Inheritance: java.lang.Object
All Implemented Interfaces: com.groupdocs.editor.htmlcss.css.properties.ICssProperty
public class TextDecorationLineType implements ICssProperty
Represents types of the text decoration line: underline (underscore), overline, and line-through (strikethrough)
Immutable struct. Similar to the https://developer.mozilla.org/en-US/docs/Web/CSS/text-decoration-line
Constructors
Constructor | Description |
---|---|
TextDecorationLineType() | |
TextDecorationLineType(int value) |
Fields
Field | Description |
---|---|
None | Produces no text decoration. |
Underline | Each line of text is underlined. |
Overline | Each line of text has a line above it. |
LineThrough | Each line of text has a line through the middle. |
Methods
Method | Description |
---|---|
isInitial() | Indicates whether this instance has an initial value \u2014 None |
isUnderline() | Indicates whether underline (underscore) is enabled |
isOverline() | Indicates whether overline is enabled |
isLineThrough() | Indicates whether line-through (strikethrough) is enabled |
getValue() | Returns a value of all flags in this instance as text |
toString() | Returns a value of all flags in this instance as text |
equals(TextDecorationLineType other) | Indicates whether this TextDecorationLineType instance is equal to specified |
equals(Object other) | Indicates whether this TextDecorationLineType instance is equal to specified uncasted |
hashCode() | Returns a hash-code of this instance |
op_Equality(TextDecorationLineType first, TextDecorationLineType second) | Checks whether two “TextDecorationLineType” values are equal |
op_Inequality(TextDecorationLineType first, TextDecorationLineType second) | Checks whether two “TextDecorationLineType” values are not equal |
fromFlags(boolean isUnderline, boolean isOverline, boolean isLineThrough) | Creates and returns a TextDecorationLineType instance with flags, defined by the specified parameters |
tryParse(String input, TextDecorationLineType[] output) | Tries to parse a specified string and return a valid TextDecorationLineType instance |
op_Addition(TextDecorationLineType first, TextDecorationLineType second) | Combines (merges) two specified line types and produces new resultant line type, where flags are merged (union) |
op_Subtraction(TextDecorationLineType first, TextDecorationLineType second) | Subtracts second specified line type from the first specified line type and produces new resultant line type, where are present only those flags from the first operand, which are not found in the second operand (difference) |
op_Division(TextDecorationLineType first, TextDecorationLineType second) | Returns an intersection between first and second line types, where only those flags are enabled, which are enabled simultaneously in both operands. |
to_TextDecorationLineType(byte octet) | Casts specific byte (8-bit octet) to the corresponding TextDecorationLineType, throws exception if casting is invalid |
TextDecorationLineType()
public TextDecorationLineType()
TextDecorationLineType(int value)
public TextDecorationLineType(int value)
Parameters:
Parameter | Type | Description |
---|---|---|
value | int |
None
public static final TextDecorationLineType None
Produces no text decoration. Initial value.
Underline
public static final TextDecorationLineType Underline
Each line of text is underlined.
Overline
public static final TextDecorationLineType Overline
Each line of text has a line above it.
LineThrough
public static final TextDecorationLineType LineThrough
Each line of text has a line through the middle.
isInitial()
public final boolean isInitial()
Indicates whether this instance has an initial value \u2014 None
Returns: boolean
isUnderline()
public final boolean isUnderline()
Indicates whether underline (underscore) is enabled
Returns: boolean
isOverline()
public final boolean isOverline()
Indicates whether overline is enabled
Returns: boolean
isLineThrough()
public final boolean isLineThrough()
Indicates whether line-through (strikethrough) is enabled
Returns: boolean
getValue()
public final String getValue()
Returns a value of all flags in this instance as text
Returns: java.lang.String
toString()
public String toString()
Returns a value of all flags in this instance as text
Returns: java.lang.String
equals(TextDecorationLineType other)
public final boolean equals(TextDecorationLineType other)
Indicates whether this TextDecorationLineType instance is equal to specified
Parameters:
Parameter | Type | Description |
---|---|---|
other | TextDecorationLineType | Other TextDecorationLineType instance |
Returns: boolean - true if are equal, false otherwise
equals(Object other)
public boolean equals(Object other)
Indicates whether this TextDecorationLineType instance is equal to specified uncasted
Parameters:
Parameter | Type | Description |
---|---|---|
other | java.lang.Object | Other TextDecorationLineType instance, casted to object |
Returns: boolean - true if are equal, false otherwise
hashCode()
public int hashCode()
Returns a hash-code of this instance
Returns: int - Signed integer hash-code
op_Equality(TextDecorationLineType first, TextDecorationLineType second)
public static boolean op_Equality(TextDecorationLineType first, TextDecorationLineType second)
Checks whether two “TextDecorationLineType” values are equal
Parameters:
Parameter | Type | Description |
---|---|---|
first | TextDecorationLineType | First operand to check |
second | TextDecorationLineType | Second operand to check |
Returns: boolean - true if are equal, false otherwise
op_Inequality(TextDecorationLineType first, TextDecorationLineType second)
public static boolean op_Inequality(TextDecorationLineType first, TextDecorationLineType second)
Checks whether two “TextDecorationLineType” values are not equal
Parameters:
Parameter | Type | Description |
---|---|---|
first | TextDecorationLineType | First operand to check |
second | TextDecorationLineType | Second operand to check |
Returns: boolean - true if are unequal, false otherwise
fromFlags(boolean isUnderline, boolean isOverline, boolean isLineThrough)
public static TextDecorationLineType fromFlags(boolean isUnderline, boolean isOverline, boolean isLineThrough)
Creates and returns a TextDecorationLineType instance with flags, defined by the specified parameters
Parameters:
Parameter | Type | Description |
---|---|---|
isUnderline | boolean | Determines whether an underline flag is enabled or not |
isOverline | boolean | Determines whether an overline flag is enabled or not |
isLineThrough | boolean | Determines whether an line-through flag is enabled or not |
Returns: TextDecorationLineType - New TextDecorationLineType instance
tryParse(String input, TextDecorationLineType[] output)
public static boolean tryParse(String input, TextDecorationLineType[] output)
Tries to parse a specified string and return a valid TextDecorationLineType instance
Parameters:
Parameter | Type | Description |
---|---|---|
input | java.lang.String | Input string |
output | TextDecorationLineType[] | Result. If parsing is invalid, it is a #None.None value |
Returns: boolean - true if parsing was successful, false on failure
op_Addition(TextDecorationLineType first, TextDecorationLineType second)
public static TextDecorationLineType op_Addition(TextDecorationLineType first, TextDecorationLineType second)
Combines (merges) two specified line types and produces new resultant line type, where flags are merged (union)
Parameters:
Parameter | Type | Description |
---|---|---|
first | TextDecorationLineType | First line type operand |
second | TextDecorationLineType | Second line type operand |
Returns: TextDecorationLineType - Result of the union between specified operands
op_Subtraction(TextDecorationLineType first, TextDecorationLineType second)
public static TextDecorationLineType op_Subtraction(TextDecorationLineType first, TextDecorationLineType second)
Subtracts second specified line type from the first specified line type and produces new resultant line type, where are present only those flags from the first operand, which are not found in the second operand (difference)
Parameters:
Parameter | Type | Description |
---|---|---|
first | TextDecorationLineType | First line type operand |
second | TextDecorationLineType | Second line type operand |
Returns: TextDecorationLineType - Result of the difference between the first (minuend) and second (subtrahend) operands
op_Division(TextDecorationLineType first, TextDecorationLineType second)
public static TextDecorationLineType op_Division(TextDecorationLineType first, TextDecorationLineType second)
Returns an intersection between first and second line types, where only those flags are enabled, which are enabled simultaneously in both operands. Has the highest priority between all operators (higher than union and difference)
Parameters:
Parameter | Type | Description |
---|---|---|
first | TextDecorationLineType | First line type operand |
second | TextDecorationLineType | Second line type operand |
Returns: TextDecorationLineType - Result of the intersection between specified operands
to_TextDecorationLineType(byte octet)
public static TextDecorationLineType to_TextDecorationLineType(byte octet)
Casts specific byte (8-bit octet) to the corresponding TextDecorationLineType, throws exception if casting is invalid
Parameters:
Parameter | Type | Description |
---|---|---|
octet | byte | A 8-bit octet (bitfield), where 5 leading bits are zeros, while last 3 indicate flags |
Returns: TextDecorationLineType