private static @NotNull Access getRwAccess(boolean accessedForReading, boolean accessedForWriting) {
    if (accessedForReading && accessedForWriting) {
      return Access.ReadWrite;
    }
    else if (accessedForReading) {
      return Access.Read;
    }
    else if (accessedForWriting) {
      return Access.Write;
    }
    else {
      throw new IllegalArgumentException("At least one of 'accessedForReading' or 'accessedForWriting' must be 'true'");
    }
  }
private static @NotNull Access getRwAccess(boolean accessedForReading, boolean accessedForWriting)