- java.lang.Object
-
- com.remondis.remap.BidirectionalMapper<S,D>
-
- Type Parameters:
S- Source typeD- Destination type
@Deprecated public class BidirectionalMapper<S,D> extends Object
Deprecated.The intent of this class was to shorten the access to bidirectional mappings. Actually this class introduces overhead for creation and the access to the different mapping directions is confusing in most cases.This class can be used to manage bidirectional mappings. The configuration of mappers for both directions is required to build a bidirectional mapping.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description Mapper<D,S>getFromMapper()Deprecated.Returns theMapperobject for mapping destination to source type.Mapper<S,D>getMapper()Deprecated.Returns theMapperobject for mapping source to destination type.List<D>map(Iterable<? extends S> iterable)Deprecated.Performs the mapping from the source to destination type for the elements provided by the specifiedIterable.Collection<D>map(Collection<? extends S> source)Deprecated.Performs the mapping from the source to destination type for the specifiedCollection.List<D>map(List<? extends S> source)Deprecated.Performs the mapping from the source to destination type for the specifiedList.Set<D>map(Set<? extends S> source)Deprecated.Performs the mapping from the source to destination type for the specifiedSet.Dmap(S source)Deprecated.Performs the mapping from the source to destination type.<Dest extends D>
SmapFrom(Dest destination)Deprecated.Performs the mapping from the destination to source type.List<S>mapFrom(Iterable<? extends D> iterable)Deprecated.Performs the mapping from the destination to source type for the elements provided by the specifiedIterable.Collection<S>mapFrom(Collection<? extends D> destination)Deprecated.Performs the mapping from the destination to source type for the specifiedCollection.List<S>mapFrom(List<? extends D> destination)Deprecated.Performs the mapping from the destination to source type for the specifiedList.Set<S>mapFrom(Set<? extends D> destination)Deprecated.Performs the mapping from the destination to source type for the specifiedSet.static <S,D>
BidirectionalMapper<S,D>of(Mapper<S,D> to, Mapper<D,S> from)Deprecated.Creates aBidirectionalMapperfor the specifiedMapperobjects that represent the two uni-directional mappings..StringtoString()Deprecated.
-
-
-
Method Detail
-
of
public static <S,D> BidirectionalMapper<S,D> of(Mapper<S,D> to, Mapper<D,S> from)
Deprecated.Creates aBidirectionalMapperfor the specifiedMapperobjects that represent the two uni-directional mappings..- Parameters:
to- ValidMapperfor mapping source to destination type.from- ValidMapperfor mapping destination back to source type.- Returns:
- Returns a
BidirectionalMapper.
-
map
public D map(S source)
Deprecated.Performs the mapping from the source to destination type.- Parameters:
source- The source object to map to a new destination object.- Returns:
- Returns a newly created destination object.
-
map
public Collection<D> map(Collection<? extends S> source)
Deprecated.Performs the mapping from the source to destination type for the specifiedCollection.
-
map
public List<D> map(List<? extends S> source)
Deprecated.Performs the mapping from the source to destination type for the specifiedList.- Parameters:
source- The source collection to map to a new collection of destination objects.- Returns:
- Returns a newly created list of destination objects.
-
map
public Set<D> map(Set<? extends S> source)
Deprecated.Performs the mapping from the source to destination type for the specifiedSet.- Parameters:
source- The source collection to map to a new collection of destination objects.- Returns:
- Returns a newly created set of destination objects.
-
map
public List<D> map(Iterable<? extends S> iterable)
Deprecated.Performs the mapping from the source to destination type for the elements provided by the specifiedIterable.- Parameters:
iterable- The source iterable to be mapped to a newListof destination objects.- Returns:
- Returns a newly created list of destination objects.
-
mapFrom
public <Dest extends D> S mapFrom(Dest destination)
Deprecated.Performs the mapping from the destination to source type.- Parameters:
destination- The destination object to map to a new source object.- Returns:
- Returns a newly created source object.
-
mapFrom
public Collection<S> mapFrom(Collection<? extends D> destination)
Deprecated.Performs the mapping from the destination to source type for the specifiedCollection.
-
mapFrom
public List<S> mapFrom(List<? extends D> destination)
Deprecated.Performs the mapping from the destination to source type for the specifiedList.- Parameters:
destination- The destination collection to map to a new collection of source objects.- Returns:
- Returns a newly created list of source objects.
-
mapFrom
public Set<S> mapFrom(Set<? extends D> destination)
Deprecated.Performs the mapping from the destination to source type for the specifiedSet.- Parameters:
destination- The destination collection to map to a new collection of source objects.- Returns:
- Returns a newly created set of source objects.
-
mapFrom
public List<S> mapFrom(Iterable<? extends D> iterable)
Deprecated.Performs the mapping from the destination to source type for the elements provided by the specifiedIterable.- Parameters:
iterable- The destination iterable to be mapped to a newListof source objects.- Returns:
- Returns a newly created list of source objects.
-
getMapper
public Mapper<S,D> getMapper()
Deprecated.Returns theMapperobject for mapping source to destination type.- Returns:
Mapper
-
getFromMapper
public Mapper<D,S> getFromMapper()
Deprecated.Returns theMapperobject for mapping destination to source type.- Returns:
Mapper
-
-