Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.neo4j.helpers
Class Args

    java.lang.Object
      org.neo4j.helpers.Args

    public class Args

extends Object

Parses a String[] argument from a main-method. It expects values to be either key/value pairs or just "orphan" values (w/o a key associated).

A key is defined with one or more dashes in the beginning, for example:

       '-path'
       '--path'

A key/value pair can be either one single String from the array where there's a '=' delimiter between the key and value, like so:

       '--path=/my/path/to/something'

...or consist of two (consecutive) strings from the array, like so:

       '-path' '/my/path/to/something'

Constructor Summary
`Args(String[] args)`

Method Summary
`Map<String,String>` | `asMap()`
`String` | `get(String key, String defaultValue)`
`Boolean` | `getBoolean(String key, Boolean defaultValue)`
`Boolean` | `getBoolean(String key, Boolean defaultValueIfNotFound, Boolean defaultValueIfNoValue)`
`Number` | `getNumber(String key, Number defaultValue)`
`boolean` | `has(String key)`
`List<String>` | `orphans()`
`String[]` | `source()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### Args

    public Args(String[] args)

Method Detail

### source

    public String[] source()

### asMap

    public Map<String,String> asMap()

### has

    public boolean has(String key)

### get

    public String get(String key,
                      String defaultValue)

### getNumber

    public Number getNumber(String key,
                            Number defaultValue)

### getBoolean

    public Boolean getBoolean(String key,
                              Boolean defaultValue)

### getBoolean

    public Boolean getBoolean(String key,
                              Boolean defaultValueIfNotFound,
                              Boolean defaultValueIfNoValue)

### orphans

    public List<String> orphans()

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2011 The Neo4j Graph Database Project. All Rights Reserved.