@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (!sameClassAs(obj)) { return false; } DocumentSource other = (DocumentSource) obj; return eq(type, other.type) && eq(url, other.url); }
/** * Returns whether it has the url. * * @return whether it has the url */ public boolean hasUrl() { return getUrl() != null; }
/** * Immutable constructor. * * @param type type. * @param url url. */ public DocumentSource(Type type, String url) { super(); setType(type); setUrl(url); setImmutable(true); }
/** * Sets the url. * * @param url url or <code>null</code> to reset */ public void setUrl(String url) { throwExceptionIfImmutable(); this.url = url; }
/** * Returns whether it has the type. * * @return whether it has the type */ public boolean hasType() { return getType() != null; }
/** * Sets the type. * * @param type type or <code>null</code> to reset */ public void setType(Type type) { throwExceptionIfImmutable(); this.type = type; }
/** * Returns whether it has the type. * * @return whether it has the type */ public boolean hasType() { return getType() != null; }
/** * Immutable constructor. * * @param type type. * @param url url. */ public DocumentSource(Type type, String url) { super(); setType(type); setUrl(url); setImmutable(true); }
@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (!sameClassAs(obj)) { return false; } DocumentSource other = (DocumentSource) obj; return eq(type, other.type) && eq(url, other.url); }
/** * Sets the url. * * @param url url or <code>null</code> to reset */ public void setUrl(String url) { throwExceptionIfImmutable(); this.url = url; }
/** * Returns whether it has the url. * * @return whether it has the url */ public boolean hasUrl() { return getUrl() != null; }
/** * Sets the type. * * @param type type or <code>null</code> to reset */ public void setType(Type type) { throwExceptionIfImmutable(); this.type = type; }