Class RegExpMatchList


  • public class RegExpMatchList
    extends java.lang.Object
    A list of RegExpMatch objects.
    • Constructor Summary

      Constructors 
      Constructor Description
      RegExpMatchList()
      Creates an empty RegExpMatchList object.
      RegExpMatchList​(long n)
      Creates a RegExpMatchList object with capacity n.
      RegExpMatchList​(long cPtr, boolean cMemoryOwn)
      For internal use only.
    • Constructor Detail

      • RegExpMatchList

        public RegExpMatchList​(long cPtr,
                               boolean cMemoryOwn)
        For internal use only. Of no interest to the user.
        Parameters:
        cPtr - pointer to the CPP wrapped object
        cMemoryOwn - indicates if this object is responsible for memory management of the CPP object
      • RegExpMatchList

        public RegExpMatchList()
        Creates an empty RegExpMatchList object.
      • RegExpMatchList

        public RegExpMatchList​(long n)
        Creates a RegExpMatchList object with capacity n.
        Parameters:
        n - the capacity of the list
    • Method Detail

      • getCPtr

        public static long getCPtr​(RegExpMatchList obj)
        For internal use only. Of no interest to the user.
        Parameters:
        obj - a reference to an object of this class
        Returns:
        a long containing the address of the CPP wrapped object
      • delete

        public void delete()
      • size

        public long size()
        Gets the number of items in the list.
        Returns:
        the number of items in the list
      • capacity

        public long capacity()
        Gets the capacity of the list.
        Returns:
        the capacity of the list
      • reserve

        public void reserve​(long n)
        Sets the capacity of the list
        Parameters:
        n - the capacity of the list
      • isEmpty

        public boolean isEmpty()
        Returns true if the list is empty.
        Returns:
        true if the list contains zero items
      • get

        public RegExpMatch get​(int i)
        Gets the nth match in the list.
        Parameters:
        i - the index of the match to get
        Returns:
        the match
      • set

        public void set​(int i,
                        RegExpMatch val)
        Sets the nth match in the list.
        Parameters:
        i - the index to insert the item
        val - the value to insert