Modifier and Type | Field and Description |
---|---|
private String |
mAssociatedJob
The jobname for which the reading was taken.
|
private boolean |
mCleanupSpace
Indicates whether the space denoted is the amount of space
cleaned up.
|
private Date |
mDate
Holds the timestamp when usage was taken.
|
private int |
mIndex
index to do conversions between units.
|
private float |
mSize
The size.
|
private char |
mUnit
The units in which the size is stored.
|
Constructor and Description |
---|
Space(Date d)
The overloaded constructor.
|
Space(Date d,
String size)
The overloaded constructor.
|
Modifier and Type | Method and Description |
---|---|
Object |
clone()
Returns the clone of the object.
|
String |
getAssociatedJob()
Returns the associated job.
|
boolean |
getCleanupFlag()
Returns boolean indicating whether the space denoted is the amount cleaned
or not.
|
Date |
getDate()
Returns the time at which Space was record.
|
private int |
getIndex()
Returns the index for the associated unit.
|
private int |
getIndex(char u)
Returns the index for a unit.
|
private float |
getMultiplyingFactor(int base,
int power)
Returns multiplying factor for conversion.
|
float |
getSize()
Returns the size in the units associated with it.
|
float |
getSize(char u)
Returns the size in particular unit.
|
char |
getUnits()
Returns the units associated with the size.
|
void |
setAssociatedJob(String job)
Sets the associated job for which the reading was taken.
|
void |
setCleanupFlag(boolean cleanup)
Sets boolean indicating that space denoted is the amount cleaned.
|
void |
setSize(float size,
char unit)
Sets the size.
|
void |
setSize(String size)
Sets the size.
|
String |
toString()
Returns a textual description of the content
|
boolean |
validUnit(char c)
Returns if a character is a valid unit or not
|
private Date mDate
private float mSize
private char mUnit
private int mIndex
private boolean mCleanupSpace
private String mAssociatedJob
public Space(Date d)
d
- the date.public void setCleanupFlag(boolean cleanup)
cleanup
- boolean indicating that value is cleaned up.public void setAssociatedJob(String job)
job
- the associated job.public String getAssociatedJob()
public boolean getCleanupFlag()
public void setSize(float size, char unit)
size
- the size optionally with the units.unit
- the unit of the sizepublic void setSize(String size)
size
- the size optionally with the units.public Date getDate()
public float getSize()
public float getSize(char u)
u
- the unit.public char getUnits()
public boolean validUnit(char c)
c
- the unitpublic String toString()
public Object clone()
private int getIndex()
private int getIndex(char u)
u
- the unitprivate float getMultiplyingFactor(int base, int power)
base
- power
- the power to raise the base to.Copyright © 2011 The University of Southern California. All Rights Reserved.