Class SetBuilder
- java.lang.Object
-
- org.apache.commons.jexl3.internal.SetBuilder
-
- All Implemented Interfaces:
JexlArithmetic.SetBuilder
public class SetBuilder extends java.lang.Object implements JexlArithmetic.SetBuilder
Helper class to create set literals.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.Set<java.lang.Object>
set
The set being created.
-
Constructor Summary
Constructors Constructor Description SetBuilder(int size)
Creates a new builder.SetBuilder(int size, boolean extended)
Creates a new builder.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(java.lang.Object value)
Adds a literal to the set.java.util.Set<?>
create()
Creates the actual "set" instance.
-
-
-
Method Detail
-
add
public void add(java.lang.Object value)
Description copied from interface:JexlArithmetic.SetBuilder
Adds a literal to the set.- Specified by:
add
in interfaceJexlArithmetic.SetBuilder
- Parameters:
value
- the item to add
-
create
public java.util.Set<?> create()
Description copied from interface:JexlArithmetic.SetBuilder
Creates the actual "set" instance.- Specified by:
create
in interfaceJexlArithmetic.SetBuilder
- Returns:
- the set
-
-