# CSJ2K.j2k.util.ParameterList

## Content

<div class="doc-site-dotnet-api-container">



  <h1 id="CSJ2K_j2k_util_ParameterList" data-uid="CSJ2K.j2k.util.ParameterList" class="text-break">ParameterList Class
</h1>
  <div class="markdown level0 summary"><p>This class holds modules options and parameters as they are provided to the
encoder or the decoder. Each option and its associated parameters are
stored as strings.</p>
<pre><code>       &lt;p&gt;This class is built on the standard Java Properties class. Consequently,
       it offers facilities to load and write parameters from/to a file. In the
       meantime, a ParameterList object can also handle default parameters for
       each option.&lt;/p&gt;&lt;p&gt;Each parameter can be retrieved as a string or as an specific primitive
       type (int, float, etc).&lt;/p&gt;&lt;p&gt;For more details see the Properties class.&lt;/p&gt;&lt;p&gt;Note that this class does not support multiple occurrences of parameters
       (for a parameter name, only one value is possible). Also there is no
       particular order of the parameters.&lt;/p&gt;
</code></pre>
</div>
  <div class="markdown level0 conceptual"></div>
  <div class="inheritance">
    <h5>Inheritance</h5>
    <div class="level0"><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></div>
    <div class="level1"><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.dictionary-2">Dictionary</a>&lt;<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a>, <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a>&gt;</div>
    <div class="level2"><span class="xref">ParameterList</span></div>
  </div>
  <div class="implements">
    <h5>Implements</h5>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.idictionary-2">IDictionary</a>&lt;<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a>, <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a>&gt;</div>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.icollection-1">ICollection</a>&lt;<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.keyvaluepair-2">KeyValuePair</a>&lt;<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a>, <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a>&gt;&gt;</div>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.idictionary">IDictionary</a></div>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.icollection">ICollection</a></div>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.ireadonlydictionary-2">IReadOnlyDictionary</a>&lt;<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a>, <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a>&gt;</div>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.ireadonlycollection-1">IReadOnlyCollection</a>&lt;<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.keyvaluepair-2">KeyValuePair</a>&lt;<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a>, <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a>&gt;&gt;</div>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1">IEnumerable</a>&lt;<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.keyvaluepair-2">KeyValuePair</a>&lt;<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a>, <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a>&gt;&gt;</div>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.ienumerable">IEnumerable</a></div>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.runtime.serialization.iserializable">ISerializable</a></div>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.runtime.serialization.ideserializationcallback">IDeserializationCallback</a></div>
  </div>
  <h6><strong>Namespace</strong>: <a class="xref" href="CSJ2K.j2k.util.html">CSJ2K.j2k.util</a></h6>
  <h6><strong>Assembly</strong>: C1.WPF.ReportViewer.4.6.2.dll</h6>
  <h5 id="CSJ2K_j2k_util_ParameterList_syntax">Syntax</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public class ParameterList : Dictionary&lt;string, string&gt;, IDictionary&lt;string, string&gt;, ICollection&lt;KeyValuePair&lt;string, string&gt;&gt;, IDictionary, ICollection, IReadOnlyDictionary&lt;string, string&gt;, IReadOnlyCollection&lt;KeyValuePair&lt;string, string&gt;&gt;, IEnumerable&lt;KeyValuePair&lt;string, string&gt;&gt;, IEnumerable, ISerializable, IDeserializationCallback</code></pre>
  </div>
  <div class="codewrapper">
    <pre><code class="lang-vbnet hljs">Public Class ParameterList
    Inherits Dictionary(Of String, String)
    Implements IDictionary(Of String, String), ICollection(Of KeyValuePair(Of String, String)), IDictionary, ICollection, IReadOnlyDictionary(Of String, String), IReadOnlyCollection(Of KeyValuePair(Of String, String)), IEnumerable(Of KeyValuePair(Of String, String)), IEnumerable, ISerializable, IDeserializationCallback</code></pre>
  </div>
  <h3 id="constructors">Constructors
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="CSJ2K_j2k_util_ParameterList__ctor" data-uid="CSJ2K.j2k.util.ParameterList.#ctor">
          <a class="xref" href="CSJ2K.j2k.util.ParameterList.-ctor.html#CSJ2K_j2k_util_ParameterList__ctor">ParameterList()</a>
        </td>
        <td class="markdown level1 summary"><p>Constructs an empty ParameterList object. It can be later completed by
adding elements one by one, by loading them from a file, or by
initializing them from an argument string.</p>
</td>
      </tr>
      <tr>
        <td id="CSJ2K_j2k_util_ParameterList__ctor_CSJ2K_j2k_util_ParameterList_" data-uid="CSJ2K.j2k.util.ParameterList.#ctor(CSJ2K.j2k.util.ParameterList)">
          <a class="xref" href="CSJ2K.j2k.util.ParameterList.-ctor.html#CSJ2K_j2k_util_ParameterList__ctor_CSJ2K_j2k_util_ParameterList_">ParameterList(ParameterList)</a>
        </td>
        <td class="markdown level1 summary"><p>Constructs an empty ParameterList object with the provided default
parameters. The list can be later updated by adding elements one by
one, by loading them from a file, or by initializing them from an
argument string.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h3 id="properties">Properties
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="CSJ2K_j2k_util_ParameterList_DefaultParameterList" data-uid="CSJ2K.j2k.util.ParameterList.DefaultParameterList">
          <a class="xref" href="CSJ2K.j2k.util.ParameterList.DefaultParameterList.html#CSJ2K_j2k_util_ParameterList_DefaultParameterList">DefaultParameterList</a>
        </td>
        <td class="markdown level1 summary"><p>Returns the default ParameterList.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h3 id="methods">Methods
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="CSJ2K_j2k_util_ParameterList_checkList_System_Char_System_String___" data-uid="CSJ2K.j2k.util.ParameterList.checkList(System.Char,System.String[])">
          <a class="xref" href="CSJ2K.j2k.util.ParameterList.checkList.html#CSJ2K_j2k_util_ParameterList_checkList_System_Char_System_String___">checkList(char, string[])</a>
        </td>
        <td class="markdown level1 summary"><p>Checks if the parameters which name starts with the prefix 'prfx' in
the parameter list are all in the list of valid parameter names
'plist'. If there is a parameter that is not in 'plist' an
IllegalArgumentException is thrown with an explanation message. The
default parameters are also included in the check.</p>
</td>
      </tr>
      <tr>
        <td id="CSJ2K_j2k_util_ParameterList_checkList_System_Char___System_String___" data-uid="CSJ2K.j2k.util.ParameterList.checkList(System.Char[],System.String[])">
          <a class="xref" href="CSJ2K.j2k.util.ParameterList.checkList.html#CSJ2K_j2k_util_ParameterList_checkList_System_Char___System_String___">checkList(char[], string[])</a>
        </td>
        <td class="markdown level1 summary"><p>Checks if the parameters which names do not start with any of the
prefixes in 'prfxs' in this ParameterList are all in the list of valid
parameter names 'plist'. If there is a parameter that is not in 'plist'
an IllegalArgumentException is thrown with an explanation message. The
default parameters are also included in the check.</p>
</td>
      </tr>
      <tr>
        <td id="CSJ2K_j2k_util_ParameterList_getBooleanParameter_System_String_" data-uid="CSJ2K.j2k.util.ParameterList.getBooleanParameter(System.String)">
          <a class="xref" href="CSJ2K.j2k.util.ParameterList.getBooleanParameter.html#CSJ2K_j2k_util_ParameterList_getBooleanParameter_System_String_">getBooleanParameter(string)</a>
        </td>
        <td class="markdown level1 summary"><p>Returns the value of the named parameter as a boolean. The value &quot;on&quot;
is interpreted as 'true', while the value &quot;off&quot; is interpreted as
'false'. If the parameter has another value then an
StringFormatException is thrown. If the parameter 'pname' is not in the
parameter list, an IllegalArgumentException is thrown.</p>
</td>
      </tr>
      <tr>
        <td id="CSJ2K_j2k_util_ParameterList_getFloatParameter_System_String_" data-uid="CSJ2K.j2k.util.ParameterList.getFloatParameter(System.String)">
          <a class="xref" href="CSJ2K.j2k.util.ParameterList.getFloatParameter.html#CSJ2K_j2k_util_ParameterList_getFloatParameter_System_String_">getFloatParameter(string)</a>
        </td>
        <td class="markdown level1 summary"><p>Returns the value of the named parameter as a float. If the parameter
has a non-numeric value a NumberFormatException is thrown. If the
parameter has a multiple word value than the first word is returned as
an int, others are ignored. If the parameter 'pname' is not in the
parameter list, an IllegalArgumentException is thrown.</p>
</td>
      </tr>
      <tr>
        <td id="CSJ2K_j2k_util_ParameterList_getIntParameter_System_String_" data-uid="CSJ2K.j2k.util.ParameterList.getIntParameter(System.String)">
          <a class="xref" href="CSJ2K.j2k.util.ParameterList.getIntParameter.html#CSJ2K_j2k_util_ParameterList_getIntParameter_System_String_">getIntParameter(string)</a>
        </td>
        <td class="markdown level1 summary"><p>Returns the value of the named parameter as an int. If the parameter
has a non-numeric value a NumberFormatException is thrown. If the
parameter has a multiple word value than the first word is returned as
an int, others are ignored. If the parameter 'pname' is not in the
parameter list, an IllegalArgumentException is thrown.</p>
</td>
      </tr>
      <tr>
        <td id="CSJ2K_j2k_util_ParameterList_getParameter_System_String_" data-uid="CSJ2K.j2k.util.ParameterList.getParameter(System.String)">
          <a class="xref" href="CSJ2K.j2k.util.ParameterList.getParameter.html#CSJ2K_j2k_util_ParameterList_getParameter_System_String_">getParameter(string)</a>
        </td>
        <td class="markdown level1 summary"><p>Returns the value of the named parameter, as a string. The value can
come from teh defaults, if there are.</p>
</td>
      </tr>
      <tr>
        <td id="CSJ2K_j2k_util_ParameterList_parseArgs_System_String___" data-uid="CSJ2K.j2k.util.ParameterList.parseArgs(System.String[])">
          <a class="xref" href="CSJ2K.j2k.util.ParameterList.parseArgs.html#CSJ2K_j2k_util_ParameterList_parseArgs_System_String___">parseArgs(string[])</a>
        </td>
        <td class="markdown level1 summary"></td>
      </tr>
      <tr>
        <td id="CSJ2K_j2k_util_ParameterList_toNameArray_System_String_____" data-uid="CSJ2K.j2k.util.ParameterList.toNameArray(System.String[][])">
          <a class="xref" href="CSJ2K.j2k.util.ParameterList.toNameArray.html#CSJ2K_j2k_util_ParameterList_toNameArray_System_String_____">toNameArray(string[][])</a>
        </td>
        <td class="markdown level1 summary"><p>Converts the usage information to a list of parameter names in a single
array. The usage information appears in a 2D array of String. The first
dimensions contains the different options, the second dimension
contains the name of the option (first element), the synopsis and the
explanation. This method takes the names of the different options in
'pinfo' and returns them in a single array of String.</p>
</td>
      </tr>
    </tbody>
  </table>

</div>
