Class ImmutablePlatform
java.lang.Object
net.bmahe.genetics4j.gpu.opencl.model.ImmutablePlatform
- All Implemented Interfaces:
Platform
@Generated("org.immutables.processor.ProxyProcessor")
public final class ImmutablePlatform
extends Object
implements Platform
Immutable implementation of
Platform
.
Use the builder to create immutable instances:
ImmutablePlatform.builder()
.
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionprivate final String
private final int
private final org.jocl.cl_platform_id
private final PlatformProfile
private final String
private final String
-
Constructor Summary
ModifierConstructorDescriptionprivate
ImmutablePlatform
(org.jocl.cl_platform_id platformId, PlatformProfile profile, String version, String name, String vendor, Set<String> extensions, int numDevices) -
Method Summary
Modifier and TypeMethodDescriptionstatic ImmutablePlatform.Builder
builder()
Creates a builder forImmutablePlatform
.static ImmutablePlatform
Creates an immutable copy of aPlatform
value.private static <T> List
<T> createSafeList
(Iterable<? extends T> iterable, boolean checkNulls, boolean skipNulls) private static <T> Set
<T> createUnmodifiableSet
(List<T> list) Unmodifiable set constructed from list to avoid rehashing.boolean
This instance is equal to all instances ofImmutablePlatform
that have equal attribute values.private boolean
equalTo
(int synthetic, ImmutablePlatform another) int
hashCode()
Computes a hash code from attributes:platformId
,profile
,version
,name
,vendor
,extensions
,numDevices
.name()
int
org.jocl.cl_platform_id
profile()
toString()
Prints the immutable valuePlatform
with attribute values.vendor()
version()
final ImmutablePlatform
withExtensions
(Iterable<String> elements) Copy the current immutable object with elements that replace the content ofextensions
.final ImmutablePlatform
withExtensions
(String... elements) Copy the current immutable object with elements that replace the content ofextensions
.final ImmutablePlatform
Copy the current immutable object by setting a value for thename
attribute.final ImmutablePlatform
withNumDevices
(int value) Copy the current immutable object by setting a value for thenumDevices
attribute.final ImmutablePlatform
withPlatformId
(org.jocl.cl_platform_id value) Copy the current immutable object by setting a value for theplatformId
attribute.final ImmutablePlatform
withProfile
(PlatformProfile value) Copy the current immutable object by setting a value for theprofile
attribute.final ImmutablePlatform
withVendor
(String value) Copy the current immutable object by setting a value for thevendor
attribute.final ImmutablePlatform
withVersion
(String value) Copy the current immutable object by setting a value for theversion
attribute.
-
Field Details
-
platformId
private final org.jocl.cl_platform_id platformId -
profile
-
version
-
name
-
vendor
-
extensions
-
numDevices
private final int numDevices
-
-
Constructor Details
-
ImmutablePlatform
-
-
Method Details
-
platformId
public org.jocl.cl_platform_id platformId()- Specified by:
platformId
in interfacePlatform
- Returns:
- The value of the
platformId
attribute
-
profile
-
version
-
name
-
vendor
-
extensions
- Specified by:
extensions
in interfacePlatform
- Returns:
- The value of the
extensions
attribute
-
numDevices
public int numDevices()- Specified by:
numDevices
in interfacePlatform
- Returns:
- The value of the
numDevices
attribute
-
withPlatformId
Copy the current immutable object by setting a value for theplatformId
attribute. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for platformId- Returns:
- A modified copy of the
this
object
-
withProfile
Copy the current immutable object by setting a value for theprofile
attribute. A value equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for profile- Returns:
- A modified copy of the
this
object
-
withVersion
Copy the current immutable object by setting a value for theversion
attribute. An equals check used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for version- Returns:
- A modified copy of the
this
object
-
withName
Copy the current immutable object by setting a value for thename
attribute. An equals check used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for name- Returns:
- A modified copy of the
this
object
-
withVendor
Copy the current immutable object by setting a value for thevendor
attribute. An equals check used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for vendor- Returns:
- A modified copy of the
this
object
-
withExtensions
Copy the current immutable object with elements that replace the content ofextensions
.- Parameters:
elements
- The elements to set- Returns:
- A modified copy of
this
object
-
withExtensions
Copy the current immutable object with elements that replace the content ofextensions
. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
elements
- An iterable of extensions elements to set- Returns:
- A modified copy of
this
object
-
withNumDevices
Copy the current immutable object by setting a value for thenumDevices
attribute. A value equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for numDevices- Returns:
- A modified copy of the
this
object
-
equals
This instance is equal to all instances ofImmutablePlatform
that have equal attribute values. -
equalTo
-
hashCode
public int hashCode()Computes a hash code from attributes:platformId
,profile
,version
,name
,vendor
,extensions
,numDevices
. -
toString
Prints the immutable valuePlatform
with attribute values. -
copyOf
Creates an immutable copy of aPlatform
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 Platform instance
-
builder
Creates a builder forImmutablePlatform
.ImmutablePlatform.builder() .platformId(org.jocl.cl_platform_id) // required
platformId
.profile(net.bmahe.genetics4j.gpu.opencl.model.PlatformProfile) // requiredprofile
.version(String) // requiredversion
.name(String) // requiredname
.vendor(String) // requiredvendor
.addExtensions|addAllExtensions(String) //extensions
elements .numDevices(int) // requirednumDevices
.build();- Returns:
- A new ImmutablePlatform builder
-
createSafeList
-
createUnmodifiableSet
Unmodifiable set constructed from list to avoid rehashing.
-