net.sf.doolin.util
Interface Adapter<S,T>

Type Parameters:
S - Subject type
T - Target type
All Known Subinterfaces:
StateAdapter<S>
All Known Implementing Classes:
AbstractStateAdapter, BooleanStateAdapter, ConditionalStateAdapter, Enum2StringAdapter, MapStateAdapter, ReadOnlyAdapter, ReadOnlyNotNullBooleanAdapter, ReadOnlyStringAdapter

public interface Adapter<S,T>

Adapter between a subject type and a target type.

Author:
Damien Coraboeuf

Method Summary
 T convertSubjectToTarget(S subjectValue)
          Conversion from the subject to the target
 S convertTargetToSubject(T targetValue)
          Conversion from the target to the subject
 

Method Detail

convertSubjectToTarget

T convertSubjectToTarget(S subjectValue)
Conversion from the subject to the target

Parameters:
subjectValue - Subject value
Returns:
Target value

convertTargetToSubject

S convertTargetToSubject(T targetValue)
Conversion from the target to the subject

Parameters:
targetValue - Target value
Returns:
Subject value


Copyright © 2011. All Rights Reserved.