/** * Returns a new instance of {@code ImmutableJsonFieldSelector} based on the given JSON pointers. The order of the * pointers is maintained, for example if {@code pointers} is sorted or a LinkedHashSet. * * @param pointers the {@link JsonPointer}s which are the base of the returned field selector. Empty pointers are * ignored. * @param fieldSelectorString the original String representation of the JSON pointers. * @return a new JSON field selector which is based on the given JSON pointers. * @throws NullPointerException if {@code pointers} is {@code null}. */ public static ImmutableJsonFieldSelector of(final Iterable<JsonPointer> pointers, @Nullable final String fieldSelectorString) { requireNonNull(pointers, "The JSON pointers must not be null!"); return new ImmutableJsonFieldSelector(pointers, fieldSelectorString); }
/** * Returns a new instance of {@code ImmutableJsonFieldSelector} based on the given JSON pointers. The order of the * pointers is maintained, for example if {@code pointers} is sorted or a LinkedHashSet. * * @param pointers the {@link JsonPointer}s which are the base of the returned field selector. Empty pointers are * ignored. * @param fieldSelectorString the original String representation of the JSON pointers. * @return a new JSON field selector which is based on the given JSON pointers. * @throws NullPointerException if {@code pointers} is {@code null}. */ public static ImmutableJsonFieldSelector of(final Iterable<JsonPointer> pointers, @Nullable final String fieldSelectorString) { requireNonNull(pointers, "The JSON pointers must not be null!"); return new ImmutableJsonFieldSelector(pointers, fieldSelectorString); }