1
2
3
4
5 package org.apache.maven.model;
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 Prerequisites
21 extends BaseObject
22 {
23
24 public Prerequisites()
25 {
26 this( org.apache.maven.api.model.Prerequisites.newInstance() );
27 }
28
29 public Prerequisites( org.apache.maven.api.model.Prerequisites delegate )
30 {
31 this( delegate, null );
32 }
33
34 public Prerequisites( org.apache.maven.api.model.Prerequisites delegate, BaseObject parent )
35 {
36 super( delegate, parent );
37 }
38
39 public Prerequisites clone()
40 {
41 return new Prerequisites( getDelegate() );
42 }
43
44 public org.apache.maven.api.model.Prerequisites getDelegate()
45 {
46 return ( org.apache.maven.api.model.Prerequisites ) 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 Prerequisites ) )
57 {
58 return false;
59 }
60 Prerequisites that = ( Prerequisites ) 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 getMaven()
71 {
72 return getDelegate().getMaven();
73 }
74
75 public void setMaven( String maven )
76 {
77 if ( !Objects.equals( maven, getDelegate().getMaven() ) )
78 {
79 update( getDelegate().withMaven( maven ) );
80 }
81 }
82
83 public InputLocation getLocation( Object key )
84 {
85 org.apache.maven.api.model.InputLocation loc = getDelegate().getLocation( key );
86 return loc != null ? new InputLocation( loc ) : null;
87 }
88
89 public void setLocation( Object key, InputLocation location )
90 {
91 update( org.apache.maven.api.model.Prerequisites.newBuilder( getDelegate(), true )
92 .location( key, location.toApiLocation() ).build() );
93 }
94
95 protected boolean replace( Object oldDelegate, Object newDelegate )
96 {
97 if ( super.replace( oldDelegate, newDelegate ) )
98 {
99 return true;
100 }
101 return false;
102 }
103
104 public static List<org.apache.maven.api.model.Prerequisites> prerequisitesToApiV4( List<Prerequisites> list )
105 {
106 return list != null ? new WrapperList<>( list, Prerequisites::getDelegate, Prerequisites::new ) : null;
107 }
108
109 public static List<Prerequisites> prerequisitesToApiV3( List<org.apache.maven.api.model.Prerequisites> list )
110 {
111 return list != null ? new WrapperList<>( list, Prerequisites::new, Prerequisites::getDelegate ) : null;
112 }
113
114 }