NavGraphKt
public final class NavGraphKt
Summary
Public methods |
|
|---|---|
static final boolean |
Returns |
static final boolean |
Returns |
static final boolean |
Returns |
static final boolean |
Returns |
static final @NonNull NavDestination |
Returns the destination with |
static final @NonNull NavDestination |
Returns the destination with |
static final @NonNull NavDestination |
Returns the destination with |
static final @NonNull NavDestination |
Returns the destination with |
static final void |
minusAssign(@NonNull NavGraph receiver, @NonNull NavDestination node)Removes |
static final void |
plusAssign(@NonNull NavGraph receiver, @NonNull NavDestination node)Adds a destination to this NavGraph. |
static final void |
plusAssign(@NonNull NavGraph receiver, @NonNull NavGraph other)Add all destinations from another collection to this one. |
Public methods
contains
public static final boolean contains(@NonNull NavGraph receiver, @IdRes int id)
Returns true if a destination with id is found in this navigation graph.
contains
public static final boolean <T extends Object> contains(
@NonNull NavGraph receiver,
@NonNull KClass<@NonNull T> route
)
Returns true if a destination with route is found in this navigation graph.
contains
public static final boolean contains(@NonNull NavGraph receiver, @NonNull String route)
Returns true if a destination with route is found in this navigation graph.
contains
public static final boolean <T extends Object> contains(@NonNull NavGraph receiver, @NonNull T route)
Returns true if a destination with route is found in this navigation graph.
get
public static final @NonNull NavDestination get(@NonNull NavGraph receiver, @IdRes int id)
Returns the destination with id.
| Throws | |
|---|---|
kotlin.IllegalArgumentException |
if no destination is found with that id. |
get
public static final @NonNull NavDestination <T extends Object> get(@NonNull NavGraph receiver, @NonNull KClass<@NonNull T> route)
Returns the destination with route from KClass.
| Throws | |
|---|---|
kotlin.IllegalArgumentException |
if no destination is found with that route. |
get
public static final @NonNull NavDestination get(@NonNull NavGraph receiver, @NonNull String route)
Returns the destination with route.
| Throws | |
|---|---|
kotlin.IllegalArgumentException |
if no destination is found with that route. |
get
public static final @NonNull NavDestination <T extends Object> get(@NonNull NavGraph receiver, @NonNull T route)
Returns the destination with route from an Object.
| Throws | |
|---|---|
kotlin.IllegalArgumentException |
if no destination is found with that route. |
minusAssign
public static final void minusAssign(@NonNull NavGraph receiver, @NonNull NavDestination node)
Removes node from this navigation graph.
plusAssign
public static final void plusAssign(@NonNull NavGraph receiver, @NonNull NavDestination node)
Adds a destination to this NavGraph. The destination must have an id set.
The destination must not have a parent set. If the destination is already part of a NavGraph, call NavGraph.remove before calling this method.
| Parameters | |
|---|---|
@NonNull NavDestination node |
destination to add |
plusAssign
public static final void plusAssign(@NonNull NavGraph receiver, @NonNull NavGraph other)
Add all destinations from another collection to this one. As each destination has at most one parent, the destinations will be removed from the given NavGraph.