|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.isi.pegasus.planner.visualize.spaceusage.Space
public class Space
A data class that stores the space usage.
| Field Summary | |
|---|---|
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 Summary | |
|---|---|
Space(Date d)
The overloaded constructor. |
|
Space(Date d,
String size)
The overloaded constructor. |
|
| Method Summary | |
|---|---|
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 |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private Date mDate
private float mSize
private char mUnit
private int mIndex
private boolean mCleanupSpace
private String mAssociatedJob
| Constructor Detail |
|---|
public Space(Date d)
d - the date.
public Space(Date d,
String size)
d - Datesize - the size with the last character denoting the unit.| Method Detail |
|---|
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 unit
public String toString()
toString in class Objectpublic Object clone()
clone in class Objectprivate int getIndex()
private int getIndex(char u)
u - the unit
private float getMultiplyingFactor(int base,
int power)
base - power - the power to raise the base to.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||