Class ThingResourceMapper<P,R>

java.lang.Object
org.eclipse.ditto.things.model.signals.commands.ThingResourceMapper<P,R>
Type Parameters:
P - an extra parameter passed to the visit method
R - the result of the mapping

public class ThingResourceMapper<P,R> extends Object
Maps a JsonPointer to another value by using a ThingResourceVisitor.
  • Method Details

    • from

      public static <P, R> ThingResourceMapper<P,R> from(ThingResourceVisitor<P,R> visitor)
      Type Parameters:
      P - an extra parameter passed to the visit method
      R - the result of the mapping
      Parameters:
      visitor - the visitor used to map the JsonPointer
      Returns:
      new instance of ThingResourceMapper
    • map

      public R map(org.eclipse.ditto.json.JsonPointer path, @Nullable P param)
      Maps the given path to another value.
      Parameters:
      path - the path that is mapped
      param - the extra parameter passed through to the visit method
      Returns:
      the mapping result