View Javadoc
1   // =================== DO NOT EDIT THIS FILE ====================
2   //   Generated by Maven, any modifications will be overwritten.
3   // ==============================================================
4   package org.apache.maven.model;
5   
6   import java.io.Serializable;
7   import java.util.AbstractList;
8   import java.util.Collections;
9   import java.util.HashMap;
10  import java.util.List;
11  import java.util.Map;
12  import java.util.Objects;
13  import java.util.stream.Collectors;
14  import java.util.stream.Stream;
15  import org.apache.maven.api.annotations.Generated;
16  import org.apache.maven.api.annotations.Nonnull;
17  
18  @Generated
19  public class RepositoryBase
20      extends BaseObject
21  {
22  
23      public RepositoryBase()
24      {
25          this( org.apache.maven.api.model.RepositoryBase.newInstance() );
26      }
27  
28      public RepositoryBase( org.apache.maven.api.model.RepositoryBase delegate )
29      {
30          this( delegate, null );
31      }
32  
33      public RepositoryBase( org.apache.maven.api.model.RepositoryBase delegate, BaseObject parent )
34      {
35          super( delegate, parent );
36      }
37  
38      public RepositoryBase clone()
39      {
40          return new RepositoryBase( getDelegate() );
41      }
42  
43      public org.apache.maven.api.model.RepositoryBase getDelegate()
44      {
45          return ( org.apache.maven.api.model.RepositoryBase ) super.getDelegate();
46      }
47  
48      @Override
49      public boolean equals( Object o )
50      {
51          if ( this == o )
52          {
53              return true;
54          }
55          if ( o == null || !( o instanceof RepositoryBase ) )
56          {
57              return false;
58          }
59          RepositoryBase that = ( RepositoryBase ) o;
60          return Objects.equals( this.delegate, that.delegate );
61      }
62  
63      @Override
64      public int hashCode()
65      {
66          return getDelegate().hashCode();
67      }
68  
69      public String getId()
70      {
71          return getDelegate().getId();
72      }
73  
74      public void setId( String id )
75      {
76          if ( !Objects.equals( id, getDelegate().getId() ) )
77          {
78              update( getDelegate().withId( id ) );
79          }
80      }
81  
82      public String getName()
83      {
84          return getDelegate().getName();
85      }
86  
87      public void setName( String name )
88      {
89          if ( !Objects.equals( name, getDelegate().getName() ) )
90          {
91              update( getDelegate().withName( name ) );
92          }
93      }
94  
95      public String getUrl()
96      {
97          return getDelegate().getUrl();
98      }
99  
100     public void setUrl( String url )
101     {
102         if ( !Objects.equals( url, getDelegate().getUrl() ) )
103         {
104             update( getDelegate().withUrl( url ) );
105         }
106     }
107 
108     public String getLayout()
109     {
110         return getDelegate().getLayout();
111     }
112 
113     public void setLayout( String layout )
114     {
115         if ( !Objects.equals( layout, getDelegate().getLayout() ) )
116         {
117             update( getDelegate().withLayout( layout ) );
118         }
119     }
120 
121     public InputLocation getLocation( Object key )
122     {
123         org.apache.maven.api.model.InputLocation loc = getDelegate().getLocation( key );
124         return loc != null ? new InputLocation( loc ) : null;
125     }
126 
127     public void setLocation( Object key, InputLocation location )
128     {
129         update( org.apache.maven.api.model.RepositoryBase.newBuilder( getDelegate(), true )
130                         .location( key, location.toApiLocation() ).build() );
131     }
132 
133     protected boolean replace( Object oldDelegate, Object newDelegate )
134     {
135         if ( super.replace( oldDelegate, newDelegate ) )
136         {
137             return true;
138         }
139         return false;
140     }
141 
142     public static List<org.apache.maven.api.model.RepositoryBase> repositoryBaseToApiV4( List<RepositoryBase> list )
143     {
144         return list != null ? new WrapperList<>( list, RepositoryBase::getDelegate, RepositoryBase::new ) : null;
145     }
146 
147     public static List<RepositoryBase> repositoryBaseToApiV3( List<org.apache.maven.api.model.RepositoryBase> list )
148     {
149         return list != null ? new WrapperList<>( list, RepositoryBase::new, RepositoryBase::getDelegate ) : null;
150     }
151 
152 }