Package com.google.common.base

Examples of com.google.common.base.Function


                  final Method guavaMethod = Maps.class.getMethod(
                      method.getName(), method.getParameterTypes());
                  return guavaMethod.invoke(null, args);
                } catch (NoSuchMethodException e) {
                  Set set = (Set) args[0];
                  Function function = (Function) args[1];
                  return CompatibleGuava11.asMap(set, function);
                }
              }
              return null;
            }
View Full Code Here


        }
      };
      Callable<Function> caps = new Callable<Function>() {
        @Override
        public Function call() throws Exception {
          return new Function() {
            @Override
            public Object apply(Object o) {
              return o.toString().toUpperCase();
            }
          };
View Full Code Here

        public String apply(String s) {
          return s.replace("test", "test2");
        }
      };
      String test2 = "test";
      Function f = new Function() {
        @Override
        public Object apply(Object o) {
          return null;
        }
      };
View Full Code Here

                  final Method guavaMethod = Maps.class.getMethod(
                      method.getName(), method.getParameterTypes());
                  return guavaMethod.invoke(null, args);
                } catch (NoSuchMethodException e) {
                  Set set = (Set) args[0];
                  Function function = (Function) args[1];
                  return CompatibleGuava11.asMap(set, function);
                }
              }
              if (method.getName().equals("navigableSet")) {
                ImmutableSortedSet set = (ImmutableSortedSet) args[0];
View Full Code Here

    @WaitUntil
    public void waitUntilOpen()
    {
        driver.waitUntilElementIsVisible(By.id("ide-main-content"));
        driver.waitUntil(new Function()
        {

            public Object apply(Object from)
            {
                System.out.print(".");
View Full Code Here

    }

    public String getFileContents(String fileName)
    {
        ideBrowser.findElement(By.id(fileName)).click();
        driver.waitUntil(new Function()
        {
            public Object apply(@Nullable Object from)
            {
                return getStatus().contains("Loaded");
            }
View Full Code Here

        if (readOnly)
        {
            throw new IllegalStateException("Can't edit file in readonly mode");
        }
        ideBrowser.findElement(By.id(fileName)).click();
        driver.waitUntil(new Function()
        {

            public Object apply(Object from)
            {
                String editorText = getEditorContents();
                return editorText != null && editorText.length() > 0;
            }
        });
        driver.executeScript("speakeasyRequire.run('speakeasy/user/ide/ide').text(arguments[0])", contents);
        dialogElement.findElement(By.className("ide-save")).click();
        driver.waitUntil(new Function()
        {
            public Object apply(Object from)
            {
                return ideStatus.getText().contains(statusExpected);
            }
View Full Code Here

    private AtlassianWebDriver driver;

    @WaitUntil
    public void waitForAnyBanner()
    {
        driver.waitUntil(new Function()
        {

            public Object apply(Object from)
            {
                return isFooVisible() || isBarVisible();
View Full Code Here

  }

  @SuppressWarnings({"unchecked"})
  @Override
  public <T> Function<Callable<T>, Future<T>> getTransform() {
    Function function = transform;
    return function;
  }
View Full Code Here

   * from each.
   */
  @SuppressWarnings("unchecked")
  public static <T, S> CommonalityDetector<T, S>
  newReflexiveCommonalityDetector(String methodName) {
    Function rawFunction = new GetValueViaReflectionFunction(methodName);
    return forFunction(rawFunction);
  }
View Full Code Here

TOP

Related Classes of com.google.common.base.Function

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.