public class ColorOperation extends java.lang.Object implements IColorOperation
Represents different color operations used for color transformations. Immutable object.
Constructor and Description |
---|
ColorOperation(int op)
Creates new color transform operation.
|
ColorOperation(int op,
float parameter)
Creates new color transform operation.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj)
Determines whether the two ColorOperation instances are equal.
|
int |
getOperationType()
Returns or sets the type of an operation.
|
float |
getParameter()
Returns a parameter of an operation.
|
int |
hashCode()
Serves as a hash function for a particular type, suitable for use
in hashing algorithms and data structures like a hash table.
|
public ColorOperation(int op)
Creates new color transform operation.
op
- Operation type.public ColorOperation(int op, float parameter)
Creates new color transform operation.
op
- Operation type.parameter
- Operation parameter.public final int getOperationType()
Returns or sets the type of an operation.
Read-only ColorTransformOperation
.
getOperationType
in interface IColorOperation
public final float getParameter()
Returns a parameter of an operation.
Read-only float
.
getParameter
in interface IColorOperation
public boolean equals(java.lang.Object obj)
Determines whether the two ColorOperation instances are equal.
equals
in class java.lang.Object
obj
- The ColorOperation to compare with the current ColorOperation.<b>true</b>
if the specified ColorOperation is equal to the current ColorOperation;
otherwise, <b>false</b>
.public int hashCode()
Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
hashCode
in class java.lang.Object