@Test public void authority() throws Exception { assertEquals("example.com", new LazyUri(new Precoded("http: assertEquals("example.com", new LazyUri(new Precoded("http: assertEquals("example.com", new LazyUri(new Precoded("http: assertEquals("example.com", new LazyUri(new Precoded("http: assertEquals("example.com", new LazyUri(new Precoded(" assertEquals("", new LazyUri(new Precoded("file: assertFalse(new LazyUri(new Precoded("mailto:test@example.com")).authority().isPresent()); assertFalse(new LazyUri(new Precoded("urn:isbn:3827370191")).authority().isPresent()); }
@Override public OptionalLazyAuthority authority() { if (mAuthority == null) { mAuthority = new OptionalLazyAuthority(mUriEncoded.subSequence(mOptionalScheme.parsedLength(), mUriEncoded.length())); } return mAuthority; }
LazyUri implements Uri { @Override public OptionalLazyAuthority authority() { if (mAuthority == null) { mAuthority = new OptionalLazyAuthority(mUriEncoded.subSequence(mOptionalScheme.parsedLength(), mUriEncoded.length())); } return mAuthority; } }
LazyUri implements Uri { @Override public OptionalLazyAuthority authority() { if (mAuthority == null) { mAuthority = new OptionalLazyAuthority(mUriEncoded.subSequence(mOptionalScheme.parsedLength(), mUriEncoded.length())); } return mAuthority; } LazyUri(UriEncoded uri); }
LazyUri implements Uri { @Override public OptionalLazyAuthority authority() { if (mAuthority == null) { mAuthority = new OptionalLazyAuthority(mUriEncoded.subSequence(mOptionalScheme.parsedLength(), mUriEncoded.length())); } return mAuthority; } LazyUri(UriEncoded uri); @Override Optional<? extends Scheme> scheme(); @Override OptionalLazyAuthority authority(); @Override LazyPath path(); @Override OptionalLazyQuery query(); @Override Optional<? extends Fragment> fragment(); @Override boolean isHierarchical(); @Override boolean isAbsolute(); }
LazyUri implements Uri { @Override public OptionalLazyAuthority authority() { if (mAuthority == null) { mAuthority = new OptionalLazyAuthority(mUriEncoded.subSequence(mOptionalScheme.parsedLength(), mUriEncoded.length())); } return mAuthority; } LazyUri(UriEncoded uri); @Override Optional<? extends Scheme> scheme(); @Override OptionalLazyAuthority authority(); @Override LazyPath path(); @Override OptionalLazyQuery query(); @Override Optional<? extends Fragment> fragment(); @Override boolean isHierarchical(); @Override boolean isAbsolute();  }