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.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 ActivationProperty
22      extends BaseObject
23  {
24  
25      public ActivationProperty() {
26          this(org.apache.maven.api.settings.ActivationProperty.newInstance());
27      }
28  
29      public ActivationProperty(org.apache.maven.api.settings.ActivationProperty delegate) {
30          this(delegate, null);
31      }
32  
33      public ActivationProperty(org.apache.maven.api.settings.ActivationProperty delegate, BaseObject parent) {
34          super(delegate, parent);
35      }
36  
37      public ActivationProperty clone(){
38          return new ActivationProperty(getDelegate());
39      }
40  
41      public org.apache.maven.api.settings.ActivationProperty getDelegate() {
42          return (org.apache.maven.api.settings.ActivationProperty) 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 ActivationProperty)) {
51              return false;
52          }
53          ActivationProperty that = (ActivationProperty) 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 getName() {
63          return getDelegate().getName();
64      }
65  
66      public void setName(String name) {
67          if (!Objects.equals(name, getName())) {
68              update(getDelegate().withName(name));
69          }
70      }
71  
72      public String getValue() {
73          return getDelegate().getValue();
74      }
75  
76      public void setValue(String value) {
77          if (!Objects.equals(value, getValue())) {
78              update(getDelegate().withValue(value));
79          }
80      }
81  
82      protected boolean replace(Object oldDelegate, Object newDelegate) {
83          if (super.replace(oldDelegate, newDelegate)) {
84              return true;
85          }
86          return false;
87      }
88  
89      public static List<org.apache.maven.api.settings.ActivationProperty> activationPropertyToApiV4(List<ActivationProperty> list) {
90          return list != null ? new WrapperList<>(list, ActivationProperty::getDelegate, ActivationProperty::new) : null;
91      }
92  
93      public static List<ActivationProperty> activationPropertyToApiV3(List<org.apache.maven.api.settings.ActivationProperty> list) {
94          return list != null ? new WrapperList<>(list, ActivationProperty::new, ActivationProperty::getDelegate) : null;
95      }
96  
97  }