Skip to content

Commit

Permalink
Add small example.
Browse files Browse the repository at this point in the history
  • Loading branch information
garydgregory committed Nov 20, 2016
1 parent ffc17ba commit 49f851c
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,15 @@ Feel free to submit a pull-request and examine the [sources](https://github.com/
[![Coverage Status](https://coveralls.io/repos/github/garydgregory/jcommander-addons/badge.svg?branch=master)](https://coveralls.io/github/garydgregory/jcommander-addons?branch=master)
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.garygregory/jcommander-addons/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.garygregory/jcommander-addons)

## Example

To convert a command line argument into a Duration object, you write:

```
@Parameter(names = { "--duration" }, converter = DurationConverter.class)
private Duration duration;
```

## Converters
Converters include:

Expand Down

0 comments on commit 49f851c

Please sign in to comment.