Interface ColorProperty

All Superinterfaces:
Functor<Color>, Property<Color>, Transmittable<Color>
All Known Implementing Classes:
AdaptiveColorProperty, AnimatedColorProperty, AnimatedColorProperty.AnimatedAlpha, FixedColorProperty, StyledColorProperty, TransitionedColorProperty, VariableColorProperty
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface ColorProperty extends Property<Color>, Transmittable<Color>
A property with a color value.
  • Method Details

    • transmit

      default void transmit(Color target)
      Description copied from interface: Transmittable
      Transmits this object's data to a given target object.
      Specified by:
      transmit in interface Transmittable<Color>
      Parameters:
      target - The target object to transmit data to
    • getColor

      @Contract("-> new") default Color getColor()
      Returns:
      A new color with the value of this property.
    • replaceNull

      default ColorProperty replaceNull(Color defaultValue)
      Description copied from interface: Property
      Returns a property whose value is the value of this property, or defaultValue if the value of this property is null.
      Specified by:
      replaceNull in interface Property<Color>
      Returns:
      A property whose value is never null.
    • fromProperty

      static ColorProperty fromProperty(ColorProperty property)
    • fromProperty

      @Contract("_ -> new") static ColorProperty fromProperty(Property<Color> property)