
org.jsimpledb.parse.util.AddPrefixFunction Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jsimpledb-parse Show documentation
Show all versions of jsimpledb-parse Show documentation
JSimpleDB classes for parsing Java expressions.
/*
* Copyright (C) 2015 Archie L. Cobbs. All rights reserved.
*/
package org.jsimpledb.parse.util;
import com.google.common.base.Function;
import com.google.common.base.Preconditions;
/**
* Adds a prefix.
*/
public class AddPrefixFunction implements Function {
private final String prefix;
public AddPrefixFunction(String prefix) {
Preconditions.checkArgument(prefix != null, "null prefix");
this.prefix = prefix;
}
@Override
public String apply(String string) {
Preconditions.checkArgument(string != null, "null string");
return this.prefix + string;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy