Interface IRI

All Known Implementing Classes:
IRI3986

public interface IRI
  • Method Details

    • str

      String str()
      The IRI in string form. This is guaranteed to parse to an equals IRI.
    • toString

      String toString()
      Human-readable appearance. Use str() to a string to use in code.
      Overrides:
      toString in class Object
    • hashCode

      int hashCode()
      Java hashCode.
      Overrides:
      hashCode in class Object
    • equals

      boolean equals(Object obj)
      Java equals. IRI implementations must provide value-based equality and hashCode. That is, two IRI objects with the same components are ".equals" and have the same ".hashCode". (Like java.lang.String where "same chars" means "equals".)

      Specifically, if two IRI objects are parsed from the same string or return the same "str()" they are .equals and also have the same .hashCode.

      Overrides:
      equals in class Object
    • hasScheme

      default boolean hasScheme()
    • scheme

      String scheme()
    • hasAuthority

      default boolean hasAuthority()
    • authority

      String authority()
    • hasUserInfo

      default boolean hasUserInfo()
    • userInfo

      String userInfo()
    • hasHost

      default boolean hasHost()
    • host

      String host()
    • hasPort

      default boolean hasPort()
    • port

      String port()
    • hasPath

      default boolean hasPath()
    • path

      String path()
    • pathSegments

      String[] pathSegments()
    • hasQuery

      default boolean hasQuery()
    • query

      String query()
    • hasFragment

      default boolean hasFragment()
    • fragment

      String fragment()
    • isAbsolute

      default boolean isAbsolute()
    • isRelative

      default boolean isRelative()
      RFC 3986, Section 4.2. This is not "! isAbsolute()".
    • isRootless

      default boolean isRootless()
      RFC 3986, Section 3. IRI has a scheme, no authority (no //) and is path-rootless (the path does not start with /) e.g. URN's.
    • isHierarchical

      default boolean isHierarchical()
    • normalize

      IRI normalize()