@Test public void testSubtract() { List<Set<Integer>> materialSets = new ArrayList<Set<Integer>>(); Set<Integer> materialSet0 = new HashSet<Integer>(); materialSet0.add(1); materialSet0.add(2); materialSet0.add(3); materialSet0.add(4); materialSet0.add(5); materialSet0.add(6); materialSets.add(materialSet0); Set<Integer> materialSet1 = new HashSet<Integer>(); materialSet1.add(1); materialSet1.add(2); materialSet1.add(3); materialSets.add(materialSet1); Set<Integer> materialSet2 = new HashSet<Integer>(); materialSet2.add(1); materialSet2.add(3); materialSet2.add(5); materialSets.add(materialSet2); CodePoints result = new CodePoints(materialSet0).subtract( new CodePoints(materialSet1)).subtract( new CodePoints(materialSet2)); assertThat(result.containsAll(new String(new int[] { 1 }, 0, 1)), is( false)); assertThat(result.containsAll(new String(new int[] { 2 }, 0, 1)), is( false)); assertThat(result.containsAll(new String(new int[] { 3 }, 0, 1)), is( false)); assertThat(result.containsAll(new String(new int[] { 4 }, 0, 1)), is( true)); assertThat(result.containsAll(new String(new int[] { 5 }, 0, 1)), is( false)); assertThat(result.containsAll(new String(new int[] { 6 }, 0, 1)), is( true)); }
public CodePoints subtract(CodePoints codePoints) { Set<Integer> setTmp = new HashSet<Integer>(this.set); setTmp.removeAll(codePoints.set); return new CodePoints(setTmp); }
CodePoints implements Serializable { public CodePoints subtract(CodePoints codePoints) { Set<Integer> setTmp = new HashSet<Integer>(this.set); setTmp.removeAll(codePoints.set); return new CodePoints(setTmp); } }
CodePoints implements Serializable { public CodePoints subtract(CodePoints codePoints) { Set<Integer> setTmp = new HashSet<Integer>(this.set); setTmp.removeAll(codePoints.set); return new CodePoints(setTmp); } CodePoints(Integer... codePoints);  CodePoints(String... strings);  CodePoints(Collection<Integer> codePoints);  CodePoints(CodePoints codePoints); }
CodePoints implements Serializable { public CodePoints subtract(CodePoints codePoints) { Set<Integer> setTmp = new HashSet<Integer>(this.set); setTmp.removeAll(codePoints.set); return new CodePoints(setTmp); } CodePoints(Integer... codePoints);  CodePoints(String... strings);  CodePoints(Collection<Integer> codePoints);  CodePoints(CodePoints codePoints); boolean containsAll(String s); int firstExcludedCodePoint(String s); Set<Integer> allExcludedCodePoints(String s); CodePoints union(CodePoints codePoints); CodePoints subtract(CodePoints codePoints); CodePoints intersect(CodePoints codePoints); @SuppressWarnings("unchecked") static T of(Class<T> clazz); static boolean containsAllInAnyCodePoints(String s,
            final CodePoints... codePointsList); @Override boolean equals(Object o); @Override int hashCode(); }
CodePoints implements Serializable { public CodePoints subtract(CodePoints codePoints) { Set<Integer> setTmp = new HashSet<Integer>(this.set); setTmp.removeAll(codePoints.set); return new CodePoints(setTmp); } CodePoints(Integer... codePoints);  CodePoints(String... strings);  CodePoints(Collection<Integer> codePoints);  CodePoints(CodePoints codePoints); boolean containsAll(String s); int firstExcludedCodePoint(String s); Set<Integer> allExcludedCodePoints(String s); CodePoints union(CodePoints codePoints); CodePoints subtract(CodePoints codePoints); CodePoints intersect(CodePoints codePoints); @SuppressWarnings("unchecked") static T of(Class<T> clazz); static boolean containsAllInAnyCodePoints(String s,
            final CodePoints... codePointsList); @Override boolean equals(Object o); @Override int hashCode(); static final int NOT_FOUND; }