All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.apache.maven.settings.ActivationProperty 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 ActivationProperty
    extends BaseObject
{

    public ActivationProperty() {
        this(org.apache.maven.api.settings.ActivationProperty.newInstance());
    }

    public ActivationProperty(org.apache.maven.api.settings.ActivationProperty delegate) {
        this(delegate, null);
    }

    public ActivationProperty(org.apache.maven.api.settings.ActivationProperty delegate, BaseObject parent) {
        super(delegate, parent);
    }

    public ActivationProperty clone(){
        return new ActivationProperty(getDelegate());
    }

    public org.apache.maven.api.settings.ActivationProperty getDelegate() {
        return (org.apache.maven.api.settings.ActivationProperty) super.getDelegate();
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || !(o instanceof ActivationProperty)) {
            return false;
        }
        ActivationProperty that = (ActivationProperty) o;
        return Objects.equals(this.delegate, that.delegate);
    }

    @Override
    public int hashCode() {
        return getDelegate().hashCode();
    }

    public String getName() {
        return getDelegate().getName();
    }

    public void setName(String name) {
        if (!Objects.equals(name, getName())) {
            update(getDelegate().withName(name));
        }
    }

    public String getValue() {
        return getDelegate().getValue();
    }

    public void setValue(String value) {
        if (!Objects.equals(value, getValue())) {
            update(getDelegate().withValue(value));
        }
    }

    protected boolean replace(Object oldDelegate, Object newDelegate) {
        if (super.replace(oldDelegate, newDelegate)) {
            return true;
        }
        return false;
    }

    public static List activationPropertyToApiV4(List list) {
        return list != null ? new WrapperList<>(list, ActivationProperty::getDelegate, ActivationProperty::new) : null;
    }

    public static List activationPropertyToApiV3(List list) {
        return list != null ? new WrapperList<>(list, ActivationProperty::new, ActivationProperty::getDelegate) : null;
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy