|
![]() |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.openpermis.policy.bean.SerialNumber
public final class SerialNumber
Serial number of a part.
Serial numbers are unique with respect to their context:
create()
creates a new serial number with a new context.next()
creates a new serial number in the same context.The serial number UNDEFINED
is a special serial number that does not have a
context. Use this serial number for parts that do not need to have a well-defined serial
number. Note that undefined serial numbers return an undefined serial number if they are
asked to create the next()
serial number.
Field Summary | |
---|---|
static SerialNumber |
UNDEFINED
Virtual serial number for parts that do not have a well-defined serial number. |
Method Summary | |
---|---|
static SerialNumber |
create()
Creates a new serial number which has its own numbering scheme. |
boolean |
equalContext(SerialNumber serial)
Checks if this serial number lies in the same context as the one specified. |
boolean |
equals(Object obj)
Compares another serial number to this one. |
int |
hashCode()
Return a hash code based on the value of this serial number. |
boolean |
isUndefined()
Checks if the value of this serial number is undefined. |
SerialNumber |
next()
Returns the next free serial number unique with respect to the context of this serial number. |
String |
toString()
Returns the hex representation of the value of this serial number. |
long |
value()
Returns the value of this serial number. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final SerialNumber UNDEFINED
This serial number cannot create new unique serial numbers, instead newly created serial numbers are undefined again.
next()
Method Detail |
---|
public static final SerialNumber create()
All serial numbers are unique in respect to the initial serial number created.
public SerialNumber next()
Undefined serial numbers return an undefined serial number as they have no context.
public long value()
public boolean isUndefined()
true
if the value of this serial number is undefined.public boolean equalContext(SerialNumber serial)
serial
- the serial number whose context is to be compared.
true
if the serial number specified and this serial number lie in the same
context, false
if they do not share the same context.public int hashCode()
hashCode
in class Object
public boolean equals(Object obj)
equals
in class Object
obj
- the serial number to compare to this one.
true
if both serial numbers have the same context and value.public String toString()
toString
in class Object
|
![]() |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
PERMIS Role Based Access Control 0.3.0 (Build 14)
2009/05/08 09:06:10
Copyright (c) 2002-2007 Ergon Informatik AG