1
2
3
4
5 package org.apache.maven.model;
6
7 import java.io.Serializable;
8 import java.util.AbstractList;
9 import java.util.ArrayList;
10 import java.util.Collections;
11 import java.util.HashMap;
12 import java.util.List;
13 import java.util.Map;
14 import java.util.Objects;
15 import java.util.stream.Collectors;
16 import java.util.stream.Stream;
17 import org.apache.maven.api.annotations.Generated;
18 import org.apache.maven.api.annotations.Nonnull;
19
20 @Generated
21 public class FileSet
22 extends PatternSet
23 implements Serializable, Cloneable
24 {
25
26 public FileSet() {
27 this(org.apache.maven.api.model.FileSet.newInstance());
28 }
29
30 public FileSet(org.apache.maven.api.model.FileSet delegate) {
31 this(delegate, null);
32 }
33
34 public FileSet(org.apache.maven.api.model.FileSet delegate, BaseObject parent) {
35 super(delegate, parent);
36 }
37
38 public FileSet clone(){
39 return new FileSet(getDelegate());
40 }
41
42 @Override
43 public org.apache.maven.api.model.FileSet getDelegate() {
44 return (org.apache.maven.api.model.FileSet) super.getDelegate();
45 }
46
47 @Override
48 public boolean equals(Object o) {
49 if (this == o) {
50 return true;
51 }
52 if (o == null || !(o instanceof FileSet)) {
53 return false;
54 }
55 FileSet that = (FileSet) o;
56 return Objects.equals(this.delegate, that.delegate);
57 }
58
59 @Override
60 public int hashCode() {
61 return getDelegate().hashCode();
62 }
63
64 public String getDirectory() {
65 return getDelegate().getDirectory();
66 }
67
68 public void setDirectory(String directory) {
69 if (!Objects.equals(directory, getDirectory())) {
70 update(getDelegate().withDirectory(directory));
71 }
72 }
73
74 public InputLocation getLocation(Object key) {
75 org.apache.maven.api.model.InputLocation loc = getDelegate().getLocation(key);
76 return loc != null ? new InputLocation(loc) : null;
77 }
78
79 public void setLocation(Object key, InputLocation location) {
80 update(org.apache.maven.api.model.FileSet.newBuilder(getDelegate(), true)
81 .location(key, location.toApiLocation()).build());
82 }
83
84 protected boolean replace(Object oldDelegate, Object newDelegate) {
85 if (super.replace(oldDelegate, newDelegate)) {
86 return true;
87 }
88 return false;
89 }
90
91 public static List<org.apache.maven.api.model.FileSet> fileSetToApiV4(List<FileSet> list) {
92 return list != null ? new WrapperList<>(list, FileSet::getDelegate, FileSet::new) : null;
93 }
94
95 public static List<FileSet> fileSetToApiV3(List<org.apache.maven.api.model.FileSet> list) {
96 return list != null ? new WrapperList<>(list, FileSet::new, FileSet::getDelegate) : null;
97 }
98
99
100
101
102
103
104 public String toString()
105 {
106 return "FileSet {directory: " + getDirectory() + ", " + super.toString() + "}";
107 }
108
109
110 }