- 28,932 files - Full Java source code - Smali files - Resources Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
66 lines
2.2 KiB
Java
66 lines
2.2 KiB
Java
package com.google.firebase.perf.util;
|
|
|
|
import android.support.v4.media.session.PlaybackStateCompat;
|
|
|
|
/* loaded from: classes3.dex */
|
|
public enum StorageUnit {
|
|
TERABYTES(1099511627776L) { // from class: com.google.firebase.perf.util.StorageUnit.1
|
|
@Override // com.google.firebase.perf.util.StorageUnit
|
|
public long convert(long j, StorageUnit storageUnit) {
|
|
return storageUnit.toTerabytes(j);
|
|
}
|
|
},
|
|
GIGABYTES(1073741824) { // from class: com.google.firebase.perf.util.StorageUnit.2
|
|
@Override // com.google.firebase.perf.util.StorageUnit
|
|
public long convert(long j, StorageUnit storageUnit) {
|
|
return storageUnit.toGigabytes(j);
|
|
}
|
|
},
|
|
MEGABYTES(PlaybackStateCompat.ACTION_SET_CAPTIONING_ENABLED) { // from class: com.google.firebase.perf.util.StorageUnit.3
|
|
@Override // com.google.firebase.perf.util.StorageUnit
|
|
public long convert(long j, StorageUnit storageUnit) {
|
|
return storageUnit.toMegabytes(j);
|
|
}
|
|
},
|
|
KILOBYTES(PlaybackStateCompat.ACTION_PLAY_FROM_MEDIA_ID) { // from class: com.google.firebase.perf.util.StorageUnit.4
|
|
@Override // com.google.firebase.perf.util.StorageUnit
|
|
public long convert(long j, StorageUnit storageUnit) {
|
|
return storageUnit.toKilobytes(j);
|
|
}
|
|
},
|
|
BYTES(1) { // from class: com.google.firebase.perf.util.StorageUnit.5
|
|
@Override // com.google.firebase.perf.util.StorageUnit
|
|
public long convert(long j, StorageUnit storageUnit) {
|
|
return storageUnit.toBytes(j);
|
|
}
|
|
};
|
|
|
|
long numBytes;
|
|
|
|
public abstract long convert(long j, StorageUnit storageUnit);
|
|
|
|
public long toBytes(long j) {
|
|
return j * this.numBytes;
|
|
}
|
|
|
|
StorageUnit(long j) {
|
|
this.numBytes = j;
|
|
}
|
|
|
|
public long toKilobytes(long j) {
|
|
return (j * this.numBytes) / KILOBYTES.numBytes;
|
|
}
|
|
|
|
public long toMegabytes(long j) {
|
|
return (j * this.numBytes) / MEGABYTES.numBytes;
|
|
}
|
|
|
|
public long toGigabytes(long j) {
|
|
return (j * this.numBytes) / GIGABYTES.numBytes;
|
|
}
|
|
|
|
public long toTerabytes(long j) {
|
|
return (j * this.numBytes) / TERABYTES.numBytes;
|
|
}
|
|
}
|