test_class.declarator: EMPTY_KEY = ""
test_class.modifier: private static final
test_class.original_string: private static final String EMPTY_KEY = "";
test_class.type: String
test_class.var_name: EMPTY_KEY
test_class.declarator: INVALID_KEY = ".invalid_key"
test_class.modifier: private static final
test_class.original_string: private static final String INVALID_KEY = ".invalid_key";
test_class.type: String
test_class.var_name: INVALID_KEY
test_class.declarator: VALUE_1_KEY = "feynman.quote"
test_class.modifier: private static final
test_class.original_string: private static final String VALUE_1_KEY = "feynman.quote";
test_class.type: String
test_class.var_name: VALUE_1_KEY
test_class.declarator: VALUE_2_KEY = "feynman.photo"
test_class.modifier: private static final
test_class.original_string: private static final String VALUE_2_KEY = "feynman.photo";
test_class.type: String
test_class.var_name: VALUE_2_KEY
test_class.declarator: keystoreRootDirectory
test_class.modifier: private static
test_class.original_string: private static File keystoreRootDirectory;
test_class.type: File
test_class.var_name: keystoreRootDirectory
test_class.declarator: VALUE_1 = "What I cannot create, I do not understand.\n".getBytes()
test_class.modifier: private static final
test_class.original_string: private static final byte[] VALUE_1 = "What I cannot create, I do not understand.\n".getBytes();
test_class.type: byte[]
test_class.var_name: VALUE_1
test_class.declarator: VALUE_2
test_class.modifier: private static final
test_class.original_string: private static final byte[] VALUE_2;
test_class.type: byte[]
test_class.var_name: VALUE_2
test_class.declarator: VALUE_3 = "For a successful technology, reality must take precedence over public relations, for nature cannot be fooled.\n".getBytes()
test_class.modifier: private static final
test_class.original_string: private static final byte[] VALUE_3 = "For a successful technology, reality must take precedence over public relations, for nature cannot be fooled.\n".getBytes();
test_class.type: byte[]
test_class.var_name: VALUE_3
test_class.file: fluxtream-core/src/test/java/org/bodytrack/datastore/FilesystemKeyValueStoreTest.java
test_class.identifier: FilesystemKeyValueStoreTest
test_case.body: @SuppressWarnings("ConstantConditions")
      @Test
      public void testKeyToFile() {
          try {
              FilesystemKeyValueStore.keyToFile(null, null);
              Assert.fail("Calling FilesystemKeyValueStore.keyToFile with null arguments should fail with an IllegalArgumentException");
          }
          catch (IllegalArgumentException e) {
              // nothing to do here because we expect it to fail with an IllegalArgumentException
          }
  
          try {
              FilesystemKeyValueStore.keyToFile(keystoreRootDirectory, null);
              Assert.fail("Calling FilesystemKeyValueStore.keyToFile with null arguments should fail with an IllegalArgumentException");
          }
          catch (IllegalArgumentException e) {
              // nothing to do here because we expect it to fail with an IllegalArgumentException
          }
  
          try {
              FilesystemKeyValueStore.keyToFile(null, "the.key");
              Assert.fail("Calling FilesystemKeyValueStore.keyToFile with null arguments should fail with an IllegalArgumentException");
          }
          catch (IllegalArgumentException e) {
              // nothing to do here because we expect it to fail with an IllegalArgumentException
          }
  
          Assert.assertNull(FilesystemKeyValueStore.keyToFile(keystoreRootDirectory, EMPTY_KEY));
          Assert.assertNull(FilesystemKeyValueStore.keyToFile(keystoreRootDirectory, INVALID_KEY));
  
          final File valueFile1 = FilesystemKeyValueStore.keyToFile(keystoreRootDirectory, VALUE_1_KEY);
          Assert.assertNotNull(valueFile1);
          Assert.assertEquals(valueFile1.getAbsolutePath(), new File(keystoreRootDirectory, "feynman/quote.val").getAbsolutePath());
          final File valueFile2 = FilesystemKeyValueStore.keyToFile(keystoreRootDirectory, VALUE_2_KEY);
          Assert.assertNotNull(valueFile2);
          Assert.assertEquals(valueFile2.getAbsolutePath(), new File(keystoreRootDirectory, "feynman/photo.val").getAbsolutePath());
      }
test_case.class_method_signature: FilesystemKeyValueStoreTest.testKeyToFile()
test_case.full_signature: @SuppressWarnings("ConstantConditions") @Test public void testKeyToFile()
test_case.identifier: testKeyToFile
test_case.invocations: keyToFile fail keyToFile fail keyToFile fail assertNull keyToFile assertNull keyToFile keyToFile assertNotNull assertEquals getAbsolutePath getAbsolutePath keyToFile assertNotNull assertEquals getAbsolutePath getAbsolutePath
test_case.modifiers: @SuppressWarnings("ConstantConditions") @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testKeyToFile()
focal_class.declarator: LOG = FlxLogger.getLogger(FilesystemKeyValueStore.class)
focal_class.modifier: private static final
focal_class.original_string: private static final FlxLogger LOG = FlxLogger.getLogger(FilesystemKeyValueStore.class);
focal_class.type: FlxLogger
focal_class.var_name: LOG
focal_class.declarator: VALUE_FILE_EXTENSION = ".val"
focal_class.modifier: private static final
focal_class.original_string: private static final String VALUE_FILE_EXTENSION = ".val";
focal_class.type: String
focal_class.var_name: VALUE_FILE_EXTENSION
focal_class.declarator: rootDirectory
focal_class.modifier: private final
focal_class.original_string: private final File rootDirectory;
focal_class.type: File
focal_class.var_name: rootDirectory
focal_class.file: fluxtream-core/src/main/java/org/bodytrack/datastore/FilesystemKeyValueStore.java
focal_class.identifier: FilesystemKeyValueStore
focal_class.interfaces: implements KeyValueStore<byte[]>
focal_class.class_method_signature: FilesystemKeyValueStore.keyToFile(@NotNull final File rootDirectory, @NotNull final String key)
focal_class.full_signature: @Nullable public static File keyToFile(@NotNull final File rootDirectory, @NotNull final String key)
focal_class.identifier: keyToFile
focal_class.modifiers: @Nullable public static
focal_class.parameters: (@NotNull final File rootDirectory, @NotNull final String key)
focal_class.return: File
focal_class.signature: File keyToFile(@NotNull final File rootDirectory, @NotNull final String key)
focal_class.class_method_signature: FilesystemKeyValueStore.FilesystemKeyValueStore(@NotNull final File rootDirectory)
focal_class.full_signature: public  FilesystemKeyValueStore(@NotNull final File rootDirectory)
focal_class.identifier: FilesystemKeyValueStore
focal_class.modifiers: public
focal_class.parameters: (@NotNull final File rootDirectory)
focal_class.signature:  FilesystemKeyValueStore(@NotNull final File rootDirectory)
focal_class.class_method_signature: FilesystemKeyValueStore.hasKey(@Nullable final String key)
focal_class.full_signature: @Override public boolean hasKey(@Nullable final String key)
focal_class.identifier: hasKey
focal_class.modifiers: @Override public
focal_class.parameters: (@Nullable final String key)
focal_class.return: boolean
focal_class.signature: boolean hasKey(@Nullable final String key)
focal_class.class_method_signature: FilesystemKeyValueStore.set(@NotNull final String key, @NotNull final byte[] value)
focal_class.full_signature: @Override public boolean set(@NotNull final String key, @NotNull final byte[] value)
focal_class.identifier: set
focal_class.modifiers: @Override public
focal_class.parameters: (@NotNull final String key, @NotNull final byte[] value)
focal_class.return: boolean
focal_class.signature: boolean set(@NotNull final String key, @NotNull final byte[] value)
focal_class.class_method_signature: FilesystemKeyValueStore.get(@Nullable final String key)
focal_class.full_signature: @Override @Nullable public byte[] get(@Nullable final String key)
focal_class.identifier: get
focal_class.modifiers: @Override @Nullable public
focal_class.parameters: (@Nullable final String key)
focal_class.return: byte[]
focal_class.signature: byte[] get(@Nullable final String key)
focal_class.class_method_signature: FilesystemKeyValueStore.delete(@Nullable final String key)
focal_class.full_signature: @Override public boolean delete(@Nullable final String key)
focal_class.identifier: delete
focal_class.modifiers: @Override public
focal_class.parameters: (@Nullable final String key)
focal_class.return: boolean
focal_class.signature: boolean delete(@Nullable final String key)
focal_class.class_method_signature: FilesystemKeyValueStore.getValueFile(@Nullable final String key)
focal_class.full_signature: @Nullable private File getValueFile(@Nullable final String key)
focal_class.identifier: getValueFile
focal_class.modifiers: @Nullable private
focal_class.parameters: (@Nullable final String key)
focal_class.return: File
focal_class.signature: File getValueFile(@Nullable final String key)
focal_method.body: @Nullable
      public static File keyToFile(@NotNull final File rootDirectory, @NotNull final String key) throws IllegalArgumentException {
          //noinspection ConstantConditions
          if (rootDirectory == null || key == null) {
              throw new IllegalArgumentException("The rootDirectory and key must both be non-null.");
          }
  
          if (KeyValueStoreHelper.isValidKey(key)) {
              // convert dots to slashes and append to the root directory to create a new File
              final String pathKey = key.replace(".", File.separator);
              return new File(rootDirectory, pathKey + VALUE_FILE_EXTENSION);
          }
          return null;
      }
focal_method.class_method_signature: FilesystemKeyValueStore.keyToFile(@NotNull final File rootDirectory, @NotNull final String key)
focal_method.full_signature: @Nullable public static File keyToFile(@NotNull final File rootDirectory, @NotNull final String key)
focal_method.identifier: keyToFile
focal_method.invocations: isValidKey replace
focal_method.modifiers: @Nullable public static
focal_method.parameters: (@NotNull final File rootDirectory, @NotNull final String key)
focal_method.return: File
focal_method.signature: File keyToFile(@NotNull final File rootDirectory, @NotNull final String key)