/** * @param <E> * @param map * @return a PSet with the elements of map.keySet(), backed by map */ @SuppressWarnings("unchecked") public static <E> MapPSet<E> from(final PMap<E,?> map) { return new MapPSet<E>((PMap<E,Object>)map); }
/** * @param <E> * @param map * @return a PSet with the elements of map.keySet(), backed by map */ @SuppressWarnings("unchecked") public static <E> MapPSet<E> from(final PMap<E,?> map) { return new MapPSet<E>((PMap<E,Object>)map); }
public MapPSet<E> minus(final Object e) { if(!contains(e)) return this; return new MapPSet<E>(map.minus(e)); }
public MapPSet<E> plus(final E e) { if(contains(e)) return this; return new MapPSet<E>(map.plus(e, In.IN)); }
public MapPSet<E> plus(final E e) { if(contains(e)) return this; return new MapPSet<E>(map.plus(e, In.IN)); }
public MapPSet<E> minus(final Object e) { if(!contains(e)) return this; return new MapPSet<E>(map.minus(e)); }
/** * @param <E> * @param map * @return a PSet with the elements of map.keySet(), backed by map */ @SuppressWarnings("unchecked") public static <E> MapPSet<E> from(final PMap<E,?> map) { return new MapPSet<E>((PMap<E,Object>)map); }
/** * @param <E> * @param map * @return a PSet with the elements of map.keySet(), backed by map */ @SuppressWarnings("unchecked") public static <E> MapPSet<E> from(final PMap<E, ?> map) { return new MapPSet<E>((PMap<E, Object>) map); }
public MapPSet<E> plus(final E e) { if (contains(e)) return this; return new MapPSet<E>(map.plus(e, In.IN)); }
public MapPSet<E> minus(final Object e) { if(!contains(e)) return this; return new MapPSet<E>(map.minus(e)); }
public MapPSet<E> minus(final Object e) { if (!contains(e)) return this; return new MapPSet<E>(map.minus(e)); }
public MapPSet<E> plus(final E e) { if(contains(e)) return this; return new MapPSet<E>(map.plus(e, In.IN)); }