Record Class View4Entry<C1 extends Component,C2 extends Component,C3 extends Component,C4 extends Component>

java.lang.Object
java.lang.Record
technology.sola.ecs.view.View4Entry<C1,C2,C3,C4>
Type Parameters:
C1 - the first component type
C2 - the second component type
C3 - the third component type
C4 - the fourth component type
Record Components:
entity - the Entity
c1 - the first Component instance
c2 - the second component instance
c3 - the third component instance
c4 - the fourth component instance
All Implemented Interfaces:
ViewEntry

@NullMarked public record View4Entry<C1 extends Component,C2 extends Component,C3 extends Component,C4 extends Component>(Entity entity, C1 extends Component c1, C2 extends Component c2, C3 extends Component c3, C4 extends Component c4) extends Record implements ViewEntry
ViewEntry implementation for View4.
  • Constructor Summary

    Constructors
    Constructor
    Description
    View4Entry(Entity entity, C1 c1, C2 c2, C3 c3, C4 c4)
    Creates an instance of a View4Entry record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    c1()
    Returns the value of the c1 record component.
    c2()
    Returns the value of the c2 record component.
    c3()
    Returns the value of the c3 record component.
    c4()
    Returns the value of the c4 record component.
    Returns the value of the entity record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    final String
    Returns a string representation of this record class.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • View4Entry

      public View4Entry(Entity entity, C1 c1, C2 c2, C3 c3, C4 c4)
      Creates an instance of a View4Entry record class.
      Parameters:
      entity - the value for the entity record component
      c1 - the value for the c1 record component
      c2 - the value for the c2 record component
      c3 - the value for the c3 record component
      c4 - the value for the c4 record component
  • Method Details

    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • entity

      public Entity entity()
      Returns the value of the entity record component.
      Specified by:
      entity in interface ViewEntry
      Returns:
      the value of the entity record component
    • c1

      public C1 c1()
      Returns the value of the c1 record component.
      Returns:
      the value of the c1 record component
    • c2

      public C2 c2()
      Returns the value of the c2 record component.
      Returns:
      the value of the c2 record component
    • c3

      public C3 c3()
      Returns the value of the c3 record component.
      Returns:
      the value of the c3 record component
    • c4

      public C4 c4()
      Returns the value of the c4 record component.
      Returns:
      the value of the c4 record component