[builder] Added clearX() functionality for @Singular annotations for javac. Also docs and changelog.

This commit is contained in:
Reinier Zwitserloot committed 2015-11-16 23:46:12 +01:00
1 parent ae4035c9bf
commit bd78d08417
17 files changed
+245 -6

No files matched your search

@@ -57,6 +57,14 @@ class BuilderSingularMaps<K, V> {
return this;
}
@SuppressWarnings("all")
public BuilderSingularMapsBuilder<K, V> clearWomen() {
if (this.women$key != null) {
this.women$key.clear();
this.women$value.clear();
}
return this;
}
@SuppressWarnings("all")
public BuilderSingularMapsBuilder<K, V> man(K manKey, Number manValue) {
if (this.men$key == null) {
this.men$key = new java.util.ArrayList<K>();
@@ -79,6 +87,14 @@ class BuilderSingularMaps<K, V> {
return this;
}
@SuppressWarnings("all")
public BuilderSingularMapsBuilder<K, V> clearMen() {
if (this.men$key != null) {
this.men$key.clear();
this.men$value.clear();
}
return this;
}
@SuppressWarnings("all")
public BuilderSingularMapsBuilder<K, V> rawMap(Object rawMapKey, Object rawMapValue) {
if (this.rawMap$key == null) {
this.rawMap$key = new java.util.ArrayList<Object>();
@@ -101,6 +117,14 @@ class BuilderSingularMaps<K, V> {
return this;
}
@SuppressWarnings("all")
public BuilderSingularMapsBuilder<K, V> clearRawMap() {
if (this.rawMap$key != null) {
this.rawMap$key.clear();
this.rawMap$value.clear();
}
return this;
}
@SuppressWarnings("all")
public BuilderSingularMapsBuilder<K, V> stringMap(String stringMapKey, V stringMapValue) {
if (this.stringMap$key == null) {
this.stringMap$key = new java.util.ArrayList<String>();
@@ -123,6 +147,14 @@ class BuilderSingularMaps<K, V> {
return this;
}
@SuppressWarnings("all")
public BuilderSingularMapsBuilder<K, V> clearStringMap() {
if (this.stringMap$key != null) {
this.stringMap$key.clear();
this.stringMap$value.clear();
}
return this;
}
@SuppressWarnings("all")
public BuilderSingularMaps<K, V> build() {
java.util.Map<K, V> women;
switch (this.women$key == null ? 0 : this.women$key.size()) {