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.LinkedHashMap;
12  import java.util.List;
13  import java.util.Map;
14  import java.util.Objects;
15  import java.util.Set;
16  import java.util.stream.Collectors;
17  import java.util.stream.Stream;
18  import org.apache.maven.api.annotations.Generated;
19  import org.apache.maven.api.annotations.Nonnull;
20  
21  @Generated
22  public class RepositoryBase
23      extends IdentifiableBase
24      implements Serializable, Cloneable
25  {
26  
27      public RepositoryBase() {
28          this(org.apache.maven.api.settings.RepositoryBase.newInstance());
29      }
30  
31      public RepositoryBase(org.apache.maven.api.settings.RepositoryBase delegate) {
32          this(delegate, null);
33      }
34  
35      public RepositoryBase(org.apache.maven.api.settings.RepositoryBase delegate, BaseObject parent) {
36          super(delegate, parent);
37      }
38  
39      public RepositoryBase clone(){
40          return new RepositoryBase(getDelegate());
41      }
42  
43      @Override
44      public org.apache.maven.api.settings.RepositoryBase getDelegate() {
45          return (org.apache.maven.api.settings.RepositoryBase) super.getDelegate();
46      }
47  
48      @Override
49      public boolean equals(Object o) {
50          if (this == o) {
51              return true;
52          }
53          if (o == null || !(o instanceof RepositoryBase)) {
54              return false;
55          }
56          RepositoryBase that = (RepositoryBase) o;
57          return Objects.equals(this.delegate, that.delegate);
58      }
59  
60      @Override
61      public int hashCode() {
62          return getDelegate().hashCode();
63      }
64  
65      public String getName() {
66          return getDelegate().getName();
67      }
68  
69      public void setName(String name) {
70          if (!Objects.equals(name, getName())) {
71              update(getDelegate().withName(name));
72          }
73      }
74  
75      public String getUrl() {
76          return getDelegate().getUrl();
77      }
78  
79      public void setUrl(String url) {
80          if (!Objects.equals(url, getUrl())) {
81              update(getDelegate().withUrl(url));
82          }
83      }
84  
85      public String getLayout() {
86          return getDelegate().getLayout();
87      }
88  
89      public void setLayout(String layout) {
90          if (!Objects.equals(layout, getLayout())) {
91              update(getDelegate().withLayout(layout));
92          }
93      }
94  
95      protected boolean replace(Object oldDelegate, Object newDelegate) {
96          if (super.replace(oldDelegate, newDelegate)) {
97              return true;
98          }
99          return false;
100     }
101 
102     public static List<org.apache.maven.api.settings.RepositoryBase> repositoryBaseToApiV4(List<RepositoryBase> list) {
103         return list != null ? new WrapperList<>(list, RepositoryBase::getDelegate, RepositoryBase::new) : null;
104     }
105 
106     public static List<RepositoryBase> repositoryBaseToApiV3(List<org.apache.maven.api.settings.RepositoryBase> list) {
107         return list != null ? new WrapperList<>(list, RepositoryBase::new, RepositoryBase::getDelegate) : null;
108     }
109 
110 }