Package com.evopdf

Class NameValuePairsCollection

java.lang.Object
com.evopdf.NameValuePairsCollection

public class NameValuePairsCollection extends Object
Represents a collection of NameValuePair objects
  • Constructor Details

    • NameValuePairsCollection

      public NameValuePairsCollection()
  • Method Details

    • add

      public NameValuePair add(String name, String value)
      Adds a name value pair to collection
      Parameters:
      name - the pair name
      value - the pair value
      Returns:
      the added pair
    • count

      public int count()
      Gets the number of pairs in collection
      Returns:
      the number of pair in collection
    • getByIndex

      public NameValuePair getByIndex(int index) throws Exception
      Gets the name value pair at the given index in collection
      Parameters:
      index - the pair index
      Returns:
      the name value pair at the given index in collection or throws an exception if the index is out of bounds
      Throws:
      Exception - an exception is thrown if the index is out of bounds
    • getByName

      public NameValuePair getByName(String name) throws Exception
      Gets the name value pair having a given name
      Parameters:
      name - the pair name
      Returns:
      the name value pair having a given name or null if there is not any pair with the given name
      Throws:
      Exception - an exception is thrown if the index is out of bounds