io.virtdata.basicsmappers.unary_string.Load Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of virtdata-lib-realer Show documentation
Show all versions of virtdata-lib-realer Show documentation
With inspiration from other libraries
package io.virtdata.basicsmappers.unary_string;
import io.virtdata.annotations.Categories;
import io.virtdata.annotations.Category;
import io.virtdata.annotations.Example;
import io.virtdata.annotations.ThreadSafeMapper;
import io.virtdata.threadstate.ThreadLocalState;
import java.util.function.Function;
@ThreadSafeMapper
public class Load implements Function {
private final String name;
@Example({"Load('foo')","load a String value from the named variable for this thread"})
public Load(String name) {
this.name = name;
}
@Override
public String apply(String s) {
Object o = ThreadLocalState.tl_ObjectMap.get().get(name);
return (String) o;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy