ai.grakn.redismock.RedisCommand Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of redis-mock Show documentation
Show all versions of redis-mock Show documentation
In memory Redis mock for testing
package ai.grakn.redismock;
import com.google.common.collect.Lists;
import java.util.List;
import java.util.stream.Collectors;
/**
* Created by Xiaolu on 2015/4/20.
*/
public class RedisCommand {
private List params = Lists.newArrayList();
RedisCommand() {}
void addParameter(Slice token) {
this.params.add(token);
}
public List getParameters() {
return params;
}
@Override
public String toString(){
return params.stream().map(Slice::toString).collect(Collectors.joining(" "));
}
}