Class VulkanClearValueColorFloatingPoint

java.lang.Object
com.io7m.jcoronado.api.VulkanClearValueColorFloatingPoint
All Implemented Interfaces:
VulkanClearValueType, VulkanClearValueType.VulkanClearValueColorFloatingPointType, VulkanClearValueType.VulkanClearValueColorType

public final class VulkanClearValueColorFloatingPoint extends Object implements VulkanClearValueType.VulkanClearValueColorFloatingPointType
A color consisting of floating-point components.
  • Method Details

    • red

      public float red()
      Specified by:
      red in interface VulkanClearValueType.VulkanClearValueColorFloatingPointType
      Returns:
      The red channel
    • green

      public float green()
      Specified by:
      green in interface VulkanClearValueType.VulkanClearValueColorFloatingPointType
      Returns:
      The green channel
    • blue

      public float blue()
      Specified by:
      blue in interface VulkanClearValueType.VulkanClearValueColorFloatingPointType
      Returns:
      The blue channel
    • alpha

      public float alpha()
      Specified by:
      alpha in interface VulkanClearValueType.VulkanClearValueColorFloatingPointType
      Returns:
      The alpha channel
    • withRed

      public final VulkanClearValueColorFloatingPoint withRed(float value)
      Copy the current immutable object by setting a value for the red attribute. A value strict bits equality used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for red
      Returns:
      A modified copy of the this object
    • withGreen

      public final VulkanClearValueColorFloatingPoint withGreen(float value)
      Copy the current immutable object by setting a value for the green attribute. A value strict bits equality used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for green
      Returns:
      A modified copy of the this object
    • withBlue

      public final VulkanClearValueColorFloatingPoint withBlue(float value)
      Copy the current immutable object by setting a value for the blue attribute. A value strict bits equality used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for blue
      Returns:
      A modified copy of the this object
    • withAlpha

      public final VulkanClearValueColorFloatingPoint withAlpha(float value)
      Copy the current immutable object by setting a value for the alpha attribute. A value strict bits equality used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for alpha
      Returns:
      A modified copy of the this object
    • equals

      public boolean equals(Object another)
      This instance is equal to all instances of VulkanClearValueColorFloatingPoint that have equal attribute values.
      Overrides:
      equals in class Object
      Returns:
      true if this is equal to another instance
    • hashCode

      public int hashCode()
      Computes a hash code from attributes: red, green, blue, alpha.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

      public String toString()
      Prints the immutable value VulkanClearValueColorFloatingPoint with attribute values.
      Overrides:
      toString in class Object
      Returns:
      A string representation of the value
    • of

      public static VulkanClearValueColorFloatingPoint of(float red, float green, float blue, float alpha)
      Construct a new immutable VulkanClearValueColorFloatingPoint instance.
      Parameters:
      red - The value for the red attribute
      green - The value for the green attribute
      blue - The value for the blue attribute
      alpha - The value for the alpha attribute
      Returns:
      An immutable VulkanClearValueColorFloatingPoint instance
    • copyOf

      Creates an immutable copy of a VulkanClearValueType.VulkanClearValueColorFloatingPointType value. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.
      Parameters:
      instance - The instance to copy
      Returns:
      A copied immutable VulkanClearValueColorFloatingPoint instance
    • builder

      Creates a builder for VulkanClearValueColorFloatingPoint.
       VulkanClearValueColorFloatingPoint.builder()
          .setRed(float) // required red
          .setGreen(float) // required green
          .setBlue(float) // required blue
          .setAlpha(float) // required alpha
          .build();
       
      Returns:
      A new VulkanClearValueColorFloatingPoint builder