public class Connectivity
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static Connectivity |
create() |
static Connectivity |
create(android.content.Context context) |
static Connectivity |
create(android.net.NetworkInfo.State state,
int type,
java.lang.String name) |
boolean |
equals(java.lang.Object o) |
java.lang.String |
getName() |
android.net.NetworkInfo.State |
getState() |
int |
getType() |
int |
hashCode() |
static <any> |
hasState(android.net.NetworkInfo.State... states)
Filter, which returns true if at least one given state occurred
|
static <any> |
hasType(int... types)
Filter, which returns true if at least one given type occurred
|
boolean |
isDefault()
Checks if current connectivity is in default, disconnected state without information any
information about network type.
|
java.lang.String |
toString() |
public static Connectivity create()
public static Connectivity create(android.content.Context context)
public static Connectivity create(android.net.NetworkInfo.State state, int type, java.lang.String name)
public android.net.NetworkInfo.State getState()
public int getType()
public java.lang.String getName()
public static <any> hasState(android.net.NetworkInfo.State... states)
states - NetworkInfo.State, which can have one or more statespublic static <any> hasType(int... types)
types - int, which can have one or more typespublic boolean isDefault()
public java.lang.String toString()
toString in class java.lang.Objectpublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Object