|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.openexchange.mail.Quota
public final class Quota
| Nested Class Summary | |
|---|---|
static class |
Quota.Type
Quota.Type - The quota resource type |
| Field Summary | |
|---|---|
static int |
UNLIMITED
Constant which indicates unlimited quota |
| Constructor Summary | |
|---|---|
Quota(long limit,
long usage,
Quota.Type type)
Initializes a new Quota |
|
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object obj)
|
long |
getLimit()
Gets the limit |
Quota.Type |
getType()
Gets the quota's resource type to which this quota limitation applies |
static Quota |
getUnlimitedQuota(Quota.Type type)
Gets constant for unlimited quota for specified resource type This is a convenience method that invokes Quota.Type.getUnlimited() for specified instance of Quota.Type. |
static Quota[] |
getUnlimitedQuotas(Quota.Type[] types)
Gets constants for unlimited quota for specified resource types This is a convenience method that invokes Quota.Type.getUnlimited() for each type in given array of Quota.Type. |
long |
getUsage()
Gets the usage |
int |
hashCode()
|
long[] |
toLongArray()
Returns a newly created array of long from this quota's limit and usage values. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int UNLIMITED
| Constructor Detail |
|---|
public Quota(long limit,
long usage,
Quota.Type type)
Quota
limit - The quota's limitusage - The quota's usagetype - The quota's resource type to which this quota limitation applies| Method Detail |
|---|
public static Quota getUnlimitedQuota(Quota.Type type)
This is a convenience method that invokes Quota.Type.getUnlimited() for specified instance of Quota.Type.
type - The resource type
public static Quota[] getUnlimitedQuotas(Quota.Type[] types)
This is a convenience method that invokes Quota.Type.getUnlimited() for each type in given array of Quota.Type.
types - The resource types
public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic long getLimit()
public long getUsage()
public Quota.Type getType()
public long[] toLongArray()
long from this quota's limit and usage values. Quota's limit is at index 0
and its usage is located at index 1.
long from this quota's limit and usage.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 | |||||||||