Lines Matching refs:constraint

49    * Returns a constraint that verifies that neither the key nor the value is
73 * constraint. Any operations that add new mappings will call the provided
74 * constraint. However, this method does not verify that existing mappings
75 * satisfy the constraint.
80 * @param constraint the constraint that validates added entries
84 Map<K, V> map, MapConstraint<? super K, ? super V> constraint) {
85 return new ConstrainedMap<K, V>(map, constraint);
90 * constraint. Any operations that add new mappings will call the provided
91 * constraint. However, this method does not verify that existing mappings
92 * satisfy the constraint.
101 * @param constraint the constraint that validates added entries
105 Multimap<K, V> multimap, MapConstraint<? super K, ? super V> constraint) {
106 return new ConstrainedMultimap<K, V>(multimap, constraint);
111 * specified constraint. Any operations that add new mappings will call the
112 * provided constraint. However, this method does not verify that existing
113 * mappings satisfy the constraint.
122 * @param constraint the constraint that validates added entries
127 MapConstraint<? super K, ? super V> constraint) {
128 return new ConstrainedListMultimap<K, V>(multimap, constraint);
133 * specified constraint. Any operations that add new mappings will call the
134 * provided constraint. However, this method does not verify that existing
135 * mappings satisfy the constraint.
143 * @param constraint the constraint that validates added entries
148 MapConstraint<? super K, ? super V> constraint) {
149 return new ConstrainedSetMultimap<K, V>(multimap, constraint);
154 * specified constraint. Any operations that add new mappings will call the
155 * provided constraint. However, this method does not verify that existing
156 * mappings satisfy the constraint.
164 * @param constraint the constraint that validates added entries
169 MapConstraint<? super K, ? super V> constraint) {
170 return new ConstrainedSortedSetMultimap<K, V>(multimap, constraint);
175 * constraint. The {@link Entry#setValue} operation will be verified with the
176 * constraint.
179 * @param constraint the constraint for the entry
184 final MapConstraint<? super K, ? super V> constraint) {
186 checkNotNull(constraint);
192 constraint.checkKeyValue(getKey(), value);
200 * specified constraint. The {@link Entry#setValue} operation will be verified
201 * with the constraint, and the collection returned by {@link Entry#getValue}
205 * @param constraint the constraint for the entry
210 final MapConstraint<? super K, ? super V> constraint) {
212 checkNotNull(constraint);
222 constraint.checkKeyValue(getKey(), value);
232 * using the specified constraint. The {@link Entry#setValue} operation will
233 * be verified with the constraint, and the collection returned by {@link
239 * @param constraint the constraint for the entries
244 MapConstraint<? super K, ? super V> constraint) {
245 return new ConstrainedAsMapEntries<K, V>(entries, constraint);
250 * using the specified constraint. The {@link Entry#setValue} operation will
251 * be verified with the constraint, along with add operations on the returned
257 * @param constraint the constraint for the entries
262 MapConstraint<? super K, ? super V> constraint) {
264 return constrainedEntrySet((Set<Entry<K, V>>) entries, constraint);
266 return new ConstrainedEntries<K, V>(entries, constraint);
271 * specified constraint. The {@link Entry#setValue} operation will be verified
272 * with the constraint, along with add operations on the returned set. The
280 * @param constraint the constraint for the entries
285 MapConstraint<? super K, ? super V> constraint) {
286 return new ConstrainedEntrySet<K, V>(entries, constraint);
292 final MapConstraint<? super K, ? super V> constraint;
296 Map<K, V> delegate, MapConstraint<? super K, ? super V> constraint) {
298 this.constraint = checkNotNull(constraint);
307 constrainedEntrySet(delegate.entrySet(), constraint);
312 constraint.checkKeyValue(key, value);
316 delegate.putAll(checkMap(map, constraint));
322 * constraint. Any operations that modify the bimap will have the associated
323 * keys and values verified with the constraint.
328 * @param constraint the constraint that validates added entries
332 BiMap<K, V> map, MapConstraint<? super K, ? super V> constraint) {
333 return new ConstrainedBiMap<K, V>(map, null, constraint);
354 MapConstraint<? super K, ? super V> constraint) {
355 super(delegate, constraint);
365 constraint.checkKeyValue(key, value);
373 new InverseConstraint<V, K>(constraint));
385 final MapConstraint<? super V, ? super K> constraint;
387 public InverseConstraint(MapConstraint<? super V, ? super K> constraint) {
388 this.constraint = checkNotNull(constraint);
392 constraint.checkKeyValue(value, key);
399 final MapConstraint<? super K, ? super V> constraint;
405 MapConstraint<? super K, ? super V> constraint) {
407 this.constraint = checkNotNull(constraint);
431 asMapDelegate.entrySet(), constraint);
466 entries = result = constrainedEntries(delegate.entries(), constraint);
476 constraint.checkKeyValue(key, value);
483 constraint.checkKeyValue(key, value);
488 return delegate.putAll(key, checkValues(key, values, constraint));
502 return delegate.replaceValues(key, checkValues(key, values, constraint));
514 * values, that already enforce the constraint
569 final MapConstraint<? super K, ? super V> constraint;
573 MapConstraint<? super K, ? super V> constraint) {
575 this.constraint = constraint;
585 return constrainedEntry(iterator.next(), constraint);
622 MapConstraint<? super K, ? super V> constraint) {
623 super(entries, constraint);
640 private final MapConstraint<? super K, ? super V> constraint;
644 MapConstraint<? super K, ? super V> constraint) {
646 this.constraint = constraint;
657 return constrainedAsMapEntry(iterator.next(), constraint);
707 MapConstraint<? super K, ? super V> constraint) {
708 super(delegate, constraint);
725 MapConstraint<? super K, ? super V> constraint) {
726 super(delegate, constraint);
746 MapConstraint<? super K, ? super V> constraint) {
747 super(delegate, constraint);
767 MapConstraint<? super K, ? super V> constraint) {
770 constraint.checkKeyValue(key, value);
776 MapConstraint<? super K, ? super V> constraint) {
779 constraint.checkKeyValue(entry.getKey(), entry.getValue());