All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.lordofthejars.nosqlunit.redis.embedded.ByteBufferAsString2DoubleConverter Maven / Gradle / Ivy

There is a newer version: 1.0.0
Show newest version
package com.lordofthejars.nosqlunit.redis.embedded;

import java.nio.ByteBuffer;

import redis.clients.util.SafeEncoder;
import ch.lambdaj.function.convert.Converter;

public class ByteBufferAsString2DoubleConverter implements Converter {

	public static ByteBufferAsString2DoubleConverter createByteBufferAsStringToDoubleConverter() {
		return new ByteBufferAsString2DoubleConverter();
	}
	
	@Override
	public Double convert(ByteBuffer from) {
		String value = SafeEncoder.encode(from.array());
		return Double.valueOf(value);
	}

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy