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.Set;
15 import java.util.stream.Collectors;
16 import java.util.stream.Stream;
17 import org.apache.maven.api.annotations.Generated;
18 import org.apache.maven.api.annotations.Nonnull;
19
20 @Generated
21 public class Prerequisites
22 extends BaseObject
23 {
24
25 public Prerequisites() {
26 this(org.apache.maven.api.model.Prerequisites.newInstance());
27 }
28
29 public Prerequisites(org.apache.maven.api.model.Prerequisites delegate) {
30 this(delegate, null);
31 }
32
33 public Prerequisites(org.apache.maven.api.model.Prerequisites delegate, BaseObject parent) {
34 super(delegate, parent);
35 }
36
37 public Prerequisites clone(){
38 return new Prerequisites(getDelegate());
39 }
40
41 public org.apache.maven.api.model.Prerequisites getDelegate() {
42 return (org.apache.maven.api.model.Prerequisites) super.getDelegate();
43 }
44
45 @Override
46 public boolean equals(Object o) {
47 if (this == o) {
48 return true;
49 }
50 if (o == null || !(o instanceof Prerequisites)) {
51 return false;
52 }
53 Prerequisites that = (Prerequisites) o;
54 return Objects.equals(this.delegate, that.delegate);
55 }
56
57 @Override
58 public int hashCode() {
59 return getDelegate().hashCode();
60 }
61
62 public String getMaven() {
63 return getDelegate().getMaven();
64 }
65
66 public void setMaven(String maven) {
67 if (!Objects.equals(maven, getMaven())) {
68 update(getDelegate().withMaven(maven));
69 }
70 }
71
72 public InputLocation getLocation(Object key) {
73 org.apache.maven.api.model.InputLocation loc = getDelegate().getLocation(key);
74 return loc != null ? new InputLocation(loc) : null;
75 }
76
77 public void setLocation(Object key, InputLocation location) {
78 update(org.apache.maven.api.model.Prerequisites.newBuilder(getDelegate(), true)
79 .location(key, location.toApiLocation()).build());
80 }
81
82 public InputLocation getImportedFrom() {
83 org.apache.maven.api.model.InputLocation loc = getDelegate().getImportedFrom();
84 return loc != null ? new InputLocation(loc) : null;
85 }
86
87 public void setImportedFrom(InputLocation location) {
88 update(org.apache.maven.api.model.Prerequisites.newBuilder(getDelegate(), true)
89 .importedFrom(location.toApiLocation()).build());
90 }
91
92 public Set<Object> getLocationKeys() {
93 return getDelegate().getLocationKeys();
94 }
95
96 protected boolean replace(Object oldDelegate, Object newDelegate) {
97 if (super.replace(oldDelegate, newDelegate)) {
98 return true;
99 }
100 return false;
101 }
102
103 public static List<org.apache.maven.api.model.Prerequisites> prerequisitesToApiV4(List<Prerequisites> list) {
104 return list != null ? new WrapperList<>(list, Prerequisites::getDelegate, Prerequisites::new) : null;
105 }
106
107 public static List<Prerequisites> prerequisitesToApiV3(List<org.apache.maven.api.model.Prerequisites> list) {
108 return list != null ? new WrapperList<>(list, Prerequisites::new, Prerequisites::getDelegate) : null;
109 }
110
111 }