|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.android.sdklib.internal.repository.updater.PkgItem
public class PkgItem
A PkgItem represents one main Package combined with its state
and an optional update package.
| Nested Class Summary | |
|---|---|
static class |
PkgItem.PkgState
The state of the a given PkgItem, that is the relationship between
a given remote package and the local repository. |
| Constructor Summary | |
|---|---|
PkgItem(Package mainPkg,
PkgItem.PkgState state)
Create a new PkgItem for this main package. |
|
| Method Summary | |
|---|---|
int |
compareTo(PkgItem pkg)
|
boolean |
equals(java.lang.Object obj)
Equality is defined as isSameItemAs(PkgItem): state, main package
and update package must be the similar. |
int |
getApi()
|
Archive[] |
getArchives()
|
java.lang.String |
getDescription()
|
Package |
getMainPackage()
|
java.lang.String |
getName()
|
FullRevision |
getRevision()
|
SdkSource |
getSource()
|
PkgItem.PkgState |
getState()
|
Package |
getUpdatePkg()
|
boolean |
hasArchive(Archive archive)
Returns true if this package or its updating packages contains the exact given archive. |
boolean |
hasCompatibleArchive()
Returns true if the main package has at least one archive compatible with the current platform. |
int |
hashCode()
|
boolean |
hasUpdatePkg()
|
boolean |
isChecked()
|
boolean |
isObsolete()
|
boolean |
isSameItemAs(PkgItem item)
Checks whether too PkgItem are the same. |
boolean |
isSameMainPackageAs(Package pkg)
Checks whether the main packages are of the same type and are not an update of each other and have the same revision number. |
boolean |
isSameUpdatePackageAs(Package pkg)
Checks whether the update packages are of the same type and are not an update of each other and have the same revision numbers. |
boolean |
mergeUpdate(Package pkg)
Check whether the 'pkg' argument is an update for this package. |
void |
removeUpdate()
|
void |
setChecked(boolean checked)
|
java.lang.String |
toString()
Returns a string representation of this item, useful when debugging. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public PkgItem(Package mainPkg,
PkgItem.PkgState state)
PkgItem for this main package.
The main package is final and cannot change since it's what "defines" this PkgItem.
The state or update package can change later.
| Method Detail |
|---|
public boolean isObsolete()
public boolean isChecked()
public void setChecked(boolean checked)
public Package getUpdatePkg()
public boolean hasUpdatePkg()
public java.lang.String getName()
public FullRevision getRevision()
public java.lang.String getDescription()
public Package getMainPackage()
public PkgItem.PkgState getState()
public SdkSource getSource()
public int getApi()
public Archive[] getArchives()
public int compareTo(PkgItem pkg)
compareTo in interface java.lang.Comparable<PkgItem>public boolean hasArchive(Archive archive)
public boolean hasCompatibleArchive()
public boolean isSameMainPackageAs(Package pkg)
public boolean isSameUpdatePackageAs(Package pkg)
public boolean isSameItemAs(PkgItem item)
PkgItem are the same.
This checks both items have the same state, both main package are similar
and that they have the same updating packages.
public boolean equals(java.lang.Object obj)
isSameItemAs(PkgItem): state, main package
and update package must be the similar.
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic boolean mergeUpdate(Package pkg)
public void removeUpdate()
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 | ||||||||