File tree Expand file tree Collapse file tree 5 files changed +0
-43
lines changed
experimental/lambda/src/main/java/io/serverlessworkflow/impl/expressions/func
core/src/main/java/io/serverlessworkflow/impl
jackson/src/main/java/io/serverlessworkflow/impl/expressions/jq Expand file tree Collapse file tree 5 files changed +0
-43
lines changed Original file line number Diff line number Diff line change 22
22
import java .util .Map ;
23
23
import java .util .Map .Entry ;
24
24
import java .util .Optional ;
25
- import java .util .function .BiConsumer ;
26
25
import java .util .stream .Collectors ;
27
26
28
27
public class JavaModel implements WorkflowModel {
@@ -37,17 +36,6 @@ protected void setObject(Object object) {
37
36
this .object = object ;
38
37
}
39
38
40
- @ Override
41
- public void forEach (BiConsumer <String , WorkflowModel > consumer ) {
42
- asMap ()
43
- .ifPresent (
44
- m ->
45
- m .forEach (
46
- (k , v ) ->
47
- consumer .accept (
48
- k , v instanceof WorkflowModel model ? model : new JavaModel (v ))));
49
- }
50
-
51
39
@ Override
52
40
public Optional <Boolean > asBoolean () {
53
41
return object instanceof Boolean value ? Optional .of (value ) : Optional .empty ();
@@ -99,11 +87,6 @@ static Object asJavaObject(Object object) {
99
87
}
100
88
}
101
89
102
- @ Override
103
- public Object asIs () {
104
- return object ;
105
- }
106
-
107
90
@ Override
108
91
public Class <?> objectClass () {
109
92
return object != null ? object .getClass () : Object .class ;
Original file line number Diff line number Diff line change @@ -132,11 +132,6 @@ public Object asJavaObject() {
132
132
return object ;
133
133
}
134
134
135
- @ Override
136
- public Object asIs () {
137
- return object ;
138
- }
139
-
140
135
@ Override
141
136
public Class <?> objectClass () {
142
137
return object .getClass ();
Original file line number Diff line number Diff line change 19
19
import java .util .Collection ;
20
20
import java .util .Map ;
21
21
import java .util .Optional ;
22
- import java .util .function .BiConsumer ;
23
22
24
23
public interface WorkflowModel {
25
24
26
- void forEach (BiConsumer <String , WorkflowModel > consumer );
27
-
28
25
Optional <Boolean > asBoolean ();
29
26
30
27
Collection <WorkflowModel > asCollection ();
@@ -39,8 +36,6 @@ public interface WorkflowModel {
39
36
40
37
Object asJavaObject ();
41
38
42
- Object asIs ();
43
-
44
39
Class <?> objectClass ();
45
40
46
41
<T > Optional <T > as (Class <T > clazz );
Original file line number Diff line number Diff line change 27
27
import java .util .Collections ;
28
28
import java .util .Map ;
29
29
import java .util .Optional ;
30
- import java .util .function .BiConsumer ;
31
30
32
31
@ JsonSerialize (using = JacksonModelSerializer .class )
33
32
public class JacksonModel implements WorkflowModel {
@@ -42,11 +41,6 @@ public class JacksonModel implements WorkflowModel {
42
41
this .node = node ;
43
42
}
44
43
45
- @ Override
46
- public void forEach (BiConsumer <String , WorkflowModel > consumer ) {
47
- node .forEachEntry ((k , v ) -> consumer .accept (k , new JacksonModel (v )));
48
- }
49
-
50
44
@ Override
51
45
public Optional <Boolean > asBoolean () {
52
46
return node .isBoolean () ? Optional .of (node .asBoolean ()) : Optional .empty ();
@@ -97,11 +91,6 @@ public Object asJavaObject() {
97
91
return JsonUtils .toJavaValue (node );
98
92
}
99
93
100
- @ Override
101
- public Object asIs () {
102
- return node ;
103
- }
104
-
105
94
@ Override
106
95
public Class <?> objectClass () {
107
96
return node .getClass ();
Original file line number Diff line number Diff line change @@ -145,11 +145,6 @@ public Object asJavaObject() {
145
145
return JsonUtils .toJavaValue (node );
146
146
}
147
147
148
- @ Override
149
- public Object asIs () {
150
- return node ;
151
- }
152
-
153
148
@ Override
154
149
public Class <?> objectClass () {
155
150
return ArrayNode .class ;
You can’t perform that action at this time.
0 commit comments