/** * Create a SortedSet composed of the elements of the first SortedSet minus the * elements of the given Iterable. * * @param self a SortedSet object * @param removeMe the items to remove from the SortedSet * @return the resulting SortedSet * @since 2.4.0 */ public static <T> SortedSet<T> minus(SortedSet<T> self, Iterable<?> removeMe) { return (SortedSet<T>) minus((Set<T>) self, removeMe); }
/** * Create a SortedSet composed of the elements of the first SortedSet minus the given element. * * @param self a SortedSet object * @param removeMe the element to remove from the SortedSet * @return the resulting SortedSet * @since 2.4.0 */ public static <T> SortedSet<T> minus(SortedSet<T> self, Object removeMe) { return (SortedSet<T>) minus((Set<T>) self, removeMe); }
/** * Create a SortedSet composed of the elements of the first SortedSet minus the * elements of the given Collection. * * @param self a SortedSet object * @param removeMe the items to remove from the SortedSet * @return the resulting SortedSet * @since 2.4.0 */ public static <T> SortedSet<T> minus(SortedSet<T> self, Collection<?> removeMe) { return (SortedSet<T>) minus((Set<T>) self, removeMe); }
/** * Create a List composed of the elements of the first list minus * every occurrence of elements of the given Collection. * <pre class="groovyTestCase">assert [1, "a", true, true, false, 5.3] - [true, 5.3] == [1, "a", false]</pre> * * @param self a List * @param removeMe a Collection of elements to remove * @return a List with the given elements removed * @since 1.0 */ public static <T> List<T> minus(List<T> self, Collection<?> removeMe) { return (List<T>) minus((Collection<T>) self, removeMe); }
/** * Create a new List composed of the elements of the first List minus * every occurrence of elements of the given Iterable. * <pre class="groovyTestCase">assert [1, "a", true, true, false, 5.3] - [true, 5.3] == [1, "a", false]</pre> * * @param self a List * @param removeMe an Iterable of elements to remove * @return a new List with the given elements removed * @since 1.8.7 */ public static <T> List<T> minus(List<T> self, Iterable<?> removeMe) { return (List<T>) minus((Iterable<T>) self, removeMe); }
/** * Create a new List composed of the elements of the first List minus every occurrence of the * given element to remove. * <pre class="groovyTestCase">assert ["a", 5, 5, true] - 5 == ["a", true]</pre> * * @param self a List object * @param removeMe an element to remove from the List * @return the resulting List with the given element removed * @since 1.0 */ public static <T> List<T> minus(List<T> self, Object removeMe) { return (List<T>) minus((Iterable<T>) self, removeMe); }
/** * Subtract one Character from another. The ordinal values of the Characters * is used in the comparison (the ordinal value is the unicode * value which for simple character sets is the ASCII value). * * @param left a Character * @param right a Character * @return the Number corresponding to the subtraction of right from left * @since 1.0 */ public static Number minus(Character left, Character right) { return minus(Integer.valueOf(left), right); }
/** * Create a new object array composed of the elements of the first array * minus the element to remove. * * @param self an array * @param removeMe an element to remove from the array * @return a new array with the operand removed * @since 1.5.5 */ @SuppressWarnings("unchecked") public static <T> T[] minus(T[] self, Object removeMe) { return (T[]) minus((Iterable<T>) toList(self), removeMe).toArray(); }
/** * Create a Set composed of the elements of the first Set minus the * elements from the given Iterable. * * @param self a Set object * @param removeMe the items to remove from the Set * @return the resulting Set * @since 1.8.7 */ public static <T> Set<T> minus(Set<T> self, Iterable<?> removeMe) { return minus(self, asCollection(removeMe)); }
/** * Create an array composed of the elements of the first array minus the * elements of the given Iterable. * * @param self an array * @param removeMe a Collection of elements to remove * @return an array with the supplied elements removed * @since 1.5.5 */ @SuppressWarnings("unchecked") public static <T> T[] minus(T[] self, Iterable removeMe) { return (T[]) minus(toList(self), removeMe).toArray(); }
/** * Create an array composed of the elements of the first array minus the * elements of the given array. * * @param self an array * @param removeMe an array of elements to remove * @return an array with the supplied elements removed * @since 1.5.5 */ @SuppressWarnings("unchecked") public static <T> T[] minus(T[] self, Object[] removeMe) { return (T[]) minus(toList(self), toList(removeMe)).toArray(); }
public Set<GroovyClassDoc> getParentInterfaces() { Set<GroovyClassDoc> result = new HashSet<GroovyClassDoc>(); result.add(this); Set<GroovyClassDoc> next = new HashSet<GroovyClassDoc>(); next.addAll(Arrays.asList(this.interfaces())); while (next.size() > 0) { Set<GroovyClassDoc> temp = next; next = new HashSet<GroovyClassDoc>(); for (GroovyClassDoc t : temp) { if (t instanceof SimpleGroovyClassDoc) { next.addAll(((SimpleGroovyClassDoc)t).getParentInterfaces()); } else if (t instanceof ExternalGroovyClassDoc) { ExternalGroovyClassDoc d = (ExternalGroovyClassDoc) t; next.addAll(getJavaInterfaces(d)); } } next = DefaultGroovyMethods.minus(next, result); result.addAll(next); } return result; }
/** * Create a new Collection composed of the elements of the first Iterable minus * every occurrence of elements of the given Iterable. * <pre class="groovyTestCase"> * assert [1, "a", true, true, false, 5.3] - [true, 5.3] == [1, "a", false] * </pre> * * @param self an Iterable * @param removeMe an Iterable of elements to remove * @return a new Collection with the given elements removed * @since 2.4.0 */ public static <T> Collection<T> minus(Iterable<T> self, Iterable<?> removeMe) { return minus(asCollection(self), asCollection(removeMe)); }
if (!checkPropertyList(cNode, includes != null ? DefaultGroovyMethods.minus(includes, "super") : null, "includes", anno, MY_TYPE_NAME, includeFields, includeSuperProperties, allProperties)) return; if (!checkPropertyList(cNode, excludes, "excludes", anno, MY_TYPE_NAME, includeFields, includeSuperProperties, allProperties)) return; createToString(cNode, includeSuper, includeFields, excludes, includes, includeNames, ignoreNulls, includePackage, cacheToString, includeSuperProperties, allProperties, allNames, includeSuperFields);
/** * Decrement a Date by one day. * * @param self a Date * @return the previous days date */ public static Date previous(Date self) { return minus(self, 1); }
/** * Subtract a Number from a Character. The character is assumed to be a * digit (i.e. '0' through '9') which is converted to its Integer * representation. * * @param left a Character * @param right a Number * @return the Number corresponding to the subtraction of right from left */ public static Number minus(Character left, Number right) { return minus(new Integer(left.charValue()), right); }
/** * Create a new object array composed of the elements of the first array * minus the operand. * * @param self an object array * @param operand an element to remove from the array * @return a new array with the operand removed */ public static Object[] minus(Object[] self, Object operand) { return minus(toList(self), operand).toArray(); }
/** * Create an array composed of the elements of the first array minus the * elements of the given collection. * * @param self an object array * @param removeMe a Collection of elements to remove * @return an array with the supplied elements removed * @since 1.5.5 */ public static Object[] minus(Object[] self, Collection removeMe) { return minus(toList(self), removeMe).toArray(); }
/** * Create an array composed of the elements of the first array minus the * elements of the given array. * * @param self an object array * @param removeMe an array of elements to remove * @return an array with the supplied elements removed */ public static Object[] minus(Object[] self, Object[] removeMe) { return minus(toList(self), toList(removeMe)).toArray(); }
/** * Create an array composed of the elements of the first array minus the * elements of the given array. * * @param self an object array * @param removeMe an array of elements to remove * @return an array with the supplied elements removed * @since 1.5.5 */ public static Object[] minus(Object[] self, Object[] removeMe) { return minus(toList(self), toList(removeMe)).toArray(); }