Skip to content

Commit

Permalink
Docs contain some examples of included conversions
Browse files Browse the repository at this point in the history
  • Loading branch information
mkarg committed Aug 24, 2023
1 parent 2aaf209 commit 748ddba
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
5 changes: 4 additions & 1 deletion docs/index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,10 @@ $ java Main -l 512 --pattern 2

== Types of options

The fields representing your parameters can be of any type. Basic types (`Integer`, `Boolean`, etc...) are supported by default and you can write type converters to support any other type (`File`, etc...).
The fields representing your parameters can be of any type. Basic types (`Integer`, `Boolean`, `Enum`, etc...) are supported by default and you can write type converters to support any other type (custom types, etc...).

In fact, JCommander provides a rather comprehensive set of built-in conversions for commonly used special types, just to name the most notable ones (list is incomplete): `char[]`, `File`, `Path`, `URI`, `URL`, `InetAddress`, `Date` (ISO 8601).


=== Boolean

Expand Down
7 changes: 5 additions & 2 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -886,7 +886,10 @@ <h2 id="_overview">1. Overview</h2>
<h2 id="_types_of_options">2. Types of options</h2>
<div class="sectionbody">
<div class="paragraph">
<p>The fields representing your parameters can be of any type. Basic types (<code>Integer</code>, <code>Boolean</code>, etc&#8230;&#8203;) are supported by default and you can write type converters to support any other type (<code>File</code>, etc&#8230;&#8203;).</p>
<p>The fields representing your parameters can be of any type. Basic types (<code>Integer</code>, <code>Boolean</code>, <code>Enum</code>, etc&#8230;&#8203;) are supported by default and you can write type converters to support any other type (custom types, etc&#8230;&#8203;).</p>
</div>
<div class="paragraph">
<p>In fact, JCommander provides a rather comprehensive set of built-in conversions for commonly used special types, just to name the most notable ones (list is incomplete): <code>char[]</code>, <code>File</code>, <code>Path</code>, <code>URI</code>, <code>URL</code>, <code>InetAddress</code>, <code>Date</code> (ISO 8601).</p>
</div>
<div class="sect2">
<h3 id="_boolean">2.1. Boolean</h3>
Expand Down Expand Up @@ -2184,7 +2187,7 @@ <h2 id="_download">29. Download</h2>
</div>
<div id="footer">
<div id="footer-text">
Last updated 2023-08-24 12:53:02 UTC
Last updated 2023-08-24 15:23:05 UTC
</div>
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/prettify/r298/run_prettify.min.js"></script>
Expand Down

0 comments on commit 748ddba

Please sign in to comment.