Tabnine Logo
BiTransformable
Code IndexAdd Tabnine to your IDE (free)

How to use
BiTransformable
in
com.oath.cyclops.types.functor

Best Java code snippets using com.oath.cyclops.types.functor.BiTransformable (Showing top 14 results out of 315)

origin: aol/cyclops

/**
 * Peek at two data types simulatanously (typically to perform a side-effect with each data point)
 *
 * <pre>
 * {@code
 *     MapX<String,Integer> map = MapXs.of("hello",2);
 *     map.bipeek(s->System.out.pritnln("key = " + s),System.out::println);
 * }
 * </pre>
 *
 * @param c1 consumer for the first type
 * @param c2 consumer for the second type
 * @return New BiTransformable with the same data
 */
default BiTransformable<T1, T2> bipeek(final Consumer<? super T1> c1, final Consumer<? super T2> c2) {
  return bimap(input -> {
    c1.accept(input);
    return input;
  } , input -> {
    c2.accept(input);
    return input;
  });
}
origin: aol/cyclops

@Override
default LazyEither4<LT1, LT2, LT3, RT> bipeek(final Consumer<? super LT3> c1, final Consumer<? super RT> c2) {
  return (LazyEither4<LT1, LT2, LT3, RT>) BiTransformable.super.bipeek(c1, c2);
}
origin: aol/cyclops

@Override
default LazyEither3<LT1, LT2, RT> bipeek(final Consumer<? super LT2> c1, final Consumer<? super RT> c2) {
  return (LazyEither3<LT1, LT2, RT>) BiTransformable.super.bipeek(c1, c2);
}
origin: com.oath.cyclops/cyclops

/**
 * Peek at two data types simulatanously (typically to perform a side-effect with each data point)
 *
 * <pre>
 * {@code
 *     MapX<String,Integer> map = MapXs.of("hello",2);
 *     map.bipeek(s->System.out.pritnln("key = " + s),System.out::println);
 * }
 * </pre>
 *
 * @param c1 consumer for the first type
 * @param c2 consumer for the second type
 * @return New BiTransformable with the same data
 */
default BiTransformable<T1, T2> bipeek(final Consumer<? super T1> c1, final Consumer<? super T2> c2) {
  return bimap(input -> {
    c1.accept(input);
    return input;
  } , input -> {
    c2.accept(input);
    return input;
  });
}
origin: aol/cyclops

@Override
default Either<LT, RT> bipeek(Consumer<? super LT> c1, Consumer<? super RT> c2) {
  return (Either<LT, RT>)BiTransformable.super.bipeek(c1, c2);
}
origin: aol/cyclops

@Override
default ImmutableMap<K, V> bipeek(Consumer<? super K> c1, Consumer<? super V> c2) {
  return (ImmutableMap<K,V>)BiTransformable.super.bipeek(c1,c2);
}
origin: aol/cyclops

@Override
default LazyEither5<LT1, LT2, LT3, LT4, RT> bipeek(final Consumer<? super LT4> c1, final Consumer<? super RT> c2) {
  return (LazyEither5<LT1, LT2, LT3,LT4, RT>) BiTransformable.super.bipeek(c1, c2);
}
origin: aol/cyclops

@Override
default Ior<LT, RT> bipeek(final Consumer<? super LT> c1, final Consumer<? super RT> c2) {
  return (Ior<LT, RT>) BiTransformable.super.bipeek(c1, c2);
}
origin: com.oath.cyclops/cyclops

@Override
default Either<LT, RT> bipeek(Consumer<? super LT> c1, Consumer<? super RT> c2) {
  return (Either<LT, RT>)BiTransformable.super.bipeek(c1, c2);
}
origin: com.oath.cyclops/cyclops

@Override
default ImmutableMap<K, V> bipeek(Consumer<? super K> c1, Consumer<? super V> c2) {
  return (ImmutableMap<K,V>)BiTransformable.super.bipeek(c1,c2);
}
origin: com.oath.cyclops/cyclops

@Override
default LazyEither4<LT1, LT2, LT3, RT> bipeek(final Consumer<? super LT3> c1, final Consumer<? super RT> c2) {
  return (LazyEither4<LT1, LT2, LT3, RT>) BiTransformable.super.bipeek(c1, c2);
}
origin: com.oath.cyclops/cyclops

@Override
default LazyEither5<LT1, LT2, LT3, LT4, RT> bipeek(final Consumer<? super LT4> c1, final Consumer<? super RT> c2) {
  return (LazyEither5<LT1, LT2, LT3,LT4, RT>) BiTransformable.super.bipeek(c1, c2);
}
origin: com.oath.cyclops/cyclops

@Override
default LazyEither3<LT1, LT2, RT> bipeek(final Consumer<? super LT2> c1, final Consumer<? super RT> c2) {
  return (LazyEither3<LT1, LT2, RT>) BiTransformable.super.bipeek(c1, c2);
}
origin: com.oath.cyclops/cyclops

@Override
default Ior<LT, RT> bipeek(final Consumer<? super LT> c1, final Consumer<? super RT> c2) {
  return (Ior<LT, RT>) BiTransformable.super.bipeek(c1, c2);
}
com.oath.cyclops.types.functorBiTransformable

Most used methods

  • bimap
    Transform this BiTransformable, changing two value types at once. MapX map = MapXs.of("hello",2);
  • bipeek
    Peek at two data types simulatanously (typically to perform a side-effect with each data point) Map

Popular in Java

  • Making http post requests using okhttp
  • runOnUiThread (Activity)
  • notifyDataSetChanged (ArrayAdapter)
  • onRequestPermissionsResult (Fragment)
  • HttpServer (com.sun.net.httpserver)
    This class implements a simple HTTP server. A HttpServer is bound to an IP address and port number a
  • Point (java.awt)
    A point representing a location in (x,y) coordinate space, specified in integer precision.
  • Proxy (java.net)
    This class represents proxy server settings. A created instance of Proxy stores a type and an addres
  • Set (java.util)
    A Set is a data structure which does not allow duplicate elements.
  • Timer (java.util)
    Timers schedule one-shot or recurring TimerTask for execution. Prefer java.util.concurrent.Scheduled
  • Annotation (javassist.bytecode.annotation)
    The annotation structure.An instance of this class is returned bygetAnnotations() in AnnotationsAttr
  • Sublime Text for Python
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now