Tabnine Logo
PartialFunction.apply
Code IndexAdd Tabnine to your IDE (free)

How to use
apply
method
in
scala.PartialFunction

Best Java code snippets using scala.PartialFunction.apply (Showing top 20 results out of 315)

origin: com.typesafe.akka/akka-actor_2.10

 /**
  * Convenience function to make the Java code more readable.
  *
  * <pre><code>
  *   UnitMatcher&lt;X&gt; matcher = UnitMatcher.create(...);
  *
  *   matcher.match(obj);
  * </code></pre>
  *
  * @param i  the argument to apply the match to
  * @throws scala.MatchError  if there is no match
  */
 public void match(I i) throws MatchError {
  statements.apply(i);
 }
}
origin: com.typesafe.akka/akka-actor_2.11

 /**
  * Convenience function to make the Java code more readable.
  *
  * <p>
  *
  * <pre><code>
  *   UnitMatcher&lt;X&gt; matcher = UnitMatcher.create(...);
  *
  *   matcher.match(obj);
  * </code></pre>
  *
  * @param i the argument to apply the match to
  * @throws scala.MatchError if there is no match
  */
 public void match(I i) throws MatchError {
  statements.apply(i);
 }
}
origin: com.typesafe.akka/akka-actor_2.10

 /**
  * Convenience function to make the Java code more readable.
  *
  * <pre><code>
  *   Matcher&lt;X, Y&gt; matcher = Matcher.create(...);
  *
  *   Y someY = matcher.match(obj);
  * </code></pre>
  *
  * @param i  the argument to apply the match to
  * @return   the result of the application
  * @throws MatchError  if there is no match
  */
 public R match(I i) throws MatchError {
  return statements.apply(i);
 }
}
origin: com.typesafe.akka/akka-actor_2.12

 /**
  * Convenience function to make the Java code more readable.
  *
  * <p>
  *
  * <pre><code>
  *   Match&lt;X, Y&gt; matcher = Match.create(...);
  *
  *   Y someY = matcher.match(obj);
  * </code></pre>
  *
  * @param i the argument to apply the match to
  * @return the result of the application
  * @throws MatchError if there is no match
  */
 public R match(I i) throws MatchError {
  return statements.apply(i);
 }
}
origin: com.typesafe.akka/akka-actor_2.12

 /**
  * Convenience function to make the Java code more readable.
  *
  * <p>
  *
  * <pre><code>
  *   UnitMatcher&lt;X&gt; matcher = UnitMatcher.create(...);
  *
  *   matcher.match(obj);
  * </code></pre>
  *
  * @param i the argument to apply the match to
  * @throws scala.MatchError if there is no match
  */
 public void match(I i) throws MatchError {
  statements.apply(i);
 }
}
origin: com.typesafe.akka/akka-actor

 /**
  * Convenience function to make the Java code more readable.
  *
  * <p>
  *
  * <pre><code>
  *   UnitMatcher&lt;X&gt; matcher = UnitMatcher.create(...);
  *
  *   matcher.match(obj);
  * </code></pre>
  *
  * @param i the argument to apply the match to
  * @throws scala.MatchError if there is no match
  */
 public void match(I i) throws MatchError {
  statements.apply(i);
 }
}
origin: com.typesafe.akka/akka-actor

 /**
  * Convenience function to make the Java code more readable.
  *
  * <p>
  *
  * <pre><code>
  *   Match&lt;X, Y&gt; matcher = Match.create(...);
  *
  *   Y someY = matcher.match(obj);
  * </code></pre>
  *
  * @param i the argument to apply the match to
  * @return the result of the application
  * @throws MatchError if there is no match
  */
 public R match(I i) throws MatchError {
  return statements.apply(i);
 }
}
origin: com.typesafe.akka/akka-actor_2.11

 /**
  * Convenience function to make the Java code more readable.
  *
  * <p>
  *
  * <pre><code>
  *   Match&lt;X, Y&gt; matcher = Match.create(...);
  *
  *   Y someY = matcher.match(obj);
  * </code></pre>
  *
  * @param i the argument to apply the match to
  * @return the result of the application
  * @throws MatchError if there is no match
  */
 public R match(I i) throws MatchError {
  return statements.apply(i);
 }
}
origin: com.typesafe.play/play-test_2.10

public static Result routeAndCall(Class<? extends Router> router, RequestBuilder requestBuilder, long timeout) {
  try {
    Request request = requestBuilder.build();
    Router routes = (Router) router.getClassLoader().loadClass(router.getName() + "$").getDeclaredField("MODULE$").get(null);
    if(routes.routes().isDefinedAt(request._underlyingRequest())) {
      return invokeHandler(routes.routes().apply(request._underlyingRequest()), request, timeout);
    } else {
      return null;
    }
  } catch(RuntimeException e) {
    throw e;
  } catch(Throwable t) {
    throw new RuntimeException(t);
  }
}
origin: com.typesafe.play/play-test_2.10

public static Result routeAndCall(Router router, RequestBuilder requestBuilder, long timeout) {
  try {
    Request request = requestBuilder.build();
    if(router.routes().isDefinedAt(request._underlyingRequest())) {
      return invokeHandler(router.routes().apply(request._underlyingRequest()), request, timeout);
    } else {
      return null;
    }
  } catch(RuntimeException e) {
    throw e;
  } catch(Throwable t) {
    throw new RuntimeException(t);
  }
}
origin: com.data-artisans/flakka-actor_2.11

 /**
  * Convenience function to make the Java code more readable.
  *
  * <pre><code>
  *   UnitMatcher&lt;X&gt; matcher = UnitMatcher.create(...);
  *
  *   matcher.match(obj);
  * </code></pre>
  *
  * @param i  the argument to apply the match to
  * @throws scala.MatchError  if there is no match
  */
 public void match(I i) throws MatchError {
  statements.apply(i);
 }
}
origin: org.spark-project.akka/akka-actor_2.11

 /**
  * Convenience function to make the Java code more readable.
  *
  * <pre><code>
  *   UnitMatcher&lt;X&gt; matcher = UnitMatcher.create(...);
  *
  *   matcher.match(obj);
  * </code></pre>
  *
  * @param i  the argument to apply the match to
  * @throws scala.MatchError  if there is no match
  */
 public void match(I i) throws MatchError {
  statements.apply(i);
 }
}
origin: org.spark-project.akka/akka-actor_2.11

 /**
  * Convenience function to make the Java code more readable.
  *
  * <pre><code>
  *   Matcher&lt;X, Y&gt; matcher = Matcher.create(...);
  *
  *   Y someY = matcher.match(obj);
  * </code></pre>
  *
  * @param i  the argument to apply the match to
  * @return   the result of the application
  * @throws MatchError  if there is no match
  */
 public R match(I i) throws MatchError {
  return statements.apply(i);
 }
}
origin: org.spark-project.akka/akka-actor_2.10

 /**
  * Convenience function to make the Java code more readable.
  *
  * <pre><code>
  *   UnitMatcher&lt;X&gt; matcher = UnitMatcher.create(...);
  *
  *   matcher.match(obj);
  * </code></pre>
  *
  * @param i  the argument to apply the match to
  * @throws scala.MatchError  if there is no match
  */
 public void match(I i) throws MatchError {
  statements.apply(i);
 }
}
origin: com.data-artisans/flakka-actor_2.10

 /**
  * Convenience function to make the Java code more readable.
  *
  * <pre><code>
  *   UnitMatcher&lt;X&gt; matcher = UnitMatcher.create(...);
  *
  *   matcher.match(obj);
  * </code></pre>
  *
  * @param i  the argument to apply the match to
  * @throws scala.MatchError  if there is no match
  */
 public void match(I i) throws MatchError {
  statements.apply(i);
 }
}
origin: com.data-artisans/flakka-actor_2.10

 /**
  * Convenience function to make the Java code more readable.
  *
  * <pre><code>
  *   Matcher&lt;X, Y&gt; matcher = Matcher.create(...);
  *
  *   Y someY = matcher.match(obj);
  * </code></pre>
  *
  * @param i  the argument to apply the match to
  * @return   the result of the application
  * @throws MatchError  if there is no match
  */
 public R match(I i) throws MatchError {
  return statements.apply(i);
 }
}
origin: org.spark-project.akka/akka-actor_2.10

 /**
  * Convenience function to make the Java code more readable.
  *
  * <pre><code>
  *   Matcher&lt;X, Y&gt; matcher = Matcher.create(...);
  *
  *   Y someY = matcher.match(obj);
  * </code></pre>
  *
  * @param i  the argument to apply the match to
  * @return   the result of the application
  * @throws MatchError  if there is no match
  */
 public R match(I i) throws MatchError {
  return statements.apply(i);
 }
}
origin: org.eclipse.ditto/ditto-services-things-persistence

private <A extends ThingModifiedEvent> void applyEvent(final A event) {
  handleThingEvents.onMessage().apply(event);
  notifySubscribers(event);
}
origin: eclipse/ditto

private <A extends ThingModifiedEvent> void applyEvent(final A event) {
  handleThingEvents.onMessage().apply(event);
  notifySubscribers(event);
}
origin: eclipse/ditto

private <E extends PolicyEvent> void processEvent(final E event, final Procedure<E> handler) {
  log.debug("About to persist Event <{}>.", event.getType());
  persist(event, persistedEvent -> {
    log.info("Successfully persisted Event <{}>.", event.getType());
    // after the event was persisted, apply the event on the current actor state
    handlePolicyEvents.onMessage().apply(persistedEvent);
    /*
     * The event has to be applied before creating the snapshot, otherwise a snapshot with new
     * sequence no (e.g. 2), but old thing revision no (e.g. 1) will be created. This can lead to serious
     * aftereffects.
     */
    handler.apply(persistedEvent);
    // save a snapshot if there were too many changes since the last snapshot
    if ((lastSequenceNr() - lastSnapshotSequenceNr) > snapshotThreshold) {
      doSaveSnapshot(null);
    }
    notifySubscribers(event);
  });
}
scalaPartialFunctionapply

Popular methods of PartialFunction

  • orElse
  • isDefinedAt
  • andThen

Popular in Java

  • Finding current android device location
  • setContentView (Activity)
  • getContentResolver (Context)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • GridLayout (java.awt)
    The GridLayout class is a layout manager that lays out a container's components in a rectangular gri
  • BufferedReader (java.io)
    Wraps an existing Reader and buffers the input. Expensive interaction with the underlying reader is
  • Date (java.sql)
    A class which can consume and produce dates in SQL Date format. Dates are represented in SQL as yyyy
  • Scanner (java.util)
    A parser that parses a text string of primitive types and strings with the help of regular expressio
  • Manifest (java.util.jar)
    The Manifest class is used to obtain attribute information for a JarFile and its entries.
  • Options (org.apache.commons.cli)
    Main entry-point into the library. Options represents a collection of Option objects, which describ
  • Github Copilot alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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