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 TypeMethodDescriptionbooleanIndicates whether some other object is "equal to" this one.Returns the value of thegetColumnKeyrecord component.Returns the value of thegetRowKeyrecord component.getValue()Returns the value of thegetValuerecord component.inthashCode()Returns a hash code value for this object.@NotNull StringtoString()Returns a string representation of this record class.
-
Field Details
-
getRowKey
The field for thegetRowKeyrecord component. -
getColumnKey
The field for thegetColumnKeyrecord component. -
getValue
The field for thegetValuerecord 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 thegetRowKeyrecord component. -
getColumnKey
Returns the value of thegetColumnKeyrecord component.- Specified by:
getColumnKeyin interfacecom.google.common.collect.Table.Cell<R,C, V> - Returns:
- the value of the
getColumnKeyrecord component
-
getValue
Returns the value of thegetValuerecord component.
-