{title:'Reading Entries', updated:'9.0.0'}

Configuration files can contain entries for anything from primitive types up to complex hierarchies of POJOs consisting of maps, collections, and/or beans.

Entries are accessed via the {@link oaj.config.Config#get(String)} method which returns the following bean:

- {@link oaj.config.Entry}
  - Primary methods
    - {@link oaj.config.Entry#get() get()}
    - {@link oaj.config.Entry#isNotEmpty() isNotEmpty()}
    - {@link oaj.config.Entry#isPresent() isPresent()}
    - {@link oaj.config.Entry#orElse(String) orElse(String)}
    - {@link oaj.config.Entry#orElseGet(Supplier) orElseGet(Supplier)}
  - Conversion methods
    - {@link oaj.config.Entry#as(Class) as(Class)}
    - {@link oaj.config.Entry#as(Parser,Class) as(Parser,Class)}
    - {@link oaj.config.Entry#as(Parser,Type,Type...) as(Parser,Type,Type...)}
    - {@link oaj.config.Entry#as(Type,Type...) as(Type,Type...)}
    - {@link oaj.config.Entry#asBoolean() asBoolean()}
    - {@link oaj.config.Entry#asBytes() asBytes()}
    - {@link oaj.config.Entry#asDouble() asDouble()}
    - {@link oaj.config.Entry#asFloat() asFloat()}
    - {@link oaj.config.Entry#asInteger() asInteger()}
    - {@link oaj.config.Entry#asList() asList()}
    - {@link oaj.config.Entry#asList(Parser) asList(Parser)}
    - {@link oaj.config.Entry#asLong() asLong()}
    - {@link oaj.config.Entry#asMap() asMap()}
    - {@link oaj.config.Entry#asMap(Parser) asMap(Parser)}
    - {@link oaj.config.Entry#asString() asString()}
    - {@link oaj.config.Entry#asStringArray() asStringArray()}
  - Metadata methods
    - {@link oaj.config.Entry#getComment() getComment()}
    - {@link oaj.config.Entry#getKey() getKey()}
    - {@link oaj.config.Entry#getModifiers() getModifiers()}
    - {@link oaj.config.Entry#getPreLines() getPreLines()}
    - {@link oaj.config.Entry#getValue() getValue()}

The most common case for configuration values are primitives.

| # A string | key1 = foo | | # A boolean | key2 = true | | # An integer | key3 = 123 | | # A long | key4 = 10000000000 | | # Doubles | key5 = 6.67e−11 | key6 = Infinity

On integers and longs, "K", "M", and "G" can be used to identify kilo, mega, and giga.

| key1 = 100K # Same as 1024000 | key2 = 100M # Same as 104857600

Numbers can also use hexadecimal and octal notation:

| hex1 = 0x12FE | hex2 = 0X12FE | octal1 = 01234

Strings with newlines are treated as multi-line values that get broken into separate lines:

| key1 = This is a particularly long sentence that we want to split | onto separate lines.

Typically, multi-line values are started on the next line for clarity like so:

| key1 = | This is a particularly long sentence that we want to split | onto separate lines.