[JAVA] Fix generation of remove method of map entries (#18562)

* Fix generation of remove method for map entries

Map::remove in java removes entries by key, therefore the key must be used as parameter.

* Fix generation of remove method for map entries

Map::remove in java removes entries by key, therefore the key must be used as parameter.

---------

Co-authored-by: Reinhard Handler <reinhard.handler@ssi-schaefer.com>
This commit is contained in:
Reinhard Handler 2024-05-07 06:13:15 +02:00 committed by GitHub
parent 228b47a953
commit 2fb41ac529
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
22 changed files with 232 additions and 232 deletions

View File

@ -110,9 +110,9 @@ public class {{classname}} {{#parent}}extends {{{.}}}{{/parent}} {{#vendorExtens
return this;
}
public {{classname}} remove{{nameInPascalCase}}Item({{{items.datatypeWithEnum}}} {{name}}Item) {
if ({{name}}Item != null && this.{{name}} != null) {
this.{{name}}.remove({{name}}Item);
public {{classname}} remove{{nameInPascalCase}}Item(String key) {
if (this.{{name}} != null) {
this.{{name}}.remove(key);
}
return this;

View File

@ -9524,7 +9524,7 @@ The password for login in clear text
<th>Description</th>
</tr>
<tr>
<td>SetMinusCookie</td>
<td>SetDashCookie</td>
<td>String</td>
<td></td>
<td>Cookie authentication key for use with the &#x60;api_key&#x60; apiKey authentication.</td>

View File

@ -62,9 +62,9 @@ public class AdditionalPropertiesClass implements Serializable {
return this;
}
public AdditionalPropertiesClass removeMapStringItem(String mapStringItem) {
if (mapStringItem != null && this.mapString != null) {
this.mapString.remove(mapStringItem);
public AdditionalPropertiesClass removeMapStringItem(String key) {
if (this.mapString != null) {
this.mapString.remove(key);
}
return this;
@ -97,9 +97,9 @@ public class AdditionalPropertiesClass implements Serializable {
return this;
}
public AdditionalPropertiesClass removeMapNumberItem(BigDecimal mapNumberItem) {
if (mapNumberItem != null && this.mapNumber != null) {
this.mapNumber.remove(mapNumberItem);
public AdditionalPropertiesClass removeMapNumberItem(String key) {
if (this.mapNumber != null) {
this.mapNumber.remove(key);
}
return this;
@ -132,9 +132,9 @@ public class AdditionalPropertiesClass implements Serializable {
return this;
}
public AdditionalPropertiesClass removeMapIntegerItem(Integer mapIntegerItem) {
if (mapIntegerItem != null && this.mapInteger != null) {
this.mapInteger.remove(mapIntegerItem);
public AdditionalPropertiesClass removeMapIntegerItem(String key) {
if (this.mapInteger != null) {
this.mapInteger.remove(key);
}
return this;
@ -167,9 +167,9 @@ public class AdditionalPropertiesClass implements Serializable {
return this;
}
public AdditionalPropertiesClass removeMapBooleanItem(Boolean mapBooleanItem) {
if (mapBooleanItem != null && this.mapBoolean != null) {
this.mapBoolean.remove(mapBooleanItem);
public AdditionalPropertiesClass removeMapBooleanItem(String key) {
if (this.mapBoolean != null) {
this.mapBoolean.remove(key);
}
return this;
@ -202,9 +202,9 @@ public class AdditionalPropertiesClass implements Serializable {
return this;
}
public AdditionalPropertiesClass removeMapArrayIntegerItem(List<Integer> mapArrayIntegerItem) {
if (mapArrayIntegerItem != null && this.mapArrayInteger != null) {
this.mapArrayInteger.remove(mapArrayIntegerItem);
public AdditionalPropertiesClass removeMapArrayIntegerItem(String key) {
if (this.mapArrayInteger != null) {
this.mapArrayInteger.remove(key);
}
return this;
@ -237,9 +237,9 @@ public class AdditionalPropertiesClass implements Serializable {
return this;
}
public AdditionalPropertiesClass removeMapArrayAnytypeItem(List<Object> mapArrayAnytypeItem) {
if (mapArrayAnytypeItem != null && this.mapArrayAnytype != null) {
this.mapArrayAnytype.remove(mapArrayAnytypeItem);
public AdditionalPropertiesClass removeMapArrayAnytypeItem(String key) {
if (this.mapArrayAnytype != null) {
this.mapArrayAnytype.remove(key);
}
return this;
@ -272,9 +272,9 @@ public class AdditionalPropertiesClass implements Serializable {
return this;
}
public AdditionalPropertiesClass removeMapMapStringItem(Map<String, String> mapMapStringItem) {
if (mapMapStringItem != null && this.mapMapString != null) {
this.mapMapString.remove(mapMapStringItem);
public AdditionalPropertiesClass removeMapMapStringItem(String key) {
if (this.mapMapString != null) {
this.mapMapString.remove(key);
}
return this;
@ -307,9 +307,9 @@ public class AdditionalPropertiesClass implements Serializable {
return this;
}
public AdditionalPropertiesClass removeMapMapAnytypeItem(Map<String, Object> mapMapAnytypeItem) {
if (mapMapAnytypeItem != null && this.mapMapAnytype != null) {
this.mapMapAnytype.remove(mapMapAnytypeItem);
public AdditionalPropertiesClass removeMapMapAnytypeItem(String key) {
if (this.mapMapAnytype != null) {
this.mapMapAnytype.remove(key);
}
return this;

View File

@ -100,9 +100,9 @@ public class MapTest implements Serializable {
return this;
}
public MapTest removeMapMapOfStringItem(Map<String, String> mapMapOfStringItem) {
if (mapMapOfStringItem != null && this.mapMapOfString != null) {
this.mapMapOfString.remove(mapMapOfStringItem);
public MapTest removeMapMapOfStringItem(String key) {
if (this.mapMapOfString != null) {
this.mapMapOfString.remove(key);
}
return this;
@ -135,9 +135,9 @@ public class MapTest implements Serializable {
return this;
}
public MapTest removeMapOfEnumStringItem(InnerEnum mapOfEnumStringItem) {
if (mapOfEnumStringItem != null && this.mapOfEnumString != null) {
this.mapOfEnumString.remove(mapOfEnumStringItem);
public MapTest removeMapOfEnumStringItem(String key) {
if (this.mapOfEnumString != null) {
this.mapOfEnumString.remove(key);
}
return this;
@ -170,9 +170,9 @@ public class MapTest implements Serializable {
return this;
}
public MapTest removeDirectMapItem(Boolean directMapItem) {
if (directMapItem != null && this.directMap != null) {
this.directMap.remove(directMapItem);
public MapTest removeDirectMapItem(String key) {
if (this.directMap != null) {
this.directMap.remove(key);
}
return this;
@ -205,9 +205,9 @@ public class MapTest implements Serializable {
return this;
}
public MapTest removeIndirectMapItem(Boolean indirectMapItem) {
if (indirectMapItem != null && this.indirectMap != null) {
this.indirectMap.remove(indirectMapItem);
public MapTest removeIndirectMapItem(String key) {
if (this.indirectMap != null) {
this.indirectMap.remove(key);
}
return this;

View File

@ -93,9 +93,9 @@ public class MixedPropertiesAndAdditionalPropertiesClass implements Serializabl
return this;
}
public MixedPropertiesAndAdditionalPropertiesClass removeMapItem(Animal mapItem) {
if (mapItem != null && this.map != null) {
this.map.remove(mapItem);
public MixedPropertiesAndAdditionalPropertiesClass removeMapItem(String key) {
if (this.map != null) {
this.map.remove(key);
}
return this;

View File

@ -62,9 +62,9 @@ public class AdditionalPropertiesClass implements Serializable {
return this;
}
public AdditionalPropertiesClass removeMapStringItem(String mapStringItem) {
if (mapStringItem != null && this.mapString != null) {
this.mapString.remove(mapStringItem);
public AdditionalPropertiesClass removeMapStringItem(String key) {
if (this.mapString != null) {
this.mapString.remove(key);
}
return this;
@ -97,9 +97,9 @@ public class AdditionalPropertiesClass implements Serializable {
return this;
}
public AdditionalPropertiesClass removeMapNumberItem(BigDecimal mapNumberItem) {
if (mapNumberItem != null && this.mapNumber != null) {
this.mapNumber.remove(mapNumberItem);
public AdditionalPropertiesClass removeMapNumberItem(String key) {
if (this.mapNumber != null) {
this.mapNumber.remove(key);
}
return this;
@ -132,9 +132,9 @@ public class AdditionalPropertiesClass implements Serializable {
return this;
}
public AdditionalPropertiesClass removeMapIntegerItem(Integer mapIntegerItem) {
if (mapIntegerItem != null && this.mapInteger != null) {
this.mapInteger.remove(mapIntegerItem);
public AdditionalPropertiesClass removeMapIntegerItem(String key) {
if (this.mapInteger != null) {
this.mapInteger.remove(key);
}
return this;
@ -167,9 +167,9 @@ public class AdditionalPropertiesClass implements Serializable {
return this;
}
public AdditionalPropertiesClass removeMapBooleanItem(Boolean mapBooleanItem) {
if (mapBooleanItem != null && this.mapBoolean != null) {
this.mapBoolean.remove(mapBooleanItem);
public AdditionalPropertiesClass removeMapBooleanItem(String key) {
if (this.mapBoolean != null) {
this.mapBoolean.remove(key);
}
return this;
@ -202,9 +202,9 @@ public class AdditionalPropertiesClass implements Serializable {
return this;
}
public AdditionalPropertiesClass removeMapArrayIntegerItem(List<Integer> mapArrayIntegerItem) {
if (mapArrayIntegerItem != null && this.mapArrayInteger != null) {
this.mapArrayInteger.remove(mapArrayIntegerItem);
public AdditionalPropertiesClass removeMapArrayIntegerItem(String key) {
if (this.mapArrayInteger != null) {
this.mapArrayInteger.remove(key);
}
return this;
@ -237,9 +237,9 @@ public class AdditionalPropertiesClass implements Serializable {
return this;
}
public AdditionalPropertiesClass removeMapArrayAnytypeItem(List<Object> mapArrayAnytypeItem) {
if (mapArrayAnytypeItem != null && this.mapArrayAnytype != null) {
this.mapArrayAnytype.remove(mapArrayAnytypeItem);
public AdditionalPropertiesClass removeMapArrayAnytypeItem(String key) {
if (this.mapArrayAnytype != null) {
this.mapArrayAnytype.remove(key);
}
return this;
@ -272,9 +272,9 @@ public class AdditionalPropertiesClass implements Serializable {
return this;
}
public AdditionalPropertiesClass removeMapMapStringItem(Map<String, String> mapMapStringItem) {
if (mapMapStringItem != null && this.mapMapString != null) {
this.mapMapString.remove(mapMapStringItem);
public AdditionalPropertiesClass removeMapMapStringItem(String key) {
if (this.mapMapString != null) {
this.mapMapString.remove(key);
}
return this;
@ -307,9 +307,9 @@ public class AdditionalPropertiesClass implements Serializable {
return this;
}
public AdditionalPropertiesClass removeMapMapAnytypeItem(Map<String, Object> mapMapAnytypeItem) {
if (mapMapAnytypeItem != null && this.mapMapAnytype != null) {
this.mapMapAnytype.remove(mapMapAnytypeItem);
public AdditionalPropertiesClass removeMapMapAnytypeItem(String key) {
if (this.mapMapAnytype != null) {
this.mapMapAnytype.remove(key);
}
return this;

View File

@ -100,9 +100,9 @@ public class MapTest implements Serializable {
return this;
}
public MapTest removeMapMapOfStringItem(Map<String, String> mapMapOfStringItem) {
if (mapMapOfStringItem != null && this.mapMapOfString != null) {
this.mapMapOfString.remove(mapMapOfStringItem);
public MapTest removeMapMapOfStringItem(String key) {
if (this.mapMapOfString != null) {
this.mapMapOfString.remove(key);
}
return this;
@ -135,9 +135,9 @@ public class MapTest implements Serializable {
return this;
}
public MapTest removeMapOfEnumStringItem(InnerEnum mapOfEnumStringItem) {
if (mapOfEnumStringItem != null && this.mapOfEnumString != null) {
this.mapOfEnumString.remove(mapOfEnumStringItem);
public MapTest removeMapOfEnumStringItem(String key) {
if (this.mapOfEnumString != null) {
this.mapOfEnumString.remove(key);
}
return this;
@ -170,9 +170,9 @@ public class MapTest implements Serializable {
return this;
}
public MapTest removeDirectMapItem(Boolean directMapItem) {
if (directMapItem != null && this.directMap != null) {
this.directMap.remove(directMapItem);
public MapTest removeDirectMapItem(String key) {
if (this.directMap != null) {
this.directMap.remove(key);
}
return this;
@ -205,9 +205,9 @@ public class MapTest implements Serializable {
return this;
}
public MapTest removeIndirectMapItem(Boolean indirectMapItem) {
if (indirectMapItem != null && this.indirectMap != null) {
this.indirectMap.remove(indirectMapItem);
public MapTest removeIndirectMapItem(String key) {
if (this.indirectMap != null) {
this.indirectMap.remove(key);
}
return this;

View File

@ -93,9 +93,9 @@ public class MixedPropertiesAndAdditionalPropertiesClass implements Serializabl
return this;
}
public MixedPropertiesAndAdditionalPropertiesClass removeMapItem(Animal mapItem) {
if (mapItem != null && this.map != null) {
this.map.remove(mapItem);
public MixedPropertiesAndAdditionalPropertiesClass removeMapItem(String key) {
if (this.map != null) {
this.map.remove(key);
}
return this;

View File

@ -79,9 +79,9 @@ public class AdditionalPropertiesClass implements Serializable {
return this;
}
public AdditionalPropertiesClass removeMapStringItem(String mapStringItem) {
if (mapStringItem != null && this.mapString != null) {
this.mapString.remove(mapStringItem);
public AdditionalPropertiesClass removeMapStringItem(String key) {
if (this.mapString != null) {
this.mapString.remove(key);
}
return this;
@ -114,9 +114,9 @@ public class AdditionalPropertiesClass implements Serializable {
return this;
}
public AdditionalPropertiesClass removeMapNumberItem(BigDecimal mapNumberItem) {
if (mapNumberItem != null && this.mapNumber != null) {
this.mapNumber.remove(mapNumberItem);
public AdditionalPropertiesClass removeMapNumberItem(String key) {
if (this.mapNumber != null) {
this.mapNumber.remove(key);
}
return this;
@ -149,9 +149,9 @@ public class AdditionalPropertiesClass implements Serializable {
return this;
}
public AdditionalPropertiesClass removeMapIntegerItem(Integer mapIntegerItem) {
if (mapIntegerItem != null && this.mapInteger != null) {
this.mapInteger.remove(mapIntegerItem);
public AdditionalPropertiesClass removeMapIntegerItem(String key) {
if (this.mapInteger != null) {
this.mapInteger.remove(key);
}
return this;
@ -184,9 +184,9 @@ public class AdditionalPropertiesClass implements Serializable {
return this;
}
public AdditionalPropertiesClass removeMapBooleanItem(Boolean mapBooleanItem) {
if (mapBooleanItem != null && this.mapBoolean != null) {
this.mapBoolean.remove(mapBooleanItem);
public AdditionalPropertiesClass removeMapBooleanItem(String key) {
if (this.mapBoolean != null) {
this.mapBoolean.remove(key);
}
return this;
@ -219,9 +219,9 @@ public class AdditionalPropertiesClass implements Serializable {
return this;
}
public AdditionalPropertiesClass removeMapArrayIntegerItem(List<Integer> mapArrayIntegerItem) {
if (mapArrayIntegerItem != null && this.mapArrayInteger != null) {
this.mapArrayInteger.remove(mapArrayIntegerItem);
public AdditionalPropertiesClass removeMapArrayIntegerItem(String key) {
if (this.mapArrayInteger != null) {
this.mapArrayInteger.remove(key);
}
return this;
@ -254,9 +254,9 @@ public class AdditionalPropertiesClass implements Serializable {
return this;
}
public AdditionalPropertiesClass removeMapArrayAnytypeItem(List<Object> mapArrayAnytypeItem) {
if (mapArrayAnytypeItem != null && this.mapArrayAnytype != null) {
this.mapArrayAnytype.remove(mapArrayAnytypeItem);
public AdditionalPropertiesClass removeMapArrayAnytypeItem(String key) {
if (this.mapArrayAnytype != null) {
this.mapArrayAnytype.remove(key);
}
return this;
@ -289,9 +289,9 @@ public class AdditionalPropertiesClass implements Serializable {
return this;
}
public AdditionalPropertiesClass removeMapMapStringItem(Map<String, String> mapMapStringItem) {
if (mapMapStringItem != null && this.mapMapString != null) {
this.mapMapString.remove(mapMapStringItem);
public AdditionalPropertiesClass removeMapMapStringItem(String key) {
if (this.mapMapString != null) {
this.mapMapString.remove(key);
}
return this;
@ -324,9 +324,9 @@ public class AdditionalPropertiesClass implements Serializable {
return this;
}
public AdditionalPropertiesClass removeMapMapAnytypeItem(Map<String, Object> mapMapAnytypeItem) {
if (mapMapAnytypeItem != null && this.mapMapAnytype != null) {
this.mapMapAnytype.remove(mapMapAnytypeItem);
public AdditionalPropertiesClass removeMapMapAnytypeItem(String key) {
if (this.mapMapAnytype != null) {
this.mapMapAnytype.remove(key);
}
return this;

View File

@ -110,9 +110,9 @@ public class MapTest implements Serializable {
return this;
}
public MapTest removeMapMapOfStringItem(Map<String, String> mapMapOfStringItem) {
if (mapMapOfStringItem != null && this.mapMapOfString != null) {
this.mapMapOfString.remove(mapMapOfStringItem);
public MapTest removeMapMapOfStringItem(String key) {
if (this.mapMapOfString != null) {
this.mapMapOfString.remove(key);
}
return this;
@ -145,9 +145,9 @@ public class MapTest implements Serializable {
return this;
}
public MapTest removeMapOfEnumStringItem(InnerEnum mapOfEnumStringItem) {
if (mapOfEnumStringItem != null && this.mapOfEnumString != null) {
this.mapOfEnumString.remove(mapOfEnumStringItem);
public MapTest removeMapOfEnumStringItem(String key) {
if (this.mapOfEnumString != null) {
this.mapOfEnumString.remove(key);
}
return this;
@ -180,9 +180,9 @@ public class MapTest implements Serializable {
return this;
}
public MapTest removeDirectMapItem(Boolean directMapItem) {
if (directMapItem != null && this.directMap != null) {
this.directMap.remove(directMapItem);
public MapTest removeDirectMapItem(String key) {
if (this.directMap != null) {
this.directMap.remove(key);
}
return this;
@ -215,9 +215,9 @@ public class MapTest implements Serializable {
return this;
}
public MapTest removeIndirectMapItem(Boolean indirectMapItem) {
if (indirectMapItem != null && this.indirectMap != null) {
this.indirectMap.remove(indirectMapItem);
public MapTest removeIndirectMapItem(String key) {
if (this.indirectMap != null) {
this.indirectMap.remove(key);
}
return this;

View File

@ -102,9 +102,9 @@ public class MixedPropertiesAndAdditionalPropertiesClass implements Serializabl
return this;
}
public MixedPropertiesAndAdditionalPropertiesClass removeMapItem(Animal mapItem) {
if (mapItem != null && this.map != null) {
this.map.remove(mapItem);
public MixedPropertiesAndAdditionalPropertiesClass removeMapItem(String key) {
if (this.map != null) {
this.map.remove(key);
}
return this;

View File

@ -77,9 +77,9 @@ public class AdditionalPropertiesClass implements Serializable {
return this;
}
public AdditionalPropertiesClass removeMapStringItem(String mapStringItem) {
if (mapStringItem != null && this.mapString != null) {
this.mapString.remove(mapStringItem);
public AdditionalPropertiesClass removeMapStringItem(String key) {
if (this.mapString != null) {
this.mapString.remove(key);
}
return this;
@ -112,9 +112,9 @@ public class AdditionalPropertiesClass implements Serializable {
return this;
}
public AdditionalPropertiesClass removeMapNumberItem(BigDecimal mapNumberItem) {
if (mapNumberItem != null && this.mapNumber != null) {
this.mapNumber.remove(mapNumberItem);
public AdditionalPropertiesClass removeMapNumberItem(String key) {
if (this.mapNumber != null) {
this.mapNumber.remove(key);
}
return this;
@ -147,9 +147,9 @@ public class AdditionalPropertiesClass implements Serializable {
return this;
}
public AdditionalPropertiesClass removeMapIntegerItem(Integer mapIntegerItem) {
if (mapIntegerItem != null && this.mapInteger != null) {
this.mapInteger.remove(mapIntegerItem);
public AdditionalPropertiesClass removeMapIntegerItem(String key) {
if (this.mapInteger != null) {
this.mapInteger.remove(key);
}
return this;
@ -182,9 +182,9 @@ public class AdditionalPropertiesClass implements Serializable {
return this;
}
public AdditionalPropertiesClass removeMapBooleanItem(Boolean mapBooleanItem) {
if (mapBooleanItem != null && this.mapBoolean != null) {
this.mapBoolean.remove(mapBooleanItem);
public AdditionalPropertiesClass removeMapBooleanItem(String key) {
if (this.mapBoolean != null) {
this.mapBoolean.remove(key);
}
return this;
@ -217,9 +217,9 @@ public class AdditionalPropertiesClass implements Serializable {
return this;
}
public AdditionalPropertiesClass removeMapArrayIntegerItem(List<Integer> mapArrayIntegerItem) {
if (mapArrayIntegerItem != null && this.mapArrayInteger != null) {
this.mapArrayInteger.remove(mapArrayIntegerItem);
public AdditionalPropertiesClass removeMapArrayIntegerItem(String key) {
if (this.mapArrayInteger != null) {
this.mapArrayInteger.remove(key);
}
return this;
@ -252,9 +252,9 @@ public class AdditionalPropertiesClass implements Serializable {
return this;
}
public AdditionalPropertiesClass removeMapArrayAnytypeItem(List<Object> mapArrayAnytypeItem) {
if (mapArrayAnytypeItem != null && this.mapArrayAnytype != null) {
this.mapArrayAnytype.remove(mapArrayAnytypeItem);
public AdditionalPropertiesClass removeMapArrayAnytypeItem(String key) {
if (this.mapArrayAnytype != null) {
this.mapArrayAnytype.remove(key);
}
return this;
@ -287,9 +287,9 @@ public class AdditionalPropertiesClass implements Serializable {
return this;
}
public AdditionalPropertiesClass removeMapMapStringItem(Map<String, String> mapMapStringItem) {
if (mapMapStringItem != null && this.mapMapString != null) {
this.mapMapString.remove(mapMapStringItem);
public AdditionalPropertiesClass removeMapMapStringItem(String key) {
if (this.mapMapString != null) {
this.mapMapString.remove(key);
}
return this;
@ -322,9 +322,9 @@ public class AdditionalPropertiesClass implements Serializable {
return this;
}
public AdditionalPropertiesClass removeMapMapAnytypeItem(Map<String, Object> mapMapAnytypeItem) {
if (mapMapAnytypeItem != null && this.mapMapAnytype != null) {
this.mapMapAnytype.remove(mapMapAnytypeItem);
public AdditionalPropertiesClass removeMapMapAnytypeItem(String key) {
if (this.mapMapAnytype != null) {
this.mapMapAnytype.remove(key);
}
return this;

View File

@ -108,9 +108,9 @@ public class MapTest implements Serializable {
return this;
}
public MapTest removeMapMapOfStringItem(Map<String, String> mapMapOfStringItem) {
if (mapMapOfStringItem != null && this.mapMapOfString != null) {
this.mapMapOfString.remove(mapMapOfStringItem);
public MapTest removeMapMapOfStringItem(String key) {
if (this.mapMapOfString != null) {
this.mapMapOfString.remove(key);
}
return this;
@ -143,9 +143,9 @@ public class MapTest implements Serializable {
return this;
}
public MapTest removeMapOfEnumStringItem(InnerEnum mapOfEnumStringItem) {
if (mapOfEnumStringItem != null && this.mapOfEnumString != null) {
this.mapOfEnumString.remove(mapOfEnumStringItem);
public MapTest removeMapOfEnumStringItem(String key) {
if (this.mapOfEnumString != null) {
this.mapOfEnumString.remove(key);
}
return this;
@ -178,9 +178,9 @@ public class MapTest implements Serializable {
return this;
}
public MapTest removeDirectMapItem(Boolean directMapItem) {
if (directMapItem != null && this.directMap != null) {
this.directMap.remove(directMapItem);
public MapTest removeDirectMapItem(String key) {
if (this.directMap != null) {
this.directMap.remove(key);
}
return this;
@ -213,9 +213,9 @@ public class MapTest implements Serializable {
return this;
}
public MapTest removeIndirectMapItem(Boolean indirectMapItem) {
if (indirectMapItem != null && this.indirectMap != null) {
this.indirectMap.remove(indirectMapItem);
public MapTest removeIndirectMapItem(String key) {
if (this.indirectMap != null) {
this.indirectMap.remove(key);
}
return this;

View File

@ -100,9 +100,9 @@ public class MixedPropertiesAndAdditionalPropertiesClass implements Serializabl
return this;
}
public MixedPropertiesAndAdditionalPropertiesClass removeMapItem(Animal mapItem) {
if (mapItem != null && this.map != null) {
this.map.remove(mapItem);
public MixedPropertiesAndAdditionalPropertiesClass removeMapItem(String key) {
if (this.map != null) {
this.map.remove(key);
}
return this;

View File

@ -57,9 +57,9 @@ public class AdditionalPropertiesClass implements Serializable {
return this;
}
public AdditionalPropertiesClass removeMapPropertyItem(String mapPropertyItem) {
if (mapPropertyItem != null && this.mapProperty != null) {
this.mapProperty.remove(mapPropertyItem);
public AdditionalPropertiesClass removeMapPropertyItem(String key) {
if (this.mapProperty != null) {
this.mapProperty.remove(key);
}
return this;
@ -92,9 +92,9 @@ public class AdditionalPropertiesClass implements Serializable {
return this;
}
public AdditionalPropertiesClass removeMapOfMapPropertyItem(Map<String, String> mapOfMapPropertyItem) {
if (mapOfMapPropertyItem != null && this.mapOfMapProperty != null) {
this.mapOfMapProperty.remove(mapOfMapPropertyItem);
public AdditionalPropertiesClass removeMapOfMapPropertyItem(String key) {
if (this.mapOfMapProperty != null) {
this.mapOfMapProperty.remove(key);
}
return this;

View File

@ -78,9 +78,9 @@ public class FakeBigDecimalMap200Response implements Serializable {
return this;
}
public FakeBigDecimalMap200Response removeSomeMapItem(BigDecimal someMapItem) {
if (someMapItem != null && this.someMap != null) {
this.someMap.remove(someMapItem);
public FakeBigDecimalMap200Response removeSomeMapItem(String key) {
if (this.someMap != null) {
this.someMap.remove(key);
}
return this;

View File

@ -108,9 +108,9 @@ public class MapTest implements Serializable {
return this;
}
public MapTest removeMapMapOfStringItem(Map<String, String> mapMapOfStringItem) {
if (mapMapOfStringItem != null && this.mapMapOfString != null) {
this.mapMapOfString.remove(mapMapOfStringItem);
public MapTest removeMapMapOfStringItem(String key) {
if (this.mapMapOfString != null) {
this.mapMapOfString.remove(key);
}
return this;
@ -143,9 +143,9 @@ public class MapTest implements Serializable {
return this;
}
public MapTest removeMapOfEnumStringItem(InnerEnum mapOfEnumStringItem) {
if (mapOfEnumStringItem != null && this.mapOfEnumString != null) {
this.mapOfEnumString.remove(mapOfEnumStringItem);
public MapTest removeMapOfEnumStringItem(String key) {
if (this.mapOfEnumString != null) {
this.mapOfEnumString.remove(key);
}
return this;
@ -178,9 +178,9 @@ public class MapTest implements Serializable {
return this;
}
public MapTest removeDirectMapItem(Boolean directMapItem) {
if (directMapItem != null && this.directMap != null) {
this.directMap.remove(directMapItem);
public MapTest removeDirectMapItem(String key) {
if (this.directMap != null) {
this.directMap.remove(key);
}
return this;
@ -213,9 +213,9 @@ public class MapTest implements Serializable {
return this;
}
public MapTest removeIndirectMapItem(Boolean indirectMapItem) {
if (indirectMapItem != null && this.indirectMap != null) {
this.indirectMap.remove(indirectMapItem);
public MapTest removeIndirectMapItem(String key) {
if (this.indirectMap != null) {
this.indirectMap.remove(key);
}
return this;

View File

@ -100,9 +100,9 @@ public class MixedPropertiesAndAdditionalPropertiesClass implements Serializabl
return this;
}
public MixedPropertiesAndAdditionalPropertiesClass removeMapItem(Animal mapItem) {
if (mapItem != null && this.map != null) {
this.map.remove(mapItem);
public MixedPropertiesAndAdditionalPropertiesClass removeMapItem(String key) {
if (this.map != null) {
this.map.remove(key);
}
return this;

View File

@ -285,9 +285,9 @@ public class NullableClass extends HashMap<String, Object> implements Serializab
return this;
}
public NullableClass removeObjectNullablePropItem(Object objectNullablePropItem) {
if (objectNullablePropItem != null && this.objectNullableProp != null) {
this.objectNullableProp.remove(objectNullablePropItem);
public NullableClass removeObjectNullablePropItem(String key) {
if (this.objectNullableProp != null) {
this.objectNullableProp.remove(key);
}
return this;
@ -320,9 +320,9 @@ public class NullableClass extends HashMap<String, Object> implements Serializab
return this;
}
public NullableClass removeObjectAndItemsNullablePropItem(Object objectAndItemsNullablePropItem) {
if (objectAndItemsNullablePropItem != null && this.objectAndItemsNullableProp != null) {
this.objectAndItemsNullableProp.remove(objectAndItemsNullablePropItem);
public NullableClass removeObjectAndItemsNullablePropItem(String key) {
if (this.objectAndItemsNullableProp != null) {
this.objectAndItemsNullableProp.remove(key);
}
return this;
@ -355,9 +355,9 @@ public class NullableClass extends HashMap<String, Object> implements Serializab
return this;
}
public NullableClass removeObjectItemsNullableItem(Object objectItemsNullableItem) {
if (objectItemsNullableItem != null && this.objectItemsNullable != null) {
this.objectItemsNullable.remove(objectItemsNullableItem);
public NullableClass removeObjectItemsNullableItem(String key) {
if (this.objectItemsNullable != null) {
this.objectItemsNullable.remove(key);
}
return this;

View File

@ -79,9 +79,9 @@ public class AdditionalPropertiesClass implements Serializable {
return this;
}
public AdditionalPropertiesClass removeMapStringItem(String mapStringItem) {
if (mapStringItem != null && this.mapString != null) {
this.mapString.remove(mapStringItem);
public AdditionalPropertiesClass removeMapStringItem(String key) {
if (this.mapString != null) {
this.mapString.remove(key);
}
return this;
@ -114,9 +114,9 @@ public class AdditionalPropertiesClass implements Serializable {
return this;
}
public AdditionalPropertiesClass removeMapNumberItem(BigDecimal mapNumberItem) {
if (mapNumberItem != null && this.mapNumber != null) {
this.mapNumber.remove(mapNumberItem);
public AdditionalPropertiesClass removeMapNumberItem(String key) {
if (this.mapNumber != null) {
this.mapNumber.remove(key);
}
return this;
@ -149,9 +149,9 @@ public class AdditionalPropertiesClass implements Serializable {
return this;
}
public AdditionalPropertiesClass removeMapIntegerItem(Integer mapIntegerItem) {
if (mapIntegerItem != null && this.mapInteger != null) {
this.mapInteger.remove(mapIntegerItem);
public AdditionalPropertiesClass removeMapIntegerItem(String key) {
if (this.mapInteger != null) {
this.mapInteger.remove(key);
}
return this;
@ -184,9 +184,9 @@ public class AdditionalPropertiesClass implements Serializable {
return this;
}
public AdditionalPropertiesClass removeMapBooleanItem(Boolean mapBooleanItem) {
if (mapBooleanItem != null && this.mapBoolean != null) {
this.mapBoolean.remove(mapBooleanItem);
public AdditionalPropertiesClass removeMapBooleanItem(String key) {
if (this.mapBoolean != null) {
this.mapBoolean.remove(key);
}
return this;
@ -219,9 +219,9 @@ public class AdditionalPropertiesClass implements Serializable {
return this;
}
public AdditionalPropertiesClass removeMapArrayIntegerItem(List<Integer> mapArrayIntegerItem) {
if (mapArrayIntegerItem != null && this.mapArrayInteger != null) {
this.mapArrayInteger.remove(mapArrayIntegerItem);
public AdditionalPropertiesClass removeMapArrayIntegerItem(String key) {
if (this.mapArrayInteger != null) {
this.mapArrayInteger.remove(key);
}
return this;
@ -254,9 +254,9 @@ public class AdditionalPropertiesClass implements Serializable {
return this;
}
public AdditionalPropertiesClass removeMapArrayAnytypeItem(List<Object> mapArrayAnytypeItem) {
if (mapArrayAnytypeItem != null && this.mapArrayAnytype != null) {
this.mapArrayAnytype.remove(mapArrayAnytypeItem);
public AdditionalPropertiesClass removeMapArrayAnytypeItem(String key) {
if (this.mapArrayAnytype != null) {
this.mapArrayAnytype.remove(key);
}
return this;
@ -289,9 +289,9 @@ public class AdditionalPropertiesClass implements Serializable {
return this;
}
public AdditionalPropertiesClass removeMapMapStringItem(Map<String, String> mapMapStringItem) {
if (mapMapStringItem != null && this.mapMapString != null) {
this.mapMapString.remove(mapMapStringItem);
public AdditionalPropertiesClass removeMapMapStringItem(String key) {
if (this.mapMapString != null) {
this.mapMapString.remove(key);
}
return this;
@ -324,9 +324,9 @@ public class AdditionalPropertiesClass implements Serializable {
return this;
}
public AdditionalPropertiesClass removeMapMapAnytypeItem(Map<String, Object> mapMapAnytypeItem) {
if (mapMapAnytypeItem != null && this.mapMapAnytype != null) {
this.mapMapAnytype.remove(mapMapAnytypeItem);
public AdditionalPropertiesClass removeMapMapAnytypeItem(String key) {
if (this.mapMapAnytype != null) {
this.mapMapAnytype.remove(key);
}
return this;

View File

@ -110,9 +110,9 @@ public class MapTest implements Serializable {
return this;
}
public MapTest removeMapMapOfStringItem(Map<String, String> mapMapOfStringItem) {
if (mapMapOfStringItem != null && this.mapMapOfString != null) {
this.mapMapOfString.remove(mapMapOfStringItem);
public MapTest removeMapMapOfStringItem(String key) {
if (this.mapMapOfString != null) {
this.mapMapOfString.remove(key);
}
return this;
@ -145,9 +145,9 @@ public class MapTest implements Serializable {
return this;
}
public MapTest removeMapOfEnumStringItem(InnerEnum mapOfEnumStringItem) {
if (mapOfEnumStringItem != null && this.mapOfEnumString != null) {
this.mapOfEnumString.remove(mapOfEnumStringItem);
public MapTest removeMapOfEnumStringItem(String key) {
if (this.mapOfEnumString != null) {
this.mapOfEnumString.remove(key);
}
return this;
@ -180,9 +180,9 @@ public class MapTest implements Serializable {
return this;
}
public MapTest removeDirectMapItem(Boolean directMapItem) {
if (directMapItem != null && this.directMap != null) {
this.directMap.remove(directMapItem);
public MapTest removeDirectMapItem(String key) {
if (this.directMap != null) {
this.directMap.remove(key);
}
return this;
@ -215,9 +215,9 @@ public class MapTest implements Serializable {
return this;
}
public MapTest removeIndirectMapItem(Boolean indirectMapItem) {
if (indirectMapItem != null && this.indirectMap != null) {
this.indirectMap.remove(indirectMapItem);
public MapTest removeIndirectMapItem(String key) {
if (this.indirectMap != null) {
this.indirectMap.remove(key);
}
return this;

View File

@ -102,9 +102,9 @@ public class MixedPropertiesAndAdditionalPropertiesClass implements Serializabl
return this;
}
public MixedPropertiesAndAdditionalPropertiesClass removeMapItem(Animal mapItem) {
if (mapItem != null && this.map != null) {
this.map.remove(mapItem);
public MixedPropertiesAndAdditionalPropertiesClass removeMapItem(String key) {
if (this.map != null) {
this.map.remove(key);
}
return this;