Package com.io7m.calino.api
Record Class CLNChannelDescription
java.lang.Object
java.lang.Record
com.io7m.calino.api.CLNChannelDescription
- Record Components:
semantic
- The channel semanticbits
- The size of the channel in bits
- All Implemented Interfaces:
CLNDescribableType
public record CLNChannelDescription(CLNChannelSemantic semantic, int bits)
extends Record
implements CLNDescribableType
A description of a single image channel.
-
Constructor Summary
ConstructorDescriptionCLNChannelDescription
(CLNChannelSemantic semantic, int bits) A description of a single image channel. -
Method Summary
Modifier and TypeMethodDescriptionint
bits()
Returns the value of thebits
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.static CLNChannelDescription
Parse a channel descriptor.semantic()
Returns the value of thesemantic
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
CLNChannelDescription
A description of a single image channel.- Parameters:
semantic
- The channel semanticbits
- The size of the channel in bits
-
-
Method Details
-
parse
Parse a channel descriptor.- Parameters:
text
- The descriptor- Returns:
- A parsed description
- Throws:
ParseException
- On parse errors
-
descriptor
- Specified by:
descriptor
in interfaceCLNDescribableType
- Returns:
- The descriptor for the object
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object)
; primitive components are compared with '=='. -
semantic
Returns the value of thesemantic
record component.- Returns:
- the value of the
semantic
record component
-
bits
public int bits()Returns the value of thebits
record component.- Returns:
- the value of the
bits
record component
-