mirror of
https://github.com/lightbend/config.git
synced 2025-03-29 21:51:10 +08:00
Document double-to-int behavior, fixes #183
This commit is contained in:
parent
55bd472c24
commit
d57b0c093d
@ -472,6 +472,12 @@ public interface Config extends ConfigMergeable {
|
|||||||
Number getNumber(String path);
|
Number getNumber(String path);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Gets the integer at the given path. If the value at the
|
||||||
|
* path has a fractional (floating point) component, it
|
||||||
|
* will be discarded and only the integer part will be
|
||||||
|
* returned (it works like a "narrowing primitive conversion"
|
||||||
|
* in the Java language specification).
|
||||||
|
*
|
||||||
* @param path
|
* @param path
|
||||||
* path expression
|
* path expression
|
||||||
* @return the 32-bit integer value at the requested path
|
* @return the 32-bit integer value at the requested path
|
||||||
@ -484,6 +490,12 @@ public interface Config extends ConfigMergeable {
|
|||||||
int getInt(String path);
|
int getInt(String path);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Gets the long integer at the given path. If the value at
|
||||||
|
* the path has a fractional (floating point) component, it
|
||||||
|
* will be discarded and only the integer part will be
|
||||||
|
* returned (it works like a "narrowing primitive conversion"
|
||||||
|
* in the Java language specification).
|
||||||
|
*
|
||||||
* @param path
|
* @param path
|
||||||
* path expression
|
* path expression
|
||||||
* @return the 64-bit long value at the requested path
|
* @return the 64-bit long value at the requested path
|
||||||
|
Loading…
Reference in New Issue
Block a user