Documentation of 'org.jlab.hipo.data.HipoNodeBuilder' Java class
HipoNodeBuilder
org.jlab.hipo.data

Class HipoNodeBuilder<T extends java.lang.Number>

  • Type Parameters:
    T - node type to build, accepts classes extending Number


    public class HipoNodeBuilder<T extends java.lang.Number>
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor and Description
      HipoNodeBuilder()
      Default Constructor.
      HipoNodeBuilder(int limit)
      Constructor with setting a limit on how many elements maximum can be stored in the builder.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      HipoNode buildNode(int group, int item)
      Builds a node from the array, type is determined by Template.
      int getSize()
      returns current size of the container.
      boolean isFull()
      returns false if the array capacity is less than predetermined maximum size of the node, if limit is negative it always returns false.
      void push(T value)
      adds an element of given type to the end of the list.
      void reset()
      Resets the content of the node builder, the array is cleared.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • HipoNodeBuilder

        public HipoNodeBuilder()
        Default Constructor. Sets the maximum limit of elements to negative number, therefore there is no restrictions on how many elements can be stored.
      • HipoNodeBuilder

        public HipoNodeBuilder(int limit)
        Constructor with setting a limit on how many elements maximum can be stored in the builder.
        Parameters:
        limit - maximum number of elements to store
    • Method Detail

      • push

        public void push(T value)
        adds an element of given type to the end of the list. the check is performed to see if the array has reached the maximum allowed size set by user.
        Parameters:
        value - element to add to the array.
      • isFull

        public boolean isFull()
        returns false if the array capacity is less than predetermined maximum size of the node, if limit is negative it always returns false.
        Returns:
        true if maximum size is reached, false otherwise
      • getSize

        public int getSize()
        returns current size of the container.
        Returns:
      • reset

        public void reset()
        Resets the content of the node builder, the array is cleared. the maximum size limit is not changed.
      • buildNode

        public HipoNode buildNode(int group,
                                  int item)
        Builds a node from the array, type is determined by Template.
        Parameters:
        group - group is for the node
        item - item id for the node
        Returns:
        HipoNode class

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.