View Javadoc
1   // =================== DO NOT EDIT THIS FILE ====================
2   //  Generated by Modello Velocity from model-v3.vm
3   //  template, any modifications will be overwritten.
4   // ==============================================================
5   package org.apache.maven.settings;
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.LinkedHashMap;
12  import java.util.List;
13  import java.util.Map;
14  import java.util.Objects;
15  import java.util.Set;
16  import java.util.stream.Collectors;
17  import java.util.stream.Stream;
18  import org.apache.maven.api.annotations.Generated;
19  import org.apache.maven.api.annotations.Nonnull;
20  
21  @Generated
22  public class ActivationProperty
23      extends BaseObject
24  {
25  
26      public ActivationProperty() {
27          this(org.apache.maven.api.settings.ActivationProperty.newInstance());
28      }
29  
30      public ActivationProperty(org.apache.maven.api.settings.ActivationProperty delegate) {
31          this(delegate, null);
32      }
33  
34      public ActivationProperty(org.apache.maven.api.settings.ActivationProperty delegate, BaseObject parent) {
35          super(delegate, parent);
36      }
37  
38      public ActivationProperty clone(){
39          return new ActivationProperty(getDelegate());
40      }
41  
42      public org.apache.maven.api.settings.ActivationProperty getDelegate() {
43          return (org.apache.maven.api.settings.ActivationProperty) super.getDelegate();
44      }
45  
46      @Override
47      public boolean equals(Object o) {
48          if (this == o) {
49              return true;
50          }
51          if (o == null || !(o instanceof ActivationProperty)) {
52              return false;
53          }
54          ActivationProperty that = (ActivationProperty) o;
55          return Objects.equals(this.delegate, that.delegate);
56      }
57  
58      @Override
59      public int hashCode() {
60          return getDelegate().hashCode();
61      }
62  
63      public String getName() {
64          return getDelegate().getName();
65      }
66  
67      public void setName(String name) {
68          if (!Objects.equals(name, getName())) {
69              update(getDelegate().withName(name));
70          }
71      }
72  
73      public String getValue() {
74          return getDelegate().getValue();
75      }
76  
77      public void setValue(String value) {
78          if (!Objects.equals(value, getValue())) {
79              update(getDelegate().withValue(value));
80          }
81      }
82  
83      protected boolean replace(Object oldDelegate, Object newDelegate) {
84          if (super.replace(oldDelegate, newDelegate)) {
85              return true;
86          }
87          return false;
88      }
89  
90      public static List<org.apache.maven.api.settings.ActivationProperty> activationPropertyToApiV4(List<ActivationProperty> list) {
91          return list != null ? new WrapperList<>(list, ActivationProperty::getDelegate, ActivationProperty::new) : null;
92      }
93  
94      public static List<ActivationProperty> activationPropertyToApiV3(List<org.apache.maven.api.settings.ActivationProperty> list) {
95          return list != null ? new WrapperList<>(list, ActivationProperty::new, ActivationProperty::getDelegate) : null;
96      }
97  
98  }