
org.apache.maven.model.FileSet Maven / Gradle / Ivy
// =================== DO NOT EDIT THIS FILE ====================
// Generated by Modello Velocity from model-v3.vm
// template, any modifications will be overwritten.
// ==============================================================
package org.apache.maven.model;
import java.io.Serializable;
import java.util.AbstractList;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;
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 FileSet
extends PatternSet
implements Serializable, Cloneable
{
public FileSet() {
this(org.apache.maven.api.model.FileSet.newInstance());
}
public FileSet(org.apache.maven.api.model.FileSet delegate) {
this(delegate, null);
}
public FileSet(org.apache.maven.api.model.FileSet delegate, BaseObject parent) {
super(delegate, parent);
}
public FileSet clone(){
return new FileSet(getDelegate());
}
@Override
public org.apache.maven.api.model.FileSet getDelegate() {
return (org.apache.maven.api.model.FileSet) super.getDelegate();
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || !(o instanceof FileSet)) {
return false;
}
FileSet that = (FileSet) o;
return Objects.equals(this.delegate, that.delegate);
}
@Override
public int hashCode() {
return getDelegate().hashCode();
}
public String getDirectory() {
return getDelegate().getDirectory();
}
public void setDirectory(String directory) {
if (!Objects.equals(directory, getDirectory())) {
update(getDelegate().withDirectory(directory));
}
}
public InputLocation getLocation(Object key) {
org.apache.maven.api.model.InputLocation loc = getDelegate().getLocation(key);
return loc != null ? new InputLocation(loc) : null;
}
public void setLocation(Object key, InputLocation location) {
update(org.apache.maven.api.model.FileSet.newBuilder(getDelegate(), true)
.location(key, location.toApiLocation()).build());
}
protected boolean replace(Object oldDelegate, Object newDelegate) {
if (super.replace(oldDelegate, newDelegate)) {
return true;
}
return false;
}
public static List fileSetToApiV4(List list) {
return list != null ? new WrapperList<>(list, FileSet::getDelegate, FileSet::new) : null;
}
public static List fileSetToApiV3(List list) {
return list != null ? new WrapperList<>(list, FileSet::new, FileSet::getDelegate) : null;
}
/**
* @see java.lang.Object#toString()
*/
public String toString()
{
return "FileSet {directory: " + getDirectory() + ", " + super.toString() + "}";
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy