Class GroupTool

java.lang.Object
java.util.Observable
com.nomagic.magicreport.engine.Tool
com.nomagic.magicreport.engine.tools.GroupTool
All Implemented Interfaces:
ITool, IVariable, Serializable, Cloneable

@OpenApiAll public class GroupTool extends Tool
Contains utilities functions for group an object. Context name of this class is "group". Public functions of this class are able to access via template by using $group
Since:
Aug 1, 2007
See Also:
  • Field Details

  • Constructor Details

    • GroupTool

      public GroupTool()
  • Method Details

    • create

      public GroupTool create()
      Create new instance of group tool.
      Returns:
      a new instance of group tool
    • init

      public ITool.Void init()
      Initialize a group tool.
      Returns:
      void
    • groupNames

      public Set<String> groupNames()
      Return a set of group name.
      Returns:
      Set of group name
    • contains

      public boolean contains(String groupName)
      Returns true if contains a group name.
      Parameters:
      groupName - a group name
      Returns:
      true if contains a group name.
    • put

      public ITool.Void put(String groupName, Object object)
      Add object into group.
      Parameters:
      groupName - a group name
      object - a object being added
      Returns:
      void
    • get

      public List<Object> get(String groupName)
      Return List of group object.
      Parameters:
      groupName - a group name
      Returns:
      List of group object.
    • remove

      public List<Object> remove(String groupName)
      Remove the group for this group name.
      Parameters:
      groupName - a group name
      Returns:
      previous List of group object associated with group name, or null if there was no group for key.
    • removeAll

      public ITool.Void removeAll()
      Remove all group.
      Returns:
      void
    • clear

      public ITool.Void clear()
      Removes all mappings.
      Returns:
      void