Package com.treescrub.spedran.data
Class NameStyle
- java.lang.Object
-
- com.treescrub.spedran.data.NameStyle
-
public class NameStyle extends Object
Describes how the name for aUsershould be colored.
If the style is a gradient,getStartColor()andgetEndColor()can be identical.
This class is immutable and thread-safe.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classNameStyle.StyleThe styling type for a given name styling.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Optional<NameColor>getColor()Gets the color whengetStyle()isNameStyle.Style.SOLID.Optional<NameColor>getEndColor()Gets the end or rightmost color whengetStyle()isNameStyle.Style.GRADIENT.Optional<NameColor>getStartColor()Gets the start or leftmost color whengetStyle()isNameStyle.Style.GRADIENT.NameStyle.StylegetStyle()Gets the style of the name.StringtoString()
-
-
-
Method Detail
-
getStyle
public NameStyle.Style getStyle()
Gets the style of the name.If
NameStyle.Style.SOLID, the name color will be solid andgetColor()will have the color preset.
IfNameStyle.Style.GRADIENT, the name color will be a gradient left to right, fromgetStartColor()togetEndColor().- Returns:
- the color style for the user
-
getColor
public Optional<NameColor> getColor()
Gets the color whengetStyle()isNameStyle.Style.SOLID.
-
getStartColor
public Optional<NameColor> getStartColor()
Gets the start or leftmost color whengetStyle()isNameStyle.Style.GRADIENT.- Returns:
- the starting
NameColor
-
getEndColor
public Optional<NameColor> getEndColor()
Gets the end or rightmost color whengetStyle()isNameStyle.Style.GRADIENT.- Returns:
- the ending
NameColor
-
-