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