Skip to content

Commit

Permalink
MNEMONIC-824: Refactored TransformFunction
Browse files Browse the repository at this point in the history
  • Loading branch information
katarinaking committed May 5, 2024
1 parent 8b375c4 commit 0b82f69
Showing 1 changed file with 16 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,23 @@

import org.apache.mnemonic.RestorableAllocator;

/**
* Represents a transformation function that transforms a value of type T into a value of type V.
*
* @param <V> the type of the transformed value
* @param <A> the type of the allocator used for object creation
* @param <T> the type of the input value to be transformed
*/
public interface TransformFunction<V, A extends RestorableAllocator<A>, T> {

V transform(T value, ObjectCreator<V, A> objcreator);
/**
* Transforms the input value into a value of type V.
*
* @param value the input value to be transformed
* @param objcreator an object creator for creating instances of V using the allocator
* @return the transformed value of type V
*/
V transform(T value, ObjectCreator<V, A> objcreator);

}

0 comments on commit 0b82f69

Please sign in to comment.