Package com.evopdf

# Class NameValuePairsCollection

java.lang.Object
com.evopdf.NameValuePairsCollection

public class NameValuePairsCollection extends Object
Represents a collection of `NameValuePair` objects

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `NameValuePairsCollection()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `NameValuePair`
  `add(String name, String value)`
  Adds a name value pair to collection
  `int`
  `count()`
  Gets the number of pairs in collection
  `NameValuePair`
  `getByIndex(int index)`
  Gets the name value pair at the given index in collection
  `NameValuePair`
  `getByName(String name)`
  Gets the name value pair having a given name

  ### Methods inherited from class java.lang.Object

  `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## 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