public static <GSource, GTarget> Set<GTarget> translatedSet(final Set<GSource> items, final Translator<GSource, GTarget> translator)
		throws NullPointerException {
		if (items == null) throw new NullPointerException("items = null");
		if (translator == null) throw new NullPointerException("translator = null");
		return new AbstractSet<GTarget>() {

			@Override
			public boolean add(final GTarget item2) {
				return items.add(translator.toSource(item2));
			}

			@Override
			@SuppressWarnings ("unchecked")
			public boolean addAll(final Collection<? extends GTarget> items2) {
				return items.addAll(Collections.translatedCollection((Collection<GTarget>)items2, Translators.reverseTranslator(translator)));
			}

			@Override
			public boolean remove(final Object item2) {
				if (!translator.isTarget(item2)) return false;
				return items.remove(translator.toSource(item2));
			}

			@Override
			@SuppressWarnings ("unchecked")
			public boolean removeAll(final Collection<?> items2) {
				return items.removeAll(Collections.translatedCollection((Collection<GTarget>)items2, Translators.reverseTranslator(translator)));
			}

			@Override
			@SuppressWarnings ("unchecked")
			public boolean retainAll(final Collection<?> items2) {
				return items.retainAll(Collections.translatedCollection((Collection<GTarget>)items2, Translators.reverseTranslator(translator)));
			}

			@Override
			public int size() {
				return items.size();
			}

			@Override
			public void clear() {
				items.clear();
			}

			@Override
			public boolean isEmpty() {
				return items.isEmpty();
			}

			@Override
			public boolean contains(final Object item2) {
				if (!translator.isTarget(item2)) return false;
				return items.contains(translator.toSource(item2));
			}

			@Override
			public Iterator<GTarget> iterator() {
				return Iterators.convertedIterator(Translators.toTarget(translator), items.iterator());
			}

		};
	}