Class BarcodePDF417.SegmentList

  • Enclosing class:
    BarcodePDF417

    protected static class BarcodePDF417.SegmentList
    extends java.lang.Object
    An utility class that encapsulates a list of segments.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected SegmentList()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void add​(char type, int start, int end)
      Adds a new segment to the list
      BarcodePDF417.Segment get​(int idx)
      Gets the segment at the specified index
      void remove​(int idx)
      Removes the segment at the specified index
      int size()
      Gets the number of segments in the list
      • Methods inherited from class java.lang.Object

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

      • SegmentList

        protected SegmentList()
    • Method Detail

      • add

        public void add​(char type,
                        int start,
                        int end)
        Adds a new segment to the list
        Parameters:
        type - the type of the segment
        start - the start position
        end - the end position
      • get

        public BarcodePDF417.Segment get​(int idx)
        Gets the segment at the specified index
        Parameters:
        idx - the index
        Returns:
        the segment at the specified index or null if the index is out of bounds
      • remove

        public void remove​(int idx)
        Removes the segment at the specified index
        Parameters:
        idx - the index
      • size

        public int size()
        Gets the number of segments in the list
        Returns:
        the number of segments in the list