![JAR search and dependency download from the Maven repository](/logo.png)
org.apache.maven.settings.Proxy Maven / Gradle / Ivy
The newest version!
// =================== DO NOT EDIT THIS FILE ====================
// Generated by Modello Velocity from model-v3.vm
// template, any modifications will be overwritten.
// ==============================================================
package org.apache.maven.settings;
import java.io.Serializable;
import java.util.AbstractList;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Set;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import org.apache.maven.api.annotations.Generated;
import org.apache.maven.api.annotations.Nonnull;
@Generated
public class Proxy
extends IdentifiableBase
implements Serializable, Cloneable
{
public Proxy() {
this(org.apache.maven.api.settings.Proxy.newInstance());
}
public Proxy(org.apache.maven.api.settings.Proxy delegate) {
this(delegate, null);
}
public Proxy(org.apache.maven.api.settings.Proxy delegate, BaseObject parent) {
super(delegate, parent);
}
public Proxy clone(){
return new Proxy(getDelegate());
}
@Override
public org.apache.maven.api.settings.Proxy getDelegate() {
return (org.apache.maven.api.settings.Proxy) super.getDelegate();
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || !(o instanceof Proxy)) {
return false;
}
Proxy that = (Proxy) o;
return Objects.equals(this.delegate, that.delegate);
}
@Override
public int hashCode() {
return getDelegate().hashCode();
}
public String getActiveString() {
return getDelegate().getActiveString();
}
public void setActiveString(String activeString) {
if (!Objects.equals(activeString, getActiveString())) {
update(getDelegate().withActiveString(activeString));
}
}
public String getProtocol() {
return getDelegate().getProtocol();
}
public void setProtocol(String protocol) {
if (!Objects.equals(protocol, getProtocol())) {
update(getDelegate().withProtocol(protocol));
}
}
public String getUsername() {
return getDelegate().getUsername();
}
public void setUsername(String username) {
if (!Objects.equals(username, getUsername())) {
update(getDelegate().withUsername(username));
}
}
public String getPassword() {
return getDelegate().getPassword();
}
public void setPassword(String password) {
if (!Objects.equals(password, getPassword())) {
update(getDelegate().withPassword(password));
}
}
public String getPortString() {
return getDelegate().getPortString();
}
public void setPortString(String portString) {
if (!Objects.equals(portString, getPortString())) {
update(getDelegate().withPortString(portString));
}
}
public String getHost() {
return getDelegate().getHost();
}
public void setHost(String host) {
if (!Objects.equals(host, getHost())) {
update(getDelegate().withHost(host));
}
}
public String getNonProxyHosts() {
return getDelegate().getNonProxyHosts();
}
public void setNonProxyHosts(String nonProxyHosts) {
if (!Objects.equals(nonProxyHosts, getNonProxyHosts())) {
update(getDelegate().withNonProxyHosts(nonProxyHosts));
}
}
protected boolean replace(Object oldDelegate, Object newDelegate) {
if (super.replace(oldDelegate, newDelegate)) {
return true;
}
return false;
}
public static List proxyToApiV4(List list) {
return list != null ? new WrapperList<>(list, Proxy::getDelegate, Proxy::new) : null;
}
public static List proxyToApiV3(List list) {
return list != null ? new WrapperList<>(list, Proxy::new, Proxy::getDelegate) : null;
}
public boolean isActive() {
return (getActiveString() != null) ? Boolean.parseBoolean(getActiveString()) : true;
}
public void setActive(boolean active) {
setActiveString(String.valueOf(active));
}
public int getPort() {
return (getPortString() != null) ? Integer.parseInt(getPortString()) : 8080;
}
public void setPort(int port) {
setPortString(String.valueOf(port));
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy