Package org.onlab.util
Interface Bandwidth
-
- All Superinterfaces:
Comparable<Bandwidth>
,RichComparable<Bandwidth>
public interface Bandwidth extends RichComparable<Bandwidth>
Representation of bandwidth. Use the static factory method corresponding to the unit (like Kbps) you desire on instantiation.
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default Bandwidth
add(Bandwidth value)
Returns a Bandwidth whose value is (this + value).double
bps()
Returns bandwidth in bps.static Bandwidth
bps(double bps)
Creates a new instance with given bandwidth in bps.static Bandwidth
bps(long bps)
Creates a new instance with given bandwidth in bps.default int
compareTo(Bandwidth other)
static Bandwidth
gbps(double gbps)
Creates a new instance with given bandwidth in Gbps.static Bandwidth
gbps(long gbps)
Creates a new instance with given bandwidth in Gbps.static Bandwidth
gBps(double gBps)
Creates a new instance with given bandwidth in GBps.static Bandwidth
gBps(long gBps)
Creates a new instance with given bandwidth in GBps.static Bandwidth
kbps(double kbps)
Creates a new instance with given bandwidth in Kbps.static Bandwidth
kbps(long kbps)
Creates a new instance with given bandwidth in Kbps.static Bandwidth
kBps(double kBps)
Creates a new instance with given bandwidth in KBps.static Bandwidth
kBps(long kBps)
Creates a new instance with given bandwidth in KBps.static Bandwidth
mbps(double mbps)
Creates a new instance with given bandwidth in Mbps.static Bandwidth
mbps(long mbps)
Creates a new instance with given bandwidth in Mbps.static Bandwidth
mBps(double mBps)
Creates a new instance with given bandwidth in MBps.static Bandwidth
mBps(long mBps)
Creates a new instance with given bandwidth in MBps.static Bandwidth
of(double v, DataRateUnit unit)
Creates a new instance with given bandwidth.static Bandwidth
of(long v, DataRateUnit unit)
Creates a new instance with given bandwidth.default Bandwidth
subtract(Bandwidth value)
Returns a Bandwidth whose value is (this - value).-
Methods inherited from interface org.onlab.util.RichComparable
isGreaterThan, isLessThan
-
-
-
-
Method Detail
-
of
static Bandwidth of(long v, DataRateUnit unit)
Creates a new instance with given bandwidth.- Parameters:
v
- bandwidth valueunit
-DataRateUnit
ofv
- Returns:
Bandwidth
instance with given bandwidth
-
of
static Bandwidth of(double v, DataRateUnit unit)
Creates a new instance with given bandwidth.- Parameters:
v
- bandwidth valueunit
-DataRateUnit
ofv
- Returns:
Bandwidth
instance with given bandwidth
-
bps
static Bandwidth bps(long bps)
Creates a new instance with given bandwidth in bps.- Parameters:
bps
- bandwidth value to be assigned- Returns:
Bandwidth
instance with given bandwidth
-
bps
static Bandwidth bps(double bps)
Creates a new instance with given bandwidth in bps.- Parameters:
bps
- bandwidth value to be assigned- Returns:
Bandwidth
instance with given bandwidth
-
kbps
static Bandwidth kbps(long kbps)
Creates a new instance with given bandwidth in Kbps.- Parameters:
kbps
- bandwidth value to be assigned- Returns:
Bandwidth
instance with given bandwidth
-
kbps
static Bandwidth kbps(double kbps)
Creates a new instance with given bandwidth in Kbps.- Parameters:
kbps
- bandwidth value to be assigned- Returns:
Bandwidth
instance with given bandwidth
-
kBps
static Bandwidth kBps(long kBps)
Creates a new instance with given bandwidth in KBps.- Parameters:
kBps
- bandwidth value to be assigned- Returns:
Bandwidth
instance with given bandwidth
-
kBps
static Bandwidth kBps(double kBps)
Creates a new instance with given bandwidth in KBps.- Parameters:
kBps
- bandwidth value to be assigned- Returns:
Bandwidth
instance with given bandwidth
-
mbps
static Bandwidth mbps(long mbps)
Creates a new instance with given bandwidth in Mbps.- Parameters:
mbps
- bandwidth value to be assigned- Returns:
Bandwidth
instance with given bandwidth
-
mbps
static Bandwidth mbps(double mbps)
Creates a new instance with given bandwidth in Mbps.- Parameters:
mbps
- bandwidth value to be assigned- Returns:
Bandwidth
instance with given bandwidth
-
mBps
static Bandwidth mBps(long mBps)
Creates a new instance with given bandwidth in MBps.- Parameters:
mBps
- bandwidth value to be assigned- Returns:
Bandwidth
instance with given bandwidth
-
mBps
static Bandwidth mBps(double mBps)
Creates a new instance with given bandwidth in MBps.- Parameters:
mBps
- bandwidth value to be assigned- Returns:
Bandwidth
instance with given bandwidth
-
gbps
static Bandwidth gbps(long gbps)
Creates a new instance with given bandwidth in Gbps.- Parameters:
gbps
- bandwidth value to be assigned- Returns:
Bandwidth
instance with given bandwidth
-
gbps
static Bandwidth gbps(double gbps)
Creates a new instance with given bandwidth in Gbps.- Parameters:
gbps
- bandwidth value to be assigned- Returns:
Bandwidth
instance with given bandwidth
-
gBps
static Bandwidth gBps(long gBps)
Creates a new instance with given bandwidth in GBps.- Parameters:
gBps
- bandwidth value to be assigned- Returns:
Bandwidth
instance with given bandwidth
-
gBps
static Bandwidth gBps(double gBps)
Creates a new instance with given bandwidth in GBps.- Parameters:
gBps
- bandwidth value to be assigned- Returns:
Bandwidth
instance with given bandwidth
-
bps
double bps()
Returns bandwidth in bps.- Returns:
- bandwidth in bps.
-
add
default Bandwidth add(Bandwidth value)
Returns a Bandwidth whose value is (this + value).- Parameters:
value
- value to be added to this Frequency- Returns:
- this + value
-
subtract
default Bandwidth subtract(Bandwidth value)
Returns a Bandwidth whose value is (this - value).- Parameters:
value
- value to be added to this Frequency- Returns:
- this - value
-
compareTo
default int compareTo(Bandwidth other)
- Specified by:
compareTo
in interfaceComparable<Bandwidth>
-
-