5
5
import net .quickwrite .fluent4j .ast .placeable .StringLiteral ;
6
6
import net .quickwrite .fluent4j .functions .NumberFunction ;
7
7
import net .quickwrite .fluent4j .util .args .FluentArgs ;
8
- import net .quickwrite .fluent4j .util .args .ResourceFluentArguments ;
8
+ import net .quickwrite .fluent4j .util .args .FluentArguments ;
9
9
10
10
/**
11
11
* The builder class for the {@link FluentArgs} class.
@@ -45,7 +45,7 @@ public class FluentArgsBuilder extends AbstractBuilder<FluentArgs> {
45
45
* </ol>
46
46
*/
47
47
public FluentArgsBuilder () {
48
- super (new ResourceFluentArguments ());
48
+ super (new FluentArguments ());
49
49
}
50
50
51
51
/**
@@ -55,7 +55,7 @@ public FluentArgsBuilder() {
55
55
* @param argument The argument itself with all of it's data
56
56
* @return The FluentArgsBuilder object itself
57
57
*/
58
- public FluentArgsBuilder setNamed (final String key , final FluentElement argument ) {
58
+ public FluentArgsBuilder set (final String key , final FluentElement argument ) {
59
59
this .element .setNamed (key , argument );
60
60
61
61
return this ;
@@ -68,8 +68,8 @@ public FluentArgsBuilder setNamed(final String key, final FluentElement argument
68
68
* @param argument The argument itself with all of it's data
69
69
* @return The FluentArgsBuilder object itself
70
70
*/
71
- public FluentArgsBuilder setNamed (final String key , final String argument ) {
72
- return this .setNamed (key , new StringLiteral (argument ));
71
+ public FluentArgsBuilder set (final String key , final String argument ) {
72
+ return this .set (key , new StringLiteral (argument ));
73
73
}
74
74
75
75
/**
@@ -79,48 +79,19 @@ public FluentArgsBuilder setNamed(final String key, final String argument) {
79
79
* @param argument The argument itself with all of it's data
80
80
* @return The FluentArgsBuilder object itself
81
81
*/
82
- public FluentArgsBuilder setNamed (final String key , final Number argument ) {
83
- return this .setNamed (key , new NumberLiteral (argument ));
82
+ public FluentArgsBuilder set (final String key , final Number argument ) {
83
+ return this .set (key , new NumberLiteral (argument ));
84
84
}
85
85
86
86
/**
87
- * Adds a positional argument to the argument list.
88
- *
89
- * <p>
90
- * The argument will always be added at the end and cannot be rearranged.
91
- *
92
- * @param argument The argument itself with all of it's data
93
- * @return The FluentArgsBuilder object itself
94
- */
95
- public FluentArgsBuilder addPositional (final FluentElement argument ) {
96
- this .element .addPositional (argument );
97
-
98
- return this ;
99
- }
100
-
101
- /**
102
- * Adds a positional {@link String} argument to the argument list.
103
- *
104
- * <p>
105
- * The argument will always be added at the end and cannot be rearranged.
106
- *
107
- * @param argument The argument itself with all of it's data
108
- * @return The FluentArgsBuilder object itself
109
- */
110
- public FluentArgsBuilder addPositional (final String argument ) {
111
- return this .addPositional (new StringLiteral (argument ));
112
- }
113
-
114
- /**
115
- * Adds a positional {@link Number} argument to the argument list.
116
- *
117
- * <p>
118
- * The argument will always be added at the end and cannot be rearranged.
87
+ * Adds a named {@link Boolean} to the {@link FluentArgs} that can be
88
+ * accessed.
119
89
*
90
+ * @param key The key that is used to access this argument
120
91
* @param argument The argument itself with all of it's data
121
92
* @return The FluentArgsBuilder object itself
122
93
*/
123
- public FluentArgsBuilder addPositional (final Number argument ) {
124
- return this .addPositional ( new NumberLiteral ( argument ));
94
+ public FluentArgsBuilder set (final String key , final Boolean argument ) {
95
+ return this .set ( key , argument . toString ( ));
125
96
}
126
97
}
0 commit comments