com.github.basking2.sdsai.itrex.functions.StringConcatFunction Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sdsai-itrex Show documentation
Show all versions of sdsai-itrex Show documentation
An S-Expression inspiried library focused on iterators.
package com.github.basking2.sdsai.itrex.functions;
import com.github.basking2.sdsai.itrex.EvaluationContext;
import java.util.Iterator;
public class StringConcatFunction implements FunctionInterface {
@Override
public String apply(final Iterator> iterator, final EvaluationContext evaluationContext) {
final StringBuilder sb = new StringBuilder();
while (iterator.hasNext()) {
sb.append(iterator.next().toString());
}
return sb.toString();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy