Package io.keikai.axyra.sheets.style
Record Class BorderEdge
java.lang.Object
java.lang.Record
io.keikai.axyra.sheets.style.BorderEdge
- Record Components:
style- the line style;BorderStyle.NONEwhen no line is drawncolor- the line color; see above for when it isnull
One border edge read back from a
CellStyle with
CellStyle.border(Side): the line style and its color. style
is BorderStyle.NONE for an absent edge.
On a style read from a cell, color is never null: an edge
without an explicit color, including an absent edge, reads
Color.auto(). color is null only on a style built with
CellStyle.builder() that never set this edge. Test
isPresent(), not the color, to see whether a line is drawn.
-
Constructor Summary
ConstructorsConstructorDescriptionBorderEdge(BorderStyle style, Color color) Creates an instance of aBorderEdgerecord class. -
Method Summary
Modifier and TypeMethodDescriptioncolor()Returns the value of thecolorrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanWhether this edge draws a line, i.e.style()Returns the value of thestylerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Method Details
-
isPresent
public boolean isPresent()Whether this edge draws a line, i.e. its style is notBorderStyle.NONE. -
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
style
Returns the value of thestylerecord component.- Returns:
- the value of the
stylerecord component
-
color
Returns the value of thecolorrecord component.- Returns:
- the value of the
colorrecord component
-