Package de.xima.fc.common.graphdot
Class WeighedColor
- java.lang.Object
-
- de.xima.fc.common.graphdot.WeighedColor
-
- All Implemented Interfaces:
Serializable,CharSequence
public final class WeighedColor extends Object
A weighted color, used in color lists for gradients etc.green;0.33
- Since:
- 8.2.0
- Author:
- XIMA MEDIA GmbH
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description WeighedColor(Color color, Double weight)Creates a new weighted color with the given weight.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Default Methods Modifier and Type Method Description default charcharAt(int index)default IntStreamchars()default IntStreamcodePoints()booleanequals(Object obj)ColorgetColor()OptionalDoublegetWeight()inthashCode()default intlength()default CharSequencesubSequence(int start, int end)StringtoString()static WeighedColorunweighed(Color color)Creates new color with no weight.static WeighedColorweighed(Color color, double weight)Creates new color with the given weight.
-
-
-
Method Detail
-
getColor
public Color getColor()
- Returns:
- The color being weighted.
-
getWeight
public OptionalDouble getWeight()
- Returns:
- The weight of the color.
-
toString
public String toString()
- Specified by:
toStringin interfaceCharSequence
-
unweighed
public static WeighedColor unweighed(Color color)
Creates new color with no weight.- Parameters:
color- Color to use.- Returns:
- A new color with no weight.
-
weighed
public static WeighedColor weighed(Color color, double weight)
Creates new color with the given weight.- Parameters:
color- Color to use.weight- Weight to use.- Returns:
- A new weighted color.
-
charAt
public default char charAt(int index)
- Specified by:
charAtin interfaceCharSequence
-
chars
public default IntStream chars()
- Specified by:
charsin interfaceCharSequence
-
codePoints
public default IntStream codePoints()
- Specified by:
codePointsin interfaceCharSequence
-
length
public default int length()
- Specified by:
lengthin interfaceCharSequence
-
subSequence
public default CharSequence subSequence(int start, int end)
- Specified by:
subSequencein interfaceCharSequence
-
-