Java Code Examples for

The following are Jave code examples for showing how to use containsAll() of the class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
Example 1
Project: tac-kbp-eal   File:   Source Code and License Vote up 6 votes
private void assertExactlyTwoSubdirectories(final File outputStoreDir) throws IOException {
  if (!new File(outputStoreDir, "arguments").isDirectory()) {
    throw new IOException(
        "Expected system output to be contain a subdirectory named 'arguments'");
  if (!new File(outputStoreDir, "linking").isDirectory()) {
    throw new IOException("Expected system output to be contain a subdirectory named 'linking'");
  final ImmutableSet<String> subdirectoryNames =
  final boolean hasValidDirectoryStructure = subdirectoryNames.containsAll(REQUIRED_SUBDIRS)
      && ALLOWED_SUBDIRS.containsAll(subdirectoryNames);

  if (!hasValidDirectoryStructure) {
    throw new IOException(
        "Invalid subdirectories ) " + subdirectoryNames + ". Required are: " + REQUIRED_SUBDIRS
        + "; allowed are " + ALLOWED_SUBDIRS);