1
2
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 Prerequisites
20 extends BaseObject
21 {
22
23 public Prerequisites()
24 {
25 this( org.apache.maven.api.model.Prerequisites.newInstance() );
26 }
27
28 public Prerequisites( org.apache.maven.api.model.Prerequisites delegate )
29 {
30 this( delegate, null );
31 }
32
33 public Prerequisites( org.apache.maven.api.model.Prerequisites delegate, BaseObject parent )
34 {
35 super( delegate, parent );
36 }
37
38 public Prerequisites clone()
39 {
40 return new Prerequisites( getDelegate() );
41 }
42
43 public org.apache.maven.api.model.Prerequisites getDelegate()
44 {
45 return ( org.apache.maven.api.model.Prerequisites ) super.getDelegate();
46 }
47
48 public String getMaven()
49 {
50 return getDelegate().getMaven();
51 }
52
53 public void setMaven( String maven )
54 {
55 if ( !Objects.equals( maven, getDelegate().getMaven() ) )
56 {
57 update( getDelegate().withMaven( maven ) );
58 }
59 }
60
61 public InputLocation getLocation( Object key )
62 {
63 org.apache.maven.api.model.InputLocation loc = getDelegate().getLocation( key );
64 return loc != null ? new InputLocation( loc ) : null;
65 }
66
67 public void setLocation( Object key, InputLocation location )
68 {
69 update( org.apache.maven.api.model.Prerequisites.newBuilder( getDelegate(), true )
70 .location( key, location.toApiLocation() ).build() );
71 }
72
73 protected boolean replace( Object oldDelegate, Object newDelegate )
74 {
75 if ( super.replace( oldDelegate, newDelegate ) )
76 {
77 return true;
78 }
79 return false;
80 }
81
82 public static List<org.apache.maven.api.model.Prerequisites> prerequisitesToApiV4( List<Prerequisites> list )
83 {
84 return list != null ? new WrapperList<>( list, Prerequisites::getDelegate, Prerequisites::new ) : null;
85 }
86
87 public static List<Prerequisites> prerequisitesToApiV3( List<org.apache.maven.api.model.Prerequisites> list )
88 {
89 return list != null ? new WrapperList<>( list, Prerequisites::new, Prerequisites::getDelegate ) : null;
90 }
91
92 }