
io.helidon.build.javadoc.OfflineLink Maven / Gradle / Ivy
The newest version!
/*
* Copyright (c) 2023 Oracle and/or its affiliates.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.helidon.build.javadoc;
import java.util.Objects;
/**
* A pair of url and location on disk for ({@code element-list} or {@code package-list}.
*/
@SuppressWarnings("unused")
public final class OfflineLink {
private String url;
private String location;
/**
* Get the location of the link.
*
* @return String
*/
public String getLocation() {
return this.location;
}
/**
* Get the url of the link.
*
* @return String
*/
public String getUrl() {
return this.url;
}
/**
* Set the location of the link.
*
* @param location a location object.
*/
public void setLocation(String location) {
this.location = location;
}
/**
* Set the url of the link.
*
* @param url a url object.
*/
public void setUrl(String url) {
this.url = url;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
OfflineLink that = (OfflineLink) o;
return Objects.equals(url, that.url) && Objects.equals(location, that.location);
}
@Override
public int hashCode() {
return Objects.hash(url, location);
}
@Override
public String toString() {
return String.format("url=%s, location=%s", url, location);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy