此方法认为后缀一定是整个的词语，所以length是以词语为单位的
@param length
@param size
@param extend
@return
188983
public List<String> extractSuffixByWords(int length, int size, boolean extend)
    {
        TFDictionary suffixTreeSet = new TFDictionary();
        for (String key : tfDictionary.keySet())
        {
            List<Term> termList = StandardTokenizer.segment(key);
            if (termList.size() > length)
            {
                suffixTreeSet.add(combine(termList.subList(termList.size() - length, termList.size())));
                if (extend)
                {
                    for (int l = 1; l < length; ++l)
                    {
                        suffixTreeSet.add(combine(termList.subList(termList.size() - l, termList.size())));
                    }
                }
            }
        }

        return extract(suffixTreeSet, size);
    }
790227
@SuppressWarnings({
     "unchecked", "rawtypes"
    })
    @Override
    public void extend(final String key, final Object value) {
        final Object v = configuration.get(key);
        if (v == null) {
            final Object array = Array.newInstance(value.getClass(), 1);
            Array.set(array, 0, value);
            configuration.put(key, array);
        }
        else {
            final Class<?> clazz = v.getClass();
            if (clazz.isArray()) {
                final int length = Array.getLength(v);
                final Object array = Array.newInstance(clazz.getComponentType(), length + 1);
                System.arraycopy(v, 0, array, 0, length);
                Array.set(array, length, value);
                configuration.put(key, array);
            }
            else if (v instanceof Collection) {
                ((Collection) v).add(value);
            }
            else {
                final String message = String.format("Cannot extend %s by %s.", key, value);
                throw new IllegalArgumentException(message);
            }
        }
    }
1023493
public synchronized void updateLength(long length) {
    if (mLength == Constants.UNKNOWN_SIZE) {
      mLength = length;
    } else if (mLength != length) {
      LOG.warn("Attempting to update block length ({}) to a different length ({}).", mLength,
          length);
    }
  }
611548
public com.google.protobuf.ByteString
      getExtendsBytes() {
    java.lang.Object ref = extends_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      extends_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }
948925
protected void setLength(long length) throws IOException {
		if(length<0) throw new IllegalArgumentException("Invalid length: "+length);
		synchronized(this) {
			file.seek(8);
			file.writeLong(length);
			if(length==0) setFirstIndex(0);
		}
	}
635781
static long sizeForField(@Nonnull String key, @Nonnull Object value) {
        return key.length() + sizeForValue(value);
    }
569461
public EvictionConfigurationBuilder size(long size) {
      attributes.attribute(SIZE).set(size);
      memory().size(size);
      memory().storageType(StorageType.OBJECT);
      return this;
   }
1320396
public static Validation<String> moreThan(int size) {
        return notEmpty().and(moreThan(size, I18N_MAP.get(i18nPrefix + "MORE_THAN")));
    }
1157877
public static long sizeOfArray(int length, long elementSize) {
        return roundTo(SPEC.getArrayHeaderSize() + length * elementSize, SPEC.getObjectPadding());
    }
490104
public void setLength(int size)
  {
    expand(size);

    for (int i = _size; i < size; i++)
      _data[i] = 0;

    _size = size;
  }
721114
public void skip(int length) {
        int newcount = count + length;
        if (newcount > buf.length) {
            buf = Arrays.copyOf(buf, oversize(newcount));
        }
        count = newcount;
    }
552030
public FP64 extend(char[] chars, int start, int len) {
    int end = start + len;
    for (int i = start; i < end; i++) {
      extend(chars[i]);
    }
    return this;
  }
929531
public static <T> List<T> repeatEachToSize(final Collection<T> c, final int size) {
        N.checkArgNotNegative(size, "size");
        checkArgument(size == 0 || notNullOrEmpty(c), "Collection can not be empty or null when size > 0");

        if (size == 0 || isNullOrEmpty(c)) {
            return new ArrayList<T>();
        }

        final int n = size / c.size();
        int mod = size % c.size();

        final List<T> result = new ArrayList<>(size);

        for (T e : c) {
            for (int i = 0, len = mod-- > 0 ? n + 1 : n; i < len; i++) {
                result.add(e);
            }

            if (result.size() == size) {
                break;
            }
        }

        return result;
    }
926959
private static int sizeToInt(String size) {
		int position = size.indexOf('p');
		if (position < 0) {
			return Integer.parseInt(size);
		}
		return Integer.parseInt(size.substring(0, position));
	}
1120572
public static <E> Matcher<Iterable<E>> hasSize(final int size) {
        checkArgument(size >= 0, "Size cannot be negative");

        return new IsIterableWithSize(size);
    }
660411
private void grow(int size) {
		if (this.value.length < size) {
			char[] value = new char[ Math.max(this.value.length * 3 / 2, size)];
			System.arraycopy(this.value, 0, value, 0, this.len);
			this.value = value;
		}
	}
860193
protected void extendArray(int k) {
    // size + 1 could overflow
    if (this.size + k > this.keys.length) {
      int newCapacity;
      if (this.keys.length < 1024) {
        newCapacity = 2 * (this.size + k);
      } else {
        newCapacity = 5 * (this.size + k) / 4;
      }
      this.keys = Arrays.copyOf(this.keys, newCapacity);
      this.values = Arrays.copyOf(this.values, newCapacity);
    }
  }