Class ViewBuilder

java.lang.Object
technology.sola.ecs.ViewBuilder

@NullMarked public class ViewBuilder extends Object
The ViewBuilder class exposes methods for creating Views.
  • Method Details

    • of

      public <C1 extends Component> View1<C1> of(Class<C1> c1Class)
      Returns a View1 of entries having one Component.
      Type Parameters:
      C1 - the type of the component
      Parameters:
      c1Class - the class for the component
      Returns:
      the view
    • of

      public <C1 extends Component, C2 extends Component> View2<C1,C2> of(Class<C1> c1Class, Class<C2> c2Class)
      Returns a View2 of entries having two Components.
      Type Parameters:
      C1 - the type for the first component
      C2 - the type for the second component
      Parameters:
      c1Class - the class for the first component
      c2Class - the class for the second component
      Returns:
      the view
    • of

      public <C1 extends Component, C2 extends Component, C3 extends Component> View3<C1,C2,C3> of(Class<C1> c1Class, Class<C2> c2Class, Class<C3> c3Class)
      Returns a View3 of entries having three Components.
      Type Parameters:
      C1 - the type for the first component
      C2 - the type for the second component
      C3 - the type for the third component
      Parameters:
      c1Class - the class for the first component
      c2Class - the class for the second component
      c3Class - the class for the third component
      Returns:
      the view
    • of

      public <C1 extends Component, C2 extends Component, C3 extends Component, C4 extends Component> View4<C1,C2,C3,C4> of(Class<C1> c1Class, Class<C2> c2Class, Class<C3> c3Class, Class<C4> c4Class)
      Returns a View4 of entries having three Components.
      Type Parameters:
      C1 - the type for the first component
      C2 - the type for the second component
      C3 - the type for the third component
      C4 - the type for the fourth component
      Parameters:
      c1Class - the class for the first component
      c2Class - the class for the second component
      c3Class - the class for the third component
      c4Class - the class for the fourth component
      Returns:
      the view
    • of

      @SafeVarargs public final ViewN of(Class<? extends Component>... componentClasses)
      Returns a ViewN of entries having N many Components.
      Parameters:
      componentClasses - the Component classes
      Returns:
      the view