- java.lang.Object
-
- com.io7m.jcoronado.api.VulkanPushConstantRange
-
- All Implemented Interfaces:
VulkanPushConstantRangeType
public final class VulkanPushConstantRange extends java.lang.Object implements VulkanPushConstantRangeType
Structure specifying a push constant range.- See Also:
- "VkPushConstantRange"
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
VulkanPushConstantRange.Builder
Builds instances of typeVulkanPushConstantRange
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static VulkanPushConstantRange.Builder
builder()
Creates a builder forVulkanPushConstantRange
.static VulkanPushConstantRange
copyOf(VulkanPushConstantRangeType instance)
Creates an immutable copy of aVulkanPushConstantRangeType
value.boolean
equals(java.lang.Object another)
This instance is equal to all instances ofVulkanPushConstantRange
that have equal attribute values.int
hashCode()
Computes a hash code from attributes:stageFlags
,offset
,size
.static VulkanPushConstantRange
of(java.lang.Iterable<VulkanShaderStageFlag> stageFlags, int offset, int size)
Construct a new immutableVulkanPushConstantRange
instance.static VulkanPushConstantRange
of(java.util.Set<VulkanShaderStageFlag> stageFlags, int offset, int size)
Construct a new immutableVulkanPushConstantRange
instance.int
offset()
int
size()
java.util.Set<VulkanShaderStageFlag>
stageFlags()
java.lang.String
toString()
Prints the immutable valueVulkanPushConstantRange
with attribute values.VulkanPushConstantRange
withOffset(int value)
Copy the current immutable object by setting a value for theoffset
attribute.VulkanPushConstantRange
withSize(int value)
Copy the current immutable object by setting a value for thesize
attribute.VulkanPushConstantRange
withStageFlags(VulkanShaderStageFlag... elements)
Copy the current immutable object with elements that replace the content ofstageFlags
.VulkanPushConstantRange
withStageFlags(java.lang.Iterable<VulkanShaderStageFlag> elements)
Copy the current immutable object with elements that replace the content ofstageFlags
.
-
-
-
Method Detail
-
stageFlags
public java.util.Set<VulkanShaderStageFlag> stageFlags()
- Specified by:
stageFlags
in interfaceVulkanPushConstantRangeType
- Returns:
- The stages that will access the range of push constants
-
offset
public int offset()
- Specified by:
offset
in interfaceVulkanPushConstantRangeType
- Returns:
- The start of the range
-
size
public int size()
- Specified by:
size
in interfaceVulkanPushConstantRangeType
- Returns:
- The size of the range
-
withStageFlags
public final VulkanPushConstantRange withStageFlags(VulkanShaderStageFlag... elements)
Copy the current immutable object with elements that replace the content ofstageFlags
.- Parameters:
elements
- The elements to set- Returns:
- A modified copy of
this
object
-
withStageFlags
public final VulkanPushConstantRange withStageFlags(java.lang.Iterable<VulkanShaderStageFlag> elements)
Copy the current immutable object with elements that replace the content ofstageFlags
. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
elements
- An iterable of stageFlags elements to set- Returns:
- A modified copy of
this
object
-
withOffset
public final VulkanPushConstantRange withOffset(int value)
Copy the current immutable object by setting a value for theoffset
attribute. A value equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for offset- Returns:
- A modified copy of the
this
object
-
withSize
public final VulkanPushConstantRange withSize(int value)
Copy the current immutable object by setting a value for thesize
attribute. A value equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for size- Returns:
- A modified copy of the
this
object
-
equals
public boolean equals(java.lang.Object another)
This instance is equal to all instances ofVulkanPushConstantRange
that have equal attribute values.- Overrides:
equals
in classjava.lang.Object
- Returns:
true
ifthis
is equal toanother
instance
-
hashCode
public int hashCode()
Computes a hash code from attributes:stageFlags
,offset
,size
.- Overrides:
hashCode
in classjava.lang.Object
- Returns:
- hashCode value
-
toString
public java.lang.String toString()
Prints the immutable valueVulkanPushConstantRange
with attribute values.- Overrides:
toString
in classjava.lang.Object
- Returns:
- A string representation of the value
-
of
public static VulkanPushConstantRange of(java.util.Set<VulkanShaderStageFlag> stageFlags, int offset, int size)
Construct a new immutableVulkanPushConstantRange
instance.- Parameters:
stageFlags
- The value for thestageFlags
attributeoffset
- The value for theoffset
attributesize
- The value for thesize
attribute- Returns:
- An immutable VulkanPushConstantRange instance
-
of
public static VulkanPushConstantRange of(java.lang.Iterable<VulkanShaderStageFlag> stageFlags, int offset, int size)
Construct a new immutableVulkanPushConstantRange
instance.- Parameters:
stageFlags
- The value for thestageFlags
attributeoffset
- The value for theoffset
attributesize
- The value for thesize
attribute- Returns:
- An immutable VulkanPushConstantRange instance
-
copyOf
public static VulkanPushConstantRange copyOf(VulkanPushConstantRangeType instance)
Creates an immutable copy of aVulkanPushConstantRangeType
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 VulkanPushConstantRange instance
-
builder
public static VulkanPushConstantRange.Builder builder()
Creates a builder forVulkanPushConstantRange
.- Returns:
- A new VulkanPushConstantRange builder
-
-