View Javadoc
1   // =================== DO NOT EDIT THIS FILE ====================
2   //  Generated by Modello Velocity from model-v3.vm
3   //  template, any modifications will be overwritten.
4   // ==============================================================
5   package org.apache.maven.settings;
6   
7   import java.io.Serializable;
8   import java.util.AbstractList;
9   import java.util.Collections;
10  import java.util.HashMap;
11  import java.util.List;
12  import java.util.Map;
13  import java.util.Objects;
14  import java.util.Set;
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 RepositoryBase
22      extends IdentifiableBase
23      implements Serializable, Cloneable
24  {
25  
26      public RepositoryBase() {
27          this(org.apache.maven.api.settings.RepositoryBase.newInstance());
28      }
29  
30      public RepositoryBase(org.apache.maven.api.settings.RepositoryBase delegate) {
31          this(delegate, null);
32      }
33  
34      public RepositoryBase(org.apache.maven.api.settings.RepositoryBase delegate, BaseObject parent) {
35          super(delegate, parent);
36      }
37  
38      public RepositoryBase clone(){
39          return new RepositoryBase(getDelegate());
40      }
41  
42      @Override
43      public org.apache.maven.api.settings.RepositoryBase getDelegate() {
44          return (org.apache.maven.api.settings.RepositoryBase) 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 RepositoryBase)) {
53              return false;
54          }
55          RepositoryBase that = (RepositoryBase) 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 getName() {
65          return getDelegate().getName();
66      }
67  
68      public void setName(String name) {
69          if (!Objects.equals(name, getName())) {
70              update(getDelegate().withName(name));
71          }
72      }
73  
74      public String getUrl() {
75          return getDelegate().getUrl();
76      }
77  
78      public void setUrl(String url) {
79          if (!Objects.equals(url, getUrl())) {
80              update(getDelegate().withUrl(url));
81          }
82      }
83  
84      public String getLayout() {
85          return getDelegate().getLayout();
86      }
87  
88      public void setLayout(String layout) {
89          if (!Objects.equals(layout, getLayout())) {
90              update(getDelegate().withLayout(layout));
91          }
92      }
93  
94      protected boolean replace(Object oldDelegate, Object newDelegate) {
95          if (super.replace(oldDelegate, newDelegate)) {
96              return true;
97          }
98          return false;
99      }
100 
101     public static List<org.apache.maven.api.settings.RepositoryBase> repositoryBaseToApiV4(List<RepositoryBase> list) {
102         return list != null ? new WrapperList<>(list, RepositoryBase::getDelegate, RepositoryBase::new) : null;
103     }
104 
105     public static List<RepositoryBase> repositoryBaseToApiV3(List<org.apache.maven.api.settings.RepositoryBase> list) {
106         return list != null ? new WrapperList<>(list, RepositoryBase::new, RepositoryBase::getDelegate) : null;
107     }
108 
109 }