11d580d0f6ee4f21eb309ba7b509d2c6d671c4044Bjorn Bringert/*
21d580d0f6ee4f21eb309ba7b509d2c6d671c4044Bjorn Bringert * Copyright (C) 2009 The Guava Authors
31d580d0f6ee4f21eb309ba7b509d2c6d671c4044Bjorn Bringert *
41d580d0f6ee4f21eb309ba7b509d2c6d671c4044Bjorn Bringert * Licensed under the Apache License, Version 2.0 (the "License"); you may not
51d580d0f6ee4f21eb309ba7b509d2c6d671c4044Bjorn Bringert * use this file except in compliance with the License.  You may obtain a copy
61d580d0f6ee4f21eb309ba7b509d2c6d671c4044Bjorn Bringert * of the License at
71d580d0f6ee4f21eb309ba7b509d2c6d671c4044Bjorn Bringert *
81d580d0f6ee4f21eb309ba7b509d2c6d671c4044Bjorn Bringert * http://www.apache.org/licenses/LICENSE-2.0
91d580d0f6ee4f21eb309ba7b509d2c6d671c4044Bjorn Bringert *
101d580d0f6ee4f21eb309ba7b509d2c6d671c4044Bjorn Bringert * Unless required by applicable law or agreed to in writing, software
111d580d0f6ee4f21eb309ba7b509d2c6d671c4044Bjorn Bringert * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
121d580d0f6ee4f21eb309ba7b509d2c6d671c4044Bjorn Bringert * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
131d580d0f6ee4f21eb309ba7b509d2c6d671c4044Bjorn Bringert * License for the specific language governing permissions and limitations under
141d580d0f6ee4f21eb309ba7b509d2c6d671c4044Bjorn Bringert * the License.
151d580d0f6ee4f21eb309ba7b509d2c6d671c4044Bjorn Bringert */
161d580d0f6ee4f21eb309ba7b509d2c6d671c4044Bjorn Bringert
171d580d0f6ee4f21eb309ba7b509d2c6d671c4044Bjorn Bringertpackage com.google.common.collect.testing.testers;
181d580d0f6ee4f21eb309ba7b509d2c6d671c4044Bjorn Bringert
197dd252788645e940eada959bdde927426e2531c9Paul Duffinimport com.google.common.annotations.GwtCompatible;
201d580d0f6ee4f21eb309ba7b509d2c6d671c4044Bjorn Bringert
211d580d0f6ee4f21eb309ba7b509d2c6d671c4044Bjorn Bringert/**
221d580d0f6ee4f21eb309ba7b509d2c6d671c4044Bjorn Bringert * This class is emulated in GWT.
231d580d0f6ee4f21eb309ba7b509d2c6d671c4044Bjorn Bringert *
241d580d0f6ee4f21eb309ba7b509d2c6d671c4044Bjorn Bringert * @author Hayward Chan
251d580d0f6ee4f21eb309ba7b509d2c6d671c4044Bjorn Bringert */
267dd252788645e940eada959bdde927426e2531c9Paul Duffin@GwtCompatible
270888a09821a98ac0680fad765217302858e70fa4Paul Duffinfinal class Platform {
281d580d0f6ee4f21eb309ba7b509d2c6d671c4044Bjorn Bringert
291d580d0f6ee4f21eb309ba7b509d2c6d671c4044Bjorn Bringert  /**
301d580d0f6ee4f21eb309ba7b509d2c6d671c4044Bjorn Bringert   * Format the template with args, only supports the placeholder
311d580d0f6ee4f21eb309ba7b509d2c6d671c4044Bjorn Bringert   * {@code %s}.
321d580d0f6ee4f21eb309ba7b509d2c6d671c4044Bjorn Bringert   */
331d580d0f6ee4f21eb309ba7b509d2c6d671c4044Bjorn Bringert  static String format(String template, Object... args) {
341d580d0f6ee4f21eb309ba7b509d2c6d671c4044Bjorn Bringert    return String.format(template, args);
351d580d0f6ee4f21eb309ba7b509d2c6d671c4044Bjorn Bringert  }
361d580d0f6ee4f21eb309ba7b509d2c6d671c4044Bjorn Bringert
371d580d0f6ee4f21eb309ba7b509d2c6d671c4044Bjorn Bringert  /** See {@link ListListIteratorTester} */
381d580d0f6ee4f21eb309ba7b509d2c6d671c4044Bjorn Bringert  static int listListIteratorTesterNumIterations() {
391d580d0f6ee4f21eb309ba7b509d2c6d671c4044Bjorn Bringert    return 4;
401d580d0f6ee4f21eb309ba7b509d2c6d671c4044Bjorn Bringert  }
411d580d0f6ee4f21eb309ba7b509d2c6d671c4044Bjorn Bringert
421d580d0f6ee4f21eb309ba7b509d2c6d671c4044Bjorn Bringert  /** See {@link CollectionIteratorTester} */
431d580d0f6ee4f21eb309ba7b509d2c6d671c4044Bjorn Bringert  static int collectionIteratorTesterNumIterations() {
441d580d0f6ee4f21eb309ba7b509d2c6d671c4044Bjorn Bringert    return 5;
451d580d0f6ee4f21eb309ba7b509d2c6d671c4044Bjorn Bringert  }
460888a09821a98ac0680fad765217302858e70fa4Paul Duffin
470888a09821a98ac0680fad765217302858e70fa4Paul Duffin  private Platform() {}
481d580d0f6ee4f21eb309ba7b509d2c6d671c4044Bjorn Bringert}
49