Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 17 for Truncate (0.24 sec)

  1. android/guava-tests/test/com/google/common/base/AsciiTest.java

        assertEquals("foobar", Ascii.truncate("foobar", 6, "…"));
        assertEquals("foob…", Ascii.truncate("foobar", 5, "…"));
        assertEquals("foo", Ascii.truncate("foobar", 3, ""));
        assertEquals("", Ascii.truncate("", 5, ""));
        assertEquals("", Ascii.truncate("", 5, "..."));
        assertEquals("", Ascii.truncate("", 0, ""));
      }
    
      public void testTruncateIllegalArguments() {
        try {
          Ascii.truncate("foobar", 2, "...");
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Fri Feb 09 15:49:48 GMT 2024
    - 5.5K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/base/AsciiTest.java

        assertEquals("foobar", Ascii.truncate("foobar", 6, "…"));
        assertEquals("foob…", Ascii.truncate("foobar", 5, "…"));
        assertEquals("foo", Ascii.truncate("foobar", 3, ""));
        assertEquals("", Ascii.truncate("", 5, ""));
        assertEquals("", Ascii.truncate("", 5, "..."));
        assertEquals("", Ascii.truncate("", 0, ""));
      }
    
      public void testTruncateIllegalArguments() {
        try {
          Ascii.truncate("foobar", 2, "...");
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Fri Feb 09 15:49:48 GMT 2024
    - 5.5K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/io/FileWriteMode.java

    import com.google.common.annotations.GwtIncompatible;
    import com.google.common.annotations.J2ktIncompatible;
    
    /**
     * Modes for opening a file for writing. The default when mode when none is specified is to truncate
     * the file before writing.
     *
     * @author Colin Decker
     */
    @J2ktIncompatible
    @GwtIncompatible
    @ElementTypesAreNonnullByDefault
    public enum FileWriteMode {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Feb 28 20:13:02 GMT 2023
    - 1.1K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/primitives/UnsignedInteger.java

       * bits, returns the low 32 bits of the result.
       *
       * @since 14.0
       */
      @J2ktIncompatible
      @GwtIncompatible // Does not truncate correctly
      public UnsignedInteger times(UnsignedInteger val) {
        // TODO(lowasser): make this GWT-compatible
        return fromIntBits(value * checkNotNull(val).value);
      }
    
      /**
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Feb 23 18:45:50 GMT 2023
    - 8.3K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/collect/StreamsTest.java

            .containsExactly("a:1", "b:2", "c:3")
            .inOrder();
      }
    
      public void testZipInfiniteWithInfinite() {
        // zip is doing an infinite zip, but we truncate the result so we can actually test it
        // but we want the zip itself to work
        assertThat(
                Streams.zip(
                        Stream.iterate(1, i -> i + 1).map(String::valueOf),
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Thu Mar 07 18:34:03 GMT 2024
    - 20K bytes
    - Viewed (0)
  6. maven-compat/src/main/java/org/apache/maven/repository/legacy/DefaultUpdateCheckManager.java

                    } else {
                        props.remove(key + ERROR_KEY_SUFFIX);
                    }
    
                    getLogger().debug("Writing resolution-state to: " + touchfile);
                    channel.truncate(0);
                    props.store(Channels.newOutputStream(channel), "Last modified on: " + new Date());
    
                    lock.release();
                    lock = null;
    
                    channel.close();
    Java
    - Registered: Sun May 05 03:35:11 GMT 2024
    - Last Modified: Wed Sep 06 11:28:54 GMT 2023
    - 12.1K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/io/CharSource.java

              break;
            }
          }
          return processor.getResult();
        }
    
        @Override
        public String toString() {
          return "CharSource.wrap(" + Ascii.truncate(seq, 30, "...") + ")";
        }
      }
    
      /**
       * Subclass specialized for string instances.
       *
       * <p>Since Strings are immutable and built into the jdk we can optimize some operations
       *
       * <ul>
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed May 17 14:35:11 GMT 2023
    - 22.4K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/io/ByteSource.java

          return new ByteArrayByteSource(bytes, newOffset, (int) length);
        }
    
        @Override
        public String toString() {
          return "ByteSource.wrap("
              + Ascii.truncate(BaseEncoding.base16().encode(bytes, offset, length), 30, "...")
              + ")";
        }
      }
    
      private static final class EmptyByteSource extends ByteArrayByteSource {
    
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed May 17 14:35:11 GMT 2023
    - 26.2K bytes
    - Viewed (0)
  9. android/guava-tests/test/com/google/common/collect/ImmutableMapTest.java

      public void testBuildKeepingLast_shortTable() {
        Builder<Integer, String> builder = ImmutableMap.builder();
        Map<Integer, String> expected = new LinkedHashMap<>();
        for (int i = 0; i < 1000; i++) {
          // Truncate to even key, so we have put(0, "0") then put(0, "1"). Half the entries are
          // duplicates.
          Integer key = i & ~1;
          String value = String.valueOf(i);
          builder.put(key, value);
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Apr 30 14:39:16 GMT 2024
    - 37.3K bytes
    - Viewed (0)
  10. guava-tests/test/com/google/common/collect/ImmutableMapTest.java

      public void testBuildKeepingLast_shortTable() {
        Builder<Integer, String> builder = ImmutableMap.builder();
        Map<Integer, String> expected = new LinkedHashMap<>();
        for (int i = 0; i < 1000; i++) {
          // Truncate to even key, so we have put(0, "0") then put(0, "1"). Half the entries are
          // duplicates.
          Integer key = i & ~1;
          String value = String.valueOf(i);
          builder.put(key, value);
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Tue Feb 27 13:27:08 GMT 2024
    - 41.3K bytes
    - Viewed (0)
Back to top