APISonar


java.util.ArrayList.containsAll

> java > util > ArrayList > containsAll
java APIs util APIs ArrayList APIs containsAll APIs

Example 1
protected ArrayList list = null;

    public boolean containsAll(Collection collection) {

        if (fast) {
            return (list.containsAll(collection));
        } else {
            synchronized (list) {
                return (list.containsAll(collection));
            }
        }

    }
Example 2
private ArrayList myArrayList;

	public boolean containsAll(Collection<?> c) {
		// TODO Auto-generated method stub
		return myArrayList.containsAll(c);
	}
Example 3
private ArrayList<Object>								list			= new ArrayList<Object>();

	public boolean containsAll(Collection<?> c) {
		convertAll();
		return list.containsAll(c);
	}
Example 4
protected ArrayList value;

    public boolean contains(String val)
    {
        return value.containsAll(parseVals(val));
    }
Example 5
protected ArrayList values;

    public boolean prepend(String val)
    {
        ArrayList vals = parseVals(val);
        if (values.containsAll(vals))
        {
            prepend(vals);
        }

        return true;
    }
Example 6
public void testGetPrefixes() {
        ArrayList<String> prefixes;

        expected.add("xml");

        prefixes = Collections.list(ns.getPrefixes());
        assertTrue("Test 1: Incorrect set of prefixes returned.",
                expected.containsAll(prefixes) && prefixes.containsAll(expected));
    }
Example 7
public boolean collectionSubtype(ArrayList<String> arrayList1, ArrayList<String> arrayList2) {
    boolean result = arrayList1.contains("ok");
    result &= arrayList1.contains(null);
    result &= arrayList1.remove("ok");
    result &= arrayList1.remove(null);
    result &= arrayList1.containsAll(arrayList2);
    result &= arrayList1.containsAll(null);
    result &= arrayList1.removeAll(arrayList2);
    result &= arrayList1.removeAll(null);
    result &= arrayList1.retainAll(arrayList2);
    return result && arrayList1.retainAll(null);
  }
Example 8
private ArrayList<InetAddress> mValidatedPrivateDnses = new ArrayList<>();

    public boolean isIdenticalValidatedPrivateDnses(LinkProperties target) {
        Collection<InetAddress> targetDnses = target.getValidatedPrivateDnsServers();
        return (mValidatedPrivateDnses.size() == targetDnses.size())
                ? mValidatedPrivateDnses.containsAll(targetDnses) : false;
    }
Example 9
public void collectionSubtype(ArrayList<Integer> arrayList1, ArrayList<String> arrayList2) {
    // BUG: Diagnostic contains: Argument '"bad"' should not be passed to this method
    // its type String is not compatible with its collection's type argument Integer
    arrayList1.contains("bad");
    // BUG: Diagnostic contains:
    arrayList1.remove("bad");
    // BUG: Diagnostic contains: Argument 'arrayList2' should not be passed to this method
    // its type ArrayList<String> has a type argument String that is not compatible with its collection's type argument Integer
    arrayList1.containsAll(arrayList2);
    // BUG: Diagnostic contains:
    arrayList1.removeAll(arrayList2);
    // BUG: Diagnostic contains:
    arrayList1.retainAll(arrayList2);
  }
Example 10
private final ArrayList<InetAddress> mDnses = new ArrayList<>();

    public boolean isIdenticalDnses(@NonNull LinkProperties target) {
        Collection<InetAddress> targetDnses = target.getDnsServers();
        String targetDomains = target.getDomains();
        if (mDomains == null) {
            if (targetDomains != null) return false;
        } else {
            if (!mDomains.equals(targetDomains)) return false;
        }
        return (mDnses.size() == targetDnses.size()) ?
                mDnses.containsAll(targetDnses) : false;
    }
Example 11
private final ArrayList<InetAddress> mPcscfs = new ArrayList<InetAddress>();

    public boolean isIdenticalPcscfs(@NonNull LinkProperties target) {
        Collection<InetAddress> targetPcscfs = target.getPcscfServers();
        return (mPcscfs.size() == targetPcscfs.size()) ?
                    mPcscfs.containsAll(targetPcscfs) : false;
    }
Example 12
private ArrayList<Fragment> fragments = new ArrayList<Fragment>();;

    public void appendList(ArrayList<Fragment> fragment) {
        fragments.clear();
        if (!fragments.containsAll(fragment) && fragment.size() > 0) {
            fragments.addAll(fragment);
        }
        notifyDataSetChanged();
    }
Example 13
private ArrayList<RouteInfo> mRoutes = new ArrayList<RouteInfo>();

    public boolean isIdenticalRoutes(LinkProperties target) {
        Collection<RouteInfo> targetRoutes = target.getRoutes();
        return (mRoutes.size() == targetRoutes.size()) ?
                    mRoutes.containsAll(targetRoutes) : false;
    }
Example 14
public void testQuery() {
        Graph graph = createTestGraph2();
        LocationIndexTree index = createIndex(graph, 500);
        final ArrayList set = new ArrayList();
        index.query(new BBox(11.57314, 11.57614, 49.94553, 49.94853), new LocationIndex.Visitor() {
            @Override
            public void onNode(int nodeId) {
                set.add(nodeId);
            }
        });
        assertEquals(17, set.size());
        assertTrue(set.containsAll(Arrays.asList(2, 3, 4, 5, 6)));
        assertFalse(set.containsAll(Arrays.asList(17, 18, 25, 30)));
    }
Example 15
private ArrayList<Sortables> order = new ArrayList<Sortables>();

    public void check() {
        if (order.size() == shown.size() && order.containsAll(shown)) {
            return;
        }
        if (shownError) {
            return;
        }
        shownError = true;
        MainFrame.getInstance().error("Incompatible order and shown for SorterTable: " + order + " vs. " + shown);
        shown.clear();
        shown.addAll(order);
    }