|
Scala IPv4 0.1 API
|
|
be/jvb/iptypes/IpAddress.scala]
class
IpAddress(val value : Long)
extends be.jvb.iptypes.SmallByteArrayvalue - 32bit value of the ip address (only 32 least significant bits are used)| Additional Constructor Summary | |
def
|
this
(address : java.lang.String) : IpAddress
Construct from a CIDR format string representation (e.g. "192.168.0.1").
|
def
|
this
(inetAddress : java.net.InetAddress) : IpAddress
Construct from a java.net.InetAddress.
|
| Values and Variables inherited from be.jvb.iptypes.SmallByteArray | |
| be.jvb.iptypes.SmallByteArray.maxValue |
| Method Summary | |
def
|
+
(value : Long) : IpAddress
Addition. Will never overflow, but wraps around when the highest ip address has been reached.
|
def
|
-
(value : Long) : IpAddress
Substraction. Will never underflow, but wraps around when the lowest ip address has been reached.
|
protected def
|
nBytes
: Int
How many bytes do we use (max 8).
|
protected def
|
radix
: be.jvb.iptypes.DEC
In what radix do we represent the bytes when converting to a string.
|
def
|
toInetAddress
: java.net.InetAddress
Convert to java.net.InetAddress.
|
| Methods inherited from scala.Ordered | |
| scala.Ordered.<, scala.Ordered.>, scala.Ordered.<=, scala.Ordered.>=, scala.Ordered.compareTo |
| Methods inherited from AnyRef | |
| getClass, clone, notify, notifyAll, wait, wait, wait, finalize, ==, !=, eq, ne, synchronized |
| Methods inherited from Any | |
| ==, !=, isInstanceOf, asInstanceOf |
| Additional Constructor Details |
def
this(address : java.lang.String) : IpAddress
def
this(inetAddress : java.net.InetAddress) : IpAddress
| Method Details |
protected
def
nBytes : Int
protected
def
radix : be.jvb.iptypes.DEC
def
toInetAddress : java.net.InetAddress
|
Scala IPv4 0.1 API
|
|