Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 42 for getHost (0.15 sec)

  1. android/guava/src/com/google/common/net/HostAndPort.java

     *     .requireBracketsForIPv6();
     * hp.getHost();   // returns "2001:db8::1"
     * hp.getPort();   // returns 80
     * hp.toString();  // returns "[2001:db8::1]:80"
     * </pre>
     *
     * <p>Here are some examples of recognized formats:
     *
     * <ul>
     *   <li>example.com
     *   <li>example.com:80
     *   <li>192.0.2.1
     *   <li>192.0.2.1:80
     *   <li>[2001:db8::1] - {@link #getHost()} omits brackets
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Aug 22 20:55:57 GMT 2023
    - 11.3K bytes
    - Viewed (0)
  2. android/guava-testlib/src/com/google/common/collect/testing/testers/ListAddAllAtIndexTester.java

        assertTrue(
            "addAll(n, allPresent) should return true",
            getList().addAll(0, MinimalCollection.of(e0())));
        expectAdded(0, e0());
      }
    
      @ListFeature.Require(absent = SUPPORTS_ADD_WITH_INDEX)
      @CollectionSize.Require(absent = ZERO)
      public void testAddAllAtIndex_unsupportedAllPresent() {
        try {
          getList().addAll(0, MinimalCollection.of(e0()));
          fail("addAll(n, allPresent) should throw");
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Feb 20 17:00:05 GMT 2024
    - 6.5K bytes
    - Viewed (1)
  3. android/guava-testlib/src/com/google/common/collect/testing/testers/AbstractListTester.java

        // Avoid expectEquals() here to delay reason manufacture until necessary.
        if (getList().size() != expectedList.size()) {
          fail("size mismatch: " + reportContext(expectedList));
        }
        for (int i = 0; i < expectedList.size(); i++) {
          E expected = expectedList.get(i);
          E actual = getList().get(i);
          if (expected != actual && (expected == null || !expected.equals(actual))) {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Feb 21 16:49:06 GMT 2024
    - 2.8K bytes
    - Viewed (0)
  4. guava-tests/test/com/google/common/util/concurrent/AbstractServiceTest.java

          service.awaitRunning();
          assertNotSame(State.STARTING, service.state());
        }
    
        @Override
        public synchronized void stopping(State from) {
          assertEquals(from, Iterables.getLast(stateHistory));
          stateHistory.add(State.STOPPING);
          if (from == State.STARTING) {
            try {
              service.awaitRunning();
              fail();
            } catch (IllegalStateException expected) {
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 29.3K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/collect/IteratorsTest.java

      public void testGetLast_basic() {
        List<String> list = newArrayList();
        list.add("a");
        list.add("b");
        assertEquals("b", getLast(list.iterator()));
      }
    
      public void testGetLast_exception() {
        List<String> list = newArrayList();
        try {
          getLast(list.iterator());
          fail();
        } catch (NoSuchElementException expected) {
        }
      }
    
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Thu Mar 07 18:34:03 GMT 2024
    - 55.7K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/collect/Iterables.java

      public static <T extends @Nullable Object> T getLast(Iterable<T> iterable) {
        // TODO(kevinb): Support a concurrently modified collection?
        if (iterable instanceof List) {
          List<T> list = (List<T>) iterable;
          if (list.isEmpty()) {
            throw new NoSuchElementException();
          }
          return getLastInNonemptyList(list);
        }
    
        return Iterators.getLast(iterable.iterator());
      }
    
      /**
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Apr 24 19:38:27 GMT 2024
    - 42.8K bytes
    - Viewed (0)
  7. android/guava-testlib/src/com/google/common/collect/testing/testers/ListListIteratorTester.java

          protected ListIterator<E> newTargetIterator() {
            resetCollection();
            return getList().listIterator();
          }
    
          @Override
          protected void verify(List<E> elements) {
            expectContents(elements);
          }
        }.test();
      }
    
      public void testListIterator_tooLow() {
        try {
          getList().listIterator(-1);
          fail();
        } catch (IndexOutOfBoundsException expected) {
        }
      }
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Feb 21 16:49:06 GMT 2024
    - 4.8K bytes
    - Viewed (0)
  8. guava-testlib/src/com/google/common/collect/testing/testers/ListRetainAllTester.java

      @CollectionSize.Require(SEVERAL)
      public void testRetainAll_countIgnored() {
        resetContainer(getSubjectGenerator().create(e0(), e2(), e1(), e0()));
        assertTrue(getList().retainAll(Arrays.asList(e0(), e1())));
        assertContentsInOrder(getList(), e0(), e1(), e0());
      }
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Feb 20 17:00:05 GMT 2024
    - 2.9K bytes
    - Viewed (0)
  9. android/guava-tests/test/com/google/common/util/concurrent/AbstractServiceTest.java

          service.awaitRunning();
          assertNotSame(State.STARTING, service.state());
        }
    
        @Override
        public synchronized void stopping(State from) {
          assertEquals(from, Iterables.getLast(stateHistory));
          stateHistory.add(State.STOPPING);
          if (from == State.STARTING) {
            try {
              service.awaitRunning();
              fail();
            } catch (IllegalStateException expected) {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 29.3K bytes
    - Viewed (0)
  10. android/guava/src/com/google/common/collect/Synchronized.java

        @Override
        public E getFirst() {
          synchronized (mutex) {
            return delegate().getFirst();
          }
        }
    
        @Override
        public E getLast() {
          synchronized (mutex) {
            return delegate().getLast();
          }
        }
    
        @Override
        @CheckForNull
        public E peekFirst() {
          synchronized (mutex) {
            return delegate().peekFirst();
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 53.4K bytes
    - Viewed (0)
Back to top