com.romansl.url.Host Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of purl Show documentation
Show all versions of purl Show documentation
URL builder based on pure functional principles. No side effects. Immutable. Thread-safe. Easy to use.
The newest version!
package com.romansl.url;
import java.io.IOException;
class Host extends URL {
private final String mName;
Host(final URL next, final String name) {
super(next);
mName = name;
}
@Override
public void store(final FinalURL storage) {
if (storage.mHost == null) {
storage.mHost = this;
}
}
@Override
protected void format(final Appendable out) throws IOException {
if (mName != null) {
out.append(mName);
}
}
@Override
String getStringContent() {
return mName == null ? "" : mName;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy