Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 479 for first (0.16 sec)

  1. guava/src/com/google/common/base/CharMatcher.java

        int len = sequence.length();
        int first;
        int last;
    
        for (first = 0; first < len; first++) {
          if (!matches(sequence.charAt(first))) {
            break;
          }
        }
        for (last = len - 1; last > first; last--) {
          if (!matches(sequence.charAt(last))) {
            break;
          }
        }
    
        return sequence.subSequence(first, last + 1).toString();
      }
    
      /**
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Fri Feb 09 15:49:48 GMT 2024
    - 53.8K bytes
    - Viewed (0)
  2. guava/src/com/google/common/collect/Comparators.java

       * as equal, the first is returned.
       *
       * <p>The recommended solution for finding the {@code maximum} of some values depends on the type
       * of your data and the number of elements you have. Read more in the Guava User Guide article on
       * <a href="https://github.com/google/guava/wiki/CollectionUtilitiesExplained#comparators">{@code
       * Comparators}</a>.
       *
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Thu Feb 15 16:12:13 GMT 2024
    - 10.7K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/collect/TreeMultimapExplicitTest.java

        @Override
        public int compare(@Nullable String first, @Nullable String second) {
          if (first == second) {
            return 0;
          } else if (first == null) {
            return -1;
          } else if (second == null) {
            return 1;
          } else if (first.length() != second.length()) {
            return first.length() - second.length();
          } else {
            return first.compareTo(second);
          }
        }
      }
    
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Thu Mar 07 18:34:03 GMT 2024
    - 8.3K bytes
    - Viewed (0)
  4. android/guava-tests/test/com/google/common/collect/TablesTransformValuesColumnMapTest.java

        return Tables.transformValues(original, FIRST_CHARACTER);
      }
    
      @Override
      protected Map<String, Map<Integer, Character>> makePopulatedMap() {
        Table<Integer, String, String> table = HashBasedTable.create();
        table.put(1, "foo", "apple");
        table.put(1, "bar", "banana");
        table.put(3, "foo", "cat");
        return Tables.transformValues(table, FIRST_CHARACTER).columnMap();
      }
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Feb 19 20:34:55 GMT 2024
    - 1.6K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/collect/AbstractSequentialIteratorTest.java

        // We can't retrieve even the known first element:
        try {
          broken.next();
          fail();
        } catch (MyException expected) {
        }
        try {
          broken.next();
          fail();
        } catch (MyException expected) {
        }
      }
    
      private static Iterator<Integer> newDoubler(int first, final int last) {
        return new AbstractSequentialIterator<Integer>(first) {
          @Override
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Feb 26 17:19:08 GMT 2024
    - 4.7K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/collect/Ordering.java

      <T2 extends T> Ordering<Entry<T2, ?>> onKeys() {
        return onResultOf(Maps.<T2>keyFunction());
      }
    
      /**
       * Returns an ordering which first uses the ordering {@code this}, but which in the event of a
       * "tie", then delegates to {@code secondaryComparator}. For example, to sort a bug list first by
       * status and second by priority, you might use {@code byStatus.compound(byPriority)}. For a
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Apr 24 19:38:27 GMT 2024
    - 39.4K bytes
    - Viewed (0)
  7. guava-tests/test/com/google/common/collect/PeekingIteratorTest.java

        assertEquals("Should be able to peek() at first element", "A", peekingIterator.peek());
        assertEquals(
            "Should be able to peek() first element multiple times", "A", peekingIterator.peek());
        assertEquals(
            "next() should still return first element after peeking", "A", peekingIterator.next());
    
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Thu Mar 07 18:34:03 GMT 2024
    - 9K bytes
    - Viewed (0)
  8. guava-testlib/src/com/google/common/collect/testing/testers/QueuePollTester.java

      public void testPoll_size1() {
        assertEquals("size1Queue.poll() should return first element", e0(), getQueue().poll());
        expectMissing(e0());
      }
    
      @CollectionFeature.Require({KNOWN_ORDER, SUPPORTS_REMOVE})
      @CollectionSize.Require(SEVERAL)
      public void testPoll_sizeMany() {
        assertEquals("sizeManyQueue.poll() should return first element", e0(), getQueue().poll());
        expectMissing(e0());
      }
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Tue Feb 20 17:00:05 GMT 2024
    - 2.3K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/collect/ImmutableSet.java

       * first specified. That is, if multiple elements are {@linkplain Object#equals equal}, all except
       * the first are ignored.
       */
      public static <E> ImmutableSet<E> of(E e1, E e2) {
        return construct(2, e1, e2);
      }
    
      /**
       * Returns an immutable set containing the given elements, minus duplicates, in the order each was
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 22.4K bytes
    - Viewed (0)
  10. android/guava/src/com/google/common/collect/RegularContiguousSet.java

      @Override
      public UnmodifiableIterator<C> descendingIterator() {
        return new AbstractSequentialIterator<C>(last()) {
          final C first = first();
    
          @Override
          @CheckForNull
          protected C computeNext(C previous) {
            return equalsOrThrow(previous, first) ? null : domain.previous(previous);
          }
        };
      }
    
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Feb 22 21:19:52 GMT 2024
    - 8.4K bytes
    - Viewed (0)
Back to top