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 DeploymentRepository
20      extends Repository
21      implements Serializable, Cloneable
22  {
23  
24      public DeploymentRepository()
25      {
26          this( org.apache.maven.api.model.DeploymentRepository.newInstance() );
27      }
28  
29      public DeploymentRepository( org.apache.maven.api.model.DeploymentRepository delegate )
30      {
31          this( delegate, null );
32      }
33  
34      public DeploymentRepository( org.apache.maven.api.model.DeploymentRepository delegate, BaseObject parent )
35      {
36          super( delegate, parent );
37      }
38  
39      public DeploymentRepository clone()
40      {
41          return new DeploymentRepository( getDelegate() );
42      }
43  
44      @Override
45      public org.apache.maven.api.model.DeploymentRepository getDelegate()
46      {
47          return ( org.apache.maven.api.model.DeploymentRepository ) super.getDelegate();
48      }
49  
50      @Override
51      public boolean equals( Object o )
52      {
53          if ( this == o )
54          {
55              return true;
56          }
57          if ( o == null || !( o instanceof DeploymentRepository ) )
58          {
59              return false;
60          }
61          DeploymentRepository that = ( DeploymentRepository ) o;
62          return Objects.equals( this.delegate, that.delegate );
63      }
64  
65      @Override
66      public int hashCode()
67      {
68          return getDelegate().hashCode();
69      }
70  
71      public boolean isUniqueVersion()
72      {
73          return getDelegate().isUniqueVersion();
74      }
75  
76      public void setUniqueVersion( boolean uniqueVersion )
77      {
78          if ( !Objects.equals( uniqueVersion, getDelegate().isUniqueVersion() ) )
79          {
80              update( getDelegate().withUniqueVersion( uniqueVersion ) );
81          }
82      }
83  
84      public InputLocation getLocation( Object key )
85      {
86          org.apache.maven.api.model.InputLocation loc = getDelegate().getLocation( key );
87          return loc != null ? new InputLocation( loc ) : null;
88      }
89  
90      public void setLocation( Object key, InputLocation location )
91      {
92          update( org.apache.maven.api.model.DeploymentRepository.newBuilder( getDelegate(), true )
93                          .location( key, location.toApiLocation() ).build() );
94      }
95  
96      protected boolean replace( Object oldDelegate, Object newDelegate )
97      {
98          if ( super.replace( oldDelegate, newDelegate ) )
99          {
100             return true;
101         }
102         return false;
103     }
104 
105     public static List<org.apache.maven.api.model.DeploymentRepository> deploymentRepositoryToApiV4( List<DeploymentRepository> list )
106     {
107         return list != null ? new WrapperList<>( list, DeploymentRepository::getDelegate, DeploymentRepository::new ) : null;
108     }
109 
110     public static List<DeploymentRepository> deploymentRepositoryToApiV3( List<org.apache.maven.api.model.DeploymentRepository> list )
111     {
112         return list != null ? new WrapperList<>( list, DeploymentRepository::new, DeploymentRepository::getDelegate ) : null;
113     }
114 
115 }