mirror of
https://github.com/lightbend/config.git
synced 2025-03-22 07:10:23 +08:00
Add since 1.3.0 tags to the new ConfigMemorySize methods
This commit is contained in:
parent
97718593c6
commit
51f05d9927
@ -593,6 +593,8 @@ public interface Config extends ConfigMergeable {
|
|||||||
* href="https://github.com/typesafehub/config/blob/master/HOCON.md">the
|
* href="https://github.com/typesafehub/config/blob/master/HOCON.md">the
|
||||||
* spec</a>.
|
* spec</a>.
|
||||||
*
|
*
|
||||||
|
* @since 1.3.0
|
||||||
|
*
|
||||||
* @param path
|
* @param path
|
||||||
* path expression
|
* path expression
|
||||||
* @return the value at the requested path, in bytes
|
* @return the value at the requested path, in bytes
|
||||||
@ -706,6 +708,15 @@ public interface Config extends ConfigMergeable {
|
|||||||
|
|
||||||
List<Long> getBytesList(String path);
|
List<Long> getBytesList(String path);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets a list, converting each value in the list to a memory size, using the
|
||||||
|
* same rules as {@link #getMemorySize(String)}.
|
||||||
|
*
|
||||||
|
* @since 1.3.0
|
||||||
|
* @param path
|
||||||
|
* a path expression
|
||||||
|
* @return list of memory sizes
|
||||||
|
*/
|
||||||
List<ConfigMemorySize> getMemorySizeList(String path);
|
List<ConfigMemorySize> getMemorySizeList(String path);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -7,6 +7,8 @@ package com.typesafe.config;
|
|||||||
* An immutable class representing an amount of memory. Use
|
* An immutable class representing an amount of memory. Use
|
||||||
* static factory methods such as {@link
|
* static factory methods such as {@link
|
||||||
* ConfigMemorySize#ofBytes(long)} to create instances.
|
* ConfigMemorySize#ofBytes(long)} to create instances.
|
||||||
|
*
|
||||||
|
* @since 1.3.0
|
||||||
*/
|
*/
|
||||||
public final class ConfigMemorySize {
|
public final class ConfigMemorySize {
|
||||||
private final long bytes;
|
private final long bytes;
|
||||||
@ -20,6 +22,7 @@ public final class ConfigMemorySize {
|
|||||||
/**
|
/**
|
||||||
* Constructs a ConfigMemorySize representing the given
|
* Constructs a ConfigMemorySize representing the given
|
||||||
* number of bytes.
|
* number of bytes.
|
||||||
|
* @since 1.3.0
|
||||||
*/
|
*/
|
||||||
public static ConfigMemorySize ofBytes(long bytes) {
|
public static ConfigMemorySize ofBytes(long bytes) {
|
||||||
return new ConfigMemorySize(bytes);
|
return new ConfigMemorySize(bytes);
|
||||||
@ -27,6 +30,7 @@ public final class ConfigMemorySize {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the size in bytes.
|
* Gets the size in bytes.
|
||||||
|
* @since 1.3.0
|
||||||
*/
|
*/
|
||||||
public long toBytes() {
|
public long toBytes() {
|
||||||
return bytes;
|
return bytes;
|
||||||
|
Loading…
Reference in New Issue
Block a user