code: @SuppressWarnings("unchecked")
    public void setWeigherFactory(Optional<Factory<? extends Weigher<K, V>>> factory) {
      weigherFactory = (Factory<Weigher<K, V>>) factory.orElse(null);
    }
docs: Set the {@link Factory} for the {@link Weigher}.
  
  @param factory the {@link Weigher} {@link Factory}