public class Network extends Network
Constructor and Description |
---|
Network(String networkInterface)
Instantiates a
Network . |
Modifier and Type | Method and Description |
---|---|
NetworkCapabilities |
getCapabilities()
Gets the capabilities.
|
String |
getNetworkInterface()
Gets the network Interface.
|
boolean |
isAvailable()
Checks whether the network is available.
|
boolean |
isInitialised()
Checks whether the network is initialised.
|
boolean |
isPresent()
Gets the isPresent.
|
void |
setAvailable(boolean available)
Sets whether the network is available.
|
void |
setCapabilities(NetworkCapabilities capabilities)
Sets the capabilities.
|
void |
setPresent(boolean isPresent)
Sets the isPresent.
|
boolean |
willChanged(boolean available)
Checks whether the network will change or has not been initialised yet.
|
boolean |
willChanged(NetworkCapabilities capabilities)
Checks if the Network state will change if set a new capability.
|
public NetworkCapabilities getCapabilities()
public String getNetworkInterface()
public boolean isAvailable()
public boolean isInitialised()
true
if the network is initialised.public boolean isPresent()
public void setAvailable(boolean available)
available
- the availability.public void setCapabilities(NetworkCapabilities capabilities)
capabilities
- the capabilities to set, cannot be null
.public void setPresent(boolean isPresent)
isPresent
- the isPresent to set.public boolean willChanged(boolean available)
available
- the new state.true
if the network status change.public boolean willChanged(NetworkCapabilities capabilities)
capabilities
- the new capabilities, cannot be null
.true
if it will change.