Add since 1.3.0 tags to the new ConfigMemorySize methods

This commit is contained in:
Havoc Pennington 2015-02-25 21:25:31 -05:00
parent 97718593c6
commit 51f05d9927
2 changed files with 15 additions and 0 deletions

View File

@ -593,6 +593,8 @@ public interface Config extends ConfigMergeable {
* href="https://github.com/typesafehub/config/blob/master/HOCON.md">the
* spec</a>.
*
* @since 1.3.0
*
* @param path
* path expression
* @return the value at the requested path, in bytes
@ -706,6 +708,15 @@ public interface Config extends ConfigMergeable {
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);
/**

View File

@ -7,6 +7,8 @@ package com.typesafe.config;
* An immutable class representing an amount of memory. Use
* static factory methods such as {@link
* ConfigMemorySize#ofBytes(long)} to create instances.
*
* @since 1.3.0
*/
public final class ConfigMemorySize {
private final long bytes;
@ -20,6 +22,7 @@ public final class ConfigMemorySize {
/**
* Constructs a ConfigMemorySize representing the given
* number of bytes.
* @since 1.3.0
*/
public static ConfigMemorySize ofBytes(long bytes) {
return new ConfigMemorySize(bytes);
@ -27,6 +30,7 @@ public final class ConfigMemorySize {
/**
* Gets the size in bytes.
* @since 1.3.0
*/
public long toBytes() {
return bytes;