java.lang.Object
java.lang.Record
net.luis.utils.collection.util.SimpleCell<R,C,V>
- Type Parameters:
R
- The type of the row keyC
- The type of the column keyV
- The type of the value- Record Components:
getRowKey
- The row key of the cellgetColumnKey
- The column key of the cellgetValue
- The value of the cell
- All Implemented Interfaces:
com.google.common.collect.Table.Cell<R,
C, V>
public record SimpleCell<R,C,V> (R getRowKey, C getColumnKey, V getValue)
extends Record
implements com.google.common.collect.Table.Cell<R,C,V>
A simple implementation of the
Table.Cell
interface.-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionSimpleCell
(R getRowKey, C getColumnKey, V getValue) Constructs a new simple cell with the specified row key, column key and value. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Indicates whether some other object is "equal to" this one.Returns the value of thegetColumnKey
record component.Returns the value of thegetRowKey
record component.getValue()
Returns the value of thegetValue
record component.int
hashCode()
Returns a hash code value for this object.@NotNull String
toString()
Returns a string representation of this record class.
-
Field Details
-
getRowKey
The field for thegetRowKey
record component. -
getColumnKey
The field for thegetColumnKey
record component. -
getValue
The field for thegetValue
record component.
-
-
Constructor Details
-
SimpleCell
Constructs a new simple cell with the specified row key, column key and value.- Parameters:
getRowKey
- The row key of the cellgetColumnKey
- The column key of the cellgetValue
- The value of the cell- Throws:
NullPointerException
- if the row key or column key is null
-
-
Method Details
-
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. All components in this record class are compared withObjects::equals(Object,Object)
. -
hashCode
public int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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. -
getRowKey
Returns the value of thegetRowKey
record component. -
getColumnKey
Returns the value of thegetColumnKey
record component.- Specified by:
getColumnKey
in interfacecom.google.common.collect.Table.Cell<R,
C, V> - Returns:
- the value of the
getColumnKey
record component
-
getValue
Returns the value of thegetValue
record component.
-