com.android.sdklib.devices
Class Storage
java.lang.Object
com.android.sdklib.devices.Storage
public class Storage
- extends java.lang.Object
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Storage
public Storage(long amount,
Storage.Unit unit)
Storage
public Storage(long amount)
getSize
public long getSize()
- Returns the amount of storage represented, in Bytes
deepCopy
@NonNull
public Storage deepCopy()
getSizeAsUnit
public long getSizeAsUnit(@NonNull
Storage.Unit unit)
- Return the amount of storage represented by the instance in the given unit
- Parameters:
unit
- The unit of the result.
- Returns:
- The size of the storage in the given unit.
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in class java.lang.Object
hashCode
public int hashCode()
- Overrides:
hashCode
in class java.lang.Object
getAppropriateUnits
@NonNull
public Storage.Unit getAppropriateUnits()
- Finds the largest
Storage.Unit
which can display the storage value as a positive integer
with no loss of accuracy.
- Returns:
- The most appropriate
Storage.Unit
.
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object