Class CollectionOps

java.lang.Object
io.quarkus.gizmo2.creator.ops.ObjectOps
io.quarkus.gizmo2.creator.ops.CollectionOps
Direct Known Subclasses:
ListOps, SetOps

public class CollectionOps extends ObjectOps
Operations on Collection.
  • Constructor Details

    • CollectionOps

      public CollectionOps(BlockCreator bc, Expr obj)
      Construct a new instance.
      Parameters:
      bc - the block creator (must not be null)
      obj - the collection instance (must not be null)
  • Method Details

    • size

      public Expr size()
      Generate a call to Collection.size().
      Returns:
      the expression of the result (not null)
    • isEmpty

      public Expr isEmpty()
      Generate a call to Collection.isEmpty().
      Returns:
      the expression of the result (not null)
    • add

      public Expr add(Expr item)
      Generate a call to Collection.add(Object).
      Parameters:
      item - the object to add (must not be null)
      Returns:
      the expression of the result (not null)
    • addAll

      public Expr addAll(Expr other)
      Generate a call to Collection.addAll(Collection).
      Parameters:
      other - the collection to add (must not be null)
      Returns:
      the expression of the result (not null)
    • clear

      public void clear()
      Generate a call to Collection.clear().
    • contains

      public Expr contains(Expr item)
      Generate a call to Collection.contains(Object).
      Parameters:
      item - the item to test for (must not be null)
      Returns:
      the expression of the result (not null)
    • containsAll

      public Expr containsAll(Expr other)
      Parameters:
      other - the other collection (must not be null)
      Returns:
      the expression of the result (not null)
    • iterator

      public Expr iterator()
      Generate a call to Collection.iterator().
      Returns:
      the expression of the result (not null)
    • remove

      public Expr remove(Expr item)
      Generate a call to Collection.remove(Object).
      Parameters:
      item - the object to remove (must not be null)
      Returns:
      the expression of the result (not null)
    • removeAll

      public Expr removeAll(Expr other)
      Parameters:
      other - the other collection (must not be null)
      Returns:
      the expression of the result (not null)