6
6
import java .time .ZonedDateTime ;
7
7
import java .time .format .DateTimeFormatter ;
8
8
import java .util .HashMap ;
9
+ import java .util .Iterator ;
9
10
import java .util .Map ;
10
11
11
12
@ ToString @ EqualsAndHashCode
@@ -39,6 +40,10 @@ public <T> T getStructureAttribute(String key, Class<T> klass) {
39
40
return objMapper .readValue (val , klass );
40
41
}
41
42
43
+ public Iterator <Map .Entry <String , String >> getStructureAttributes () {
44
+ return jsonAttributes .entrySet ().iterator ();
45
+ }
46
+
42
47
public void addStringAttribute (String key , String value ) {
43
48
stringAttributes .put (key , value );
44
49
}
@@ -47,6 +52,10 @@ public String getStringAttribute(String key) {
47
52
return stringAttributes .get (key );
48
53
}
49
54
55
+ public Iterator <Map .Entry <String , String >> getStringAttributes () {
56
+ return stringAttributes .entrySet ().iterator ();
57
+ }
58
+
50
59
public void addIntegerAttribute (String key , Integer value ) {
51
60
integerAttributes .put (key , value );
52
61
}
@@ -55,6 +64,10 @@ public Integer getIntegerAttribute(String key) {
55
64
return integerAttributes .get (key );
56
65
}
57
66
67
+ public Iterator <Map .Entry <String , Integer >> getIntegerAttributes () {
68
+ return integerAttributes .entrySet ().iterator ();
69
+ }
70
+
58
71
public Boolean getBooleanAttribute (String key ) {
59
72
return booleanAttributes .get (key );
60
73
}
@@ -63,6 +76,10 @@ public void addBooleanAttribute(String key, Boolean b) {
63
76
booleanAttributes .put (key , b );
64
77
}
65
78
79
+ public Iterator <Map .Entry <String , Boolean >> getBooleanAttributes () {
80
+ return booleanAttributes .entrySet ().iterator ();
81
+ }
82
+
66
83
public void addDatetimeAttribute (String key , ZonedDateTime value ) {
67
84
this .stringAttributes .put (key , value .format (DateTimeFormatter .ISO_ZONED_DATE_TIME ));
68
85
}
0 commit comments