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>setThe 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 voidadd(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.SetBuilderAdds a literal to the set.- Specified by:
addin interfaceJexlArithmetic.SetBuilder- Parameters:
value- the item to add
-
create
public java.util.Set<?> create()
Description copied from interface:JexlArithmetic.SetBuilderCreates the actual "set" instance.- Specified by:
createin interfaceJexlArithmetic.SetBuilder- Returns:
- the set
-
-