|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectgps.protocol.Document
public class Document
Document base class, all specific protocol documents inherit from it.
| Field Summary | |
|---|---|
static int |
EMPTY
possible document status: EMPTY, WHOLE, PARTIAL |
static java.util.HashMap |
mDocumentListbyID
Document List by ID, each id only has one documents |
static java.util.HashMap |
mDocumentListbyKey
Document List by Key, each key may has more than one documents |
static int |
PARTIAL
possible document status: EMPTY, WHOLE, PARTIAL |
static int |
WHOLE
possible document status: EMPTY, WHOLE, PARTIAL |
| Constructor Summary | |
|---|---|
Document()
constructs a Document object with next available id |
|
Document(int id)
constructs a Document object with a given id |
|
| Method Summary | |
|---|---|
int |
getID()
|
java.lang.String |
getKey()
|
static int |
getNextAvailableID()
get next available id, and self increase |
int |
getPopularity()
|
double |
getSize()
|
int |
getStatus()
|
boolean |
isEmpty()
|
boolean |
isWhole()
|
static void |
reset()
clear all the documents in the system |
void |
setKey(java.lang.String newKey)
|
void |
setPopularity(int p)
|
void |
setSize(double newSize)
|
void |
setStatus(int s)
|
void |
setWhole()
|
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static java.util.HashMap mDocumentListbyID
public static java.util.HashMap mDocumentListbyKey
public static final int EMPTY
public static final int WHOLE
public static final int PARTIAL
| Constructor Detail |
|---|
public Document()
public Document(int id)
| Method Detail |
|---|
public static int getNextAvailableID()
public static void reset()
public void setKey(java.lang.String newKey)
public java.lang.String getKey()
public int getID()
public void setSize(double newSize)
public double getSize()
public void setWhole()
public void setStatus(int s)
public int getStatus()
public boolean isWhole()
public boolean isEmpty()
public int getPopularity()
public void setPopularity(int p)
public java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||