Package org.onlab.util
Interface Bandwidth
-
- All Superinterfaces:
java.lang.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 Bandwidthadd(Bandwidth value)Returns a Bandwidth whose value is (this + value).doublebps()Returns bandwidth in bps.static Bandwidthbps(double bps)Creates a new instance with given bandwidth in bps.static Bandwidthbps(long bps)Creates a new instance with given bandwidth in bps.default intcompareTo(Bandwidth other)static Bandwidthgbps(double gbps)Creates a new instance with given bandwidth in Gbps.static Bandwidthgbps(long gbps)Creates a new instance with given bandwidth in Gbps.static BandwidthgBps(double gBps)Creates a new instance with given bandwidth in GBps.static BandwidthgBps(long gBps)Creates a new instance with given bandwidth in GBps.static Bandwidthkbps(double kbps)Creates a new instance with given bandwidth in Kbps.static Bandwidthkbps(long kbps)Creates a new instance with given bandwidth in Kbps.static BandwidthkBps(double kBps)Creates a new instance with given bandwidth in KBps.static BandwidthkBps(long kBps)Creates a new instance with given bandwidth in KBps.static Bandwidthmbps(double mbps)Creates a new instance with given bandwidth in Mbps.static Bandwidthmbps(long mbps)Creates a new instance with given bandwidth in Mbps.static BandwidthmBps(double mBps)Creates a new instance with given bandwidth in MBps.static BandwidthmBps(long mBps)Creates a new instance with given bandwidth in MBps.static Bandwidthof(double v, DataRateUnit unit)Creates a new instance with given bandwidth.static Bandwidthof(long v, DataRateUnit unit)Creates a new instance with given bandwidth.default Bandwidthsubtract(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-DataRateUnitofv- Returns:
Bandwidthinstance with given bandwidth
-
of
static Bandwidth of(double v, DataRateUnit unit)
Creates a new instance with given bandwidth.- Parameters:
v- bandwidth valueunit-DataRateUnitofv- Returns:
Bandwidthinstance 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:
Bandwidthinstance 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:
Bandwidthinstance 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:
Bandwidthinstance 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:
Bandwidthinstance 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:
Bandwidthinstance 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:
Bandwidthinstance 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:
Bandwidthinstance 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:
Bandwidthinstance 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:
Bandwidthinstance 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:
Bandwidthinstance 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:
Bandwidthinstance 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:
Bandwidthinstance 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:
Bandwidthinstance 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:
Bandwidthinstance 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
-
-