Package com.typesafe.config
Class ConfigMemorySize
- java.lang.Object
-
- com.typesafe.config.ConfigMemorySize
-
public final class ConfigMemorySize extends java.lang.Object
An immutable class representing an amount of memory. Use static factory methods such asofBytes(long)
to create instances.- Since:
- 1.3.0
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object other)
int
hashCode()
static ConfigMemorySize
ofBytes(long bytes)
Constructs a ConfigMemorySize representing the given number of bytes.long
toBytes()
Gets the size in bytes.java.lang.String
toString()
-
-
-
Method Detail
-
ofBytes
public static ConfigMemorySize ofBytes(long bytes)
Constructs a ConfigMemorySize representing the given number of bytes.- Parameters:
bytes
- a number of bytes- Returns:
- an instance representing the number of bytes
- Since:
- 1.3.0
-
toBytes
public long toBytes()
Gets the size in bytes.- Returns:
- how many bytes
- Since:
- 1.3.0
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object other)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-