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 BaseObject
22  {
23  
24      public RepositoryBase()
25      {
26          this( org.apache.maven.api.settings.RepositoryBase.newInstance() );
27      }
28  
29      public RepositoryBase( org.apache.maven.api.settings.RepositoryBase delegate )
30      {
31          this( delegate, null );
32      }
33  
34      public RepositoryBase( org.apache.maven.api.settings.RepositoryBase delegate, BaseObject parent )
35      {
36          super( delegate, parent );
37      }
38  
39      public RepositoryBase clone()
40      {
41          return new RepositoryBase( getDelegate() );
42      }
43  
44      public org.apache.maven.api.settings.RepositoryBase getDelegate()
45      {
46          return ( org.apache.maven.api.settings.RepositoryBase ) super.getDelegate();
47      }
48  
49      @Override
50      public boolean equals( Object o )
51      {
52          if ( this == o )
53          {
54              return true;
55          }
56          if ( o == null || !( o instanceof RepositoryBase ) )
57          {
58              return false;
59          }
60          RepositoryBase that = ( RepositoryBase ) o;
61          return Objects.equals( this.delegate, that.delegate );
62      }
63  
64      @Override
65      public int hashCode()
66      {
67          return getDelegate().hashCode();
68      }
69  
70      public String getId()
71      {
72          return getDelegate().getId();
73      }
74  
75      public void setId( String id )
76      {
77          if ( !Objects.equals( id, getDelegate().getId() ) )
78          {
79              update( getDelegate().withId( id ) );
80          }
81      }
82  
83      public String getName()
84      {
85          return getDelegate().getName();
86      }
87  
88      public void setName( String name )
89      {
90          if ( !Objects.equals( name, getDelegate().getName() ) )
91          {
92              update( getDelegate().withName( name ) );
93          }
94      }
95  
96      public String getUrl()
97      {
98          return getDelegate().getUrl();
99      }
100 
101     public void setUrl( String url )
102     {
103         if ( !Objects.equals( url, getDelegate().getUrl() ) )
104         {
105             update( getDelegate().withUrl( url ) );
106         }
107     }
108 
109     public String getLayout()
110     {
111         return getDelegate().getLayout();
112     }
113 
114     public void setLayout( String layout )
115     {
116         if ( !Objects.equals( layout, getDelegate().getLayout() ) )
117         {
118             update( getDelegate().withLayout( layout ) );
119         }
120     }
121 
122     protected boolean replace( Object oldDelegate, Object newDelegate )
123     {
124         if ( super.replace( oldDelegate, newDelegate ) )
125         {
126             return true;
127         }
128         return false;
129     }
130 
131     public static List<org.apache.maven.api.settings.RepositoryBase> repositoryBaseToApiV4( List<RepositoryBase> list )
132     {
133         return list != null ? new WrapperList<>( list, RepositoryBase::getDelegate, RepositoryBase::new ) : null;
134     }
135 
136     public static List<RepositoryBase> repositoryBaseToApiV3( List<org.apache.maven.api.settings.RepositoryBase> list )
137     {
138         return list != null ? new WrapperList<>( list, RepositoryBase::new, RepositoryBase::getDelegate ) : null;
139     }
140 
141 }