Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package com.noodlesandwich.rekord.keys;
 
 
 public final class TransformingKey<T, U, V> extends Key<T, V> {
    private final Key<T, U> delegate;
    private final Transformer<U, V> transformer;
    public TransformingKey(Key<T, U> delegateTransformer<U, V> transformer) {
        this. = delegate;
        this. = transformer;
    }
    @Override
    public <NewV> TransformingKey<T, U, NewV> that(Transformer<V, NewV> transformer) {
        return new TransformingKey<>(, Transformers.compose(transformerthis.));
    }
    @Override
    public Properties storeTo(Properties properties, V value) {
        return properties.with(new Property<>(this.transformInput(value)));
    }
    @SuppressWarnings("unchecked")
    @Override
    public V retrieveFrom(Properties properties) {
        return .transformOutput((U) properties.get());
    }
    @Override
    public String toString() {
        return .toString();
    }
New to GrepCode? Check out our FAQ X