Class UriUtils

java.lang.Object
com.castlabs.utils.UriUtils

public class UriUtils extends Object
Provides helpers and utilities for Uris.
Since:
3.2.0
  • Constructor Details

    • UriUtils

      public UriUtils()
  • Method Details

    • getLca

      @Nullable public static Uri getLca(@NonNull Uri inV, @NonNull Uri inW)
      Returns the least common ancestor of th two Uri's. Note that calculations are only done on the path elements of the Uri.
      Parameters:
      inV - first Uri
      inW - second Uri
      Returns:
      The least common ancestor
    • parent

      public static Uri parent(Uri uri)
      Get the parent of the given Uri by walking up the path segments one element.
      Parameters:
      uri - The Uri
      Returns:
      The parent Uri