Skip to content

Instantly share code, notes, and snippets.

@spaceCamel
Created March 20, 2014 12:16
Show Gist options
  • Save spaceCamel/9662474 to your computer and use it in GitHub Desktop.
Save spaceCamel/9662474 to your computer and use it in GitHub Desktop.
A Uri interface
interface Uri
{
String getScheme()
Uri.Hierarchy getHierarchy()
Optional<String> getQuery()
Optional<String> getFragment()
interface Hierarchy
{
Optional<Uri.Authority> getAuthority()
String getPath()
}
interface Authority
{
Optional<String> getUserinfo()
String getHost()
Optional<Integer> getPort()
}
}
@spaceCamel
Copy link
Author

Modeled after this description: https://en.wikipedia.org/wiki/URI_scheme

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment