Class VulkanComponentMapping
java.lang.Object
com.io7m.jcoronado.api.VulkanComponentMapping
- All Implemented Interfaces:
VulkanComponentMappingType
A structure specifying a color component mapping.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeVulkanComponentMapping. -
Method Summary
Modifier and TypeMethodDescriptiona()b()builder()Creates a builder forVulkanComponentMapping.static VulkanComponentMappingcopyOf(VulkanComponentMappingType instance) Creates an immutable copy of aVulkanComponentMappingTypevalue.booleanThis instance is equal to all instances ofVulkanComponentMappingthat have equal attribute values.g()inthashCode()Computes a hash code from attributes:r,g,b,a.static VulkanComponentMappingof(VulkanComponentSwizzle r, VulkanComponentSwizzle g, VulkanComponentSwizzle b, VulkanComponentSwizzle a) Construct a new immutableVulkanComponentMappinginstance.r()toString()Prints the immutable valueVulkanComponentMappingwith attribute values.final VulkanComponentMappingwithA(VulkanComponentSwizzle value) Copy the current immutable object by setting a value for theaattribute.final VulkanComponentMappingwithB(VulkanComponentSwizzle value) Copy the current immutable object by setting a value for thebattribute.final VulkanComponentMappingwithG(VulkanComponentSwizzle value) Copy the current immutable object by setting a value for thegattribute.final VulkanComponentMappingwithR(VulkanComponentSwizzle value) Copy the current immutable object by setting a value for therattribute.
-
Method Details
-
r
- Specified by:
rin interfaceVulkanComponentMappingType- Returns:
- The component value placed in the R component of the output vector.
-
g
- Specified by:
gin interfaceVulkanComponentMappingType- Returns:
- The component value placed in the G component of the output vector.
-
b
- Specified by:
bin interfaceVulkanComponentMappingType- Returns:
- The component value placed in the G component of the output vector.
-
a
- Specified by:
ain interfaceVulkanComponentMappingType- Returns:
- The component value placed in the A component of the output vector.
-
withR
Copy the current immutable object by setting a value for therattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for r- Returns:
- A modified copy of the
thisobject
-
withG
Copy the current immutable object by setting a value for thegattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for g- Returns:
- A modified copy of the
thisobject
-
withB
Copy the current immutable object by setting a value for thebattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for b- Returns:
- A modified copy of the
thisobject
-
withA
Copy the current immutable object by setting a value for theaattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for a- Returns:
- A modified copy of the
thisobject
-
equals
-
hashCode
-
toString
-
of
public static VulkanComponentMapping of(VulkanComponentSwizzle r, VulkanComponentSwizzle g, VulkanComponentSwizzle b, VulkanComponentSwizzle a) Construct a new immutableVulkanComponentMappinginstance.- Parameters:
r- The value for therattributeg- The value for thegattributeb- The value for thebattributea- The value for theaattribute- Returns:
- An immutable VulkanComponentMapping instance
-
copyOf
Creates an immutable copy of aVulkanComponentMappingTypevalue. 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 VulkanComponentMapping instance
-
builder
Creates a builder forVulkanComponentMapping.VulkanComponentMapping.builder() .setR(com.io7m.jcoronado.api.VulkanComponentSwizzle) // requiredr.setG(com.io7m.jcoronado.api.VulkanComponentSwizzle) // requiredg.setB(com.io7m.jcoronado.api.VulkanComponentSwizzle) // requiredb.setA(com.io7m.jcoronado.api.VulkanComponentSwizzle) // requireda.build();- Returns:
- A new VulkanComponentMapping builder
-