|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.xnap.util.LinkType
public class LinkType
Provides a mapping between connection speed and common internet acces hardware.
Field Summary | |
---|---|
static LinkType |
CABLE
The cable link. |
static LinkType[] |
COMMON_TYPES
An array of common link types. |
static LinkType |
DSL
The DSL link. |
static LinkType |
ISDN
The ISDN link. |
static LinkType |
LAN
The local area network link. |
static LinkType |
MODEM
The modem link. |
static LinkType |
T3
The T3 link. |
static LinkType |
UNKNOWN
Unknown link type. |
Constructor Summary | |
---|---|
LinkType(java.lang.String type,
int speed)
Constructs a link speed object. |
Method Summary | |
---|---|
int |
compareTo(java.lang.Object o)
|
static int |
getIndexOfType(LinkType[] types,
int speed)
|
int |
getSpeed()
Returns the speed of the link type in kpbs. |
static LinkType |
getType(int speed)
Returns the common type that is closest to speed |
static LinkType |
getType(LinkType[] types,
int speed)
Returns the type that is closest to speed |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final LinkType UNKNOWN
public static final LinkType MODEM
public static final LinkType ISDN
public static final LinkType CABLE
public static final LinkType DSL
public static final LinkType T3
public static final LinkType LAN
public static final LinkType[] COMMON_TYPES
Constructor Detail |
---|
public LinkType(java.lang.String type, int speed)
type
- the name of the link type.speed
- the maximum speed of the link type in kbpsMethod Detail |
---|
public static int getIndexOfType(LinkType[] types, int speed)
public static LinkType getType(LinkType[] types, int speed)
speed
speed
- the speed of the link type in kbpspublic static LinkType getType(int speed)
speed
speed
- the speed of the link type in kbpspublic int getSpeed()
public int compareTo(java.lang.Object o)
compareTo
in interface java.lang.Comparable
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 |