Module technology.sola.ecs
Package technology.sola.ecs.view
Record Class View2Entry<C1 extends Component,C2 extends Component>
java.lang.Object
java.lang.Record
technology.sola.ecs.view.View2Entry<C1,C2>
- Type Parameters:
C1- the first component typeC2- the second component type- Record Components:
entity- theEntityc1- the firstComponentinstancec2- the second component instance
- All Implemented Interfaces:
ViewEntry
-
Constructor Summary
ConstructorsConstructorDescriptionView2Entry(Entity entity, C1 c1, C2 c2) Creates an instance of aView2Entryrecord class. -
Method Summary
Modifier and TypeMethodDescriptionc1()Returns the value of thec1record component.c2()Returns the value of thec2record component.entity()Returns the value of theentityrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Method Details
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
entity
Returns the value of theentityrecord component. -
c1
Returns the value of thec1record component.- Returns:
- the value of the
c1record component
-
c2
Returns the value of thec2record component.- Returns:
- the value of the
c2record component
-