- java.lang.Object
-
- com.io7m.jcoronado.api.VulkanPointSizeRange
-
- All Implemented Interfaces:
VulkanPointSizeRangeType
public final class VulkanPointSizeRange extends java.lang.Object implements VulkanPointSizeRangeType
The inclusive range of supported sizes for points. Values written to variables decorated with the PointSize built-in decoration are clamped to this range.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
VulkanPointSizeRange.Builder
Builds instances of typeVulkanPointSizeRange
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static VulkanPointSizeRange.Builder
builder()
Creates a builder forVulkanPointSizeRange
.static VulkanPointSizeRange
copyOf(VulkanPointSizeRangeType instance)
Creates an immutable copy of aVulkanPointSizeRangeType
value.boolean
equals(java.lang.Object another)
This instance is equal to all instances ofVulkanPointSizeRange
that have equal attribute values.int
hashCode()
Computes a hash code from attributes:minimum
,maximum
.float
maximum()
float
minimum()
static VulkanPointSizeRange
of(float minimum, float maximum)
Construct a new immutableVulkanPointSizeRange
instance.java.lang.String
toString()
Prints the immutable valueVulkanPointSizeRange
with attribute values.VulkanPointSizeRange
withMaximum(float value)
Copy the current immutable object by setting a value for themaximum
attribute.VulkanPointSizeRange
withMinimum(float value)
Copy the current immutable object by setting a value for theminimum
attribute.
-
-
-
Method Detail
-
minimum
public float minimum()
- Specified by:
minimum
in interfaceVulkanPointSizeRangeType
- Returns:
- The minimum size
-
maximum
public float maximum()
- Specified by:
maximum
in interfaceVulkanPointSizeRangeType
- Returns:
- The maximum size
-
withMinimum
public final VulkanPointSizeRange withMinimum(float value)
Copy the current immutable object by setting a value for theminimum
attribute. A value strict bits equality used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for minimum- Returns:
- A modified copy of the
this
object
-
withMaximum
public final VulkanPointSizeRange withMaximum(float value)
Copy the current immutable object by setting a value for themaximum
attribute. A value strict bits equality used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for maximum- Returns:
- A modified copy of the
this
object
-
equals
public boolean equals(java.lang.Object another)
This instance is equal to all instances ofVulkanPointSizeRange
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:minimum
,maximum
.- Overrides:
hashCode
in classjava.lang.Object
- Returns:
- hashCode value
-
toString
public java.lang.String toString()
Prints the immutable valueVulkanPointSizeRange
with attribute values.- Overrides:
toString
in classjava.lang.Object
- Returns:
- A string representation of the value
-
of
public static VulkanPointSizeRange of(float minimum, float maximum)
Construct a new immutableVulkanPointSizeRange
instance.- Parameters:
minimum
- The value for theminimum
attributemaximum
- The value for themaximum
attribute- Returns:
- An immutable VulkanPointSizeRange instance
-
copyOf
public static VulkanPointSizeRange copyOf(VulkanPointSizeRangeType instance)
Creates an immutable copy of aVulkanPointSizeRangeType
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 VulkanPointSizeRange instance
-
builder
public static VulkanPointSizeRange.Builder builder()
Creates a builder forVulkanPointSizeRange
.- Returns:
- A new VulkanPointSizeRange builder
-
-