src/main/java/seedu/planner/storage/accommodation/JsonAccommodationStorage.java
public Optional<ReadOnlyAccommodation> readAccommodation(Path filePath) throws DataConversionException {
        requireNonNull(filePath);

        Optional<JsonSerializableAccommodation> jsonAccommodation = JsonUtil.readJsonFile(
                filePath, JsonSerializableAccommodation.class);
        if (!jsonAccommodation.isPresent()) {
            return Optional.empty();
        }

        try {
            return Optional.of(jsonAccommodation.get().toModelType());
        } catch (IllegalValueException ive) {
            logger.info("Illegal values found in " + filePath + ": " + ive.getMessage());
            throw new DataConversionException(ive);
        }
    }
/**
     * Similar to {@link #readAccommodation}.
     *
     * @param filePath location of the data. Cannot be null.
     * @throws DataConversionException if the file is not in the correct format.
     */
Similar to  #readAccommodation.
@param filePath location of the data. Cannot be null.
@throws DataConversionException if the file is not in the correct format.
Similar to #readAccommodation . @param filePath location of the data . Cannot be null . @throws DataConversionException if the file is not in the correct format .
public Optional<ReadOnlyAccommodation> readAccommodation(Path filePath) throws DataConversionException {
        requireNonNull(filePath);
        Optional<JsonSerializableAccommodation> jsonAccommodation = JsonUtil.readJsonFile(
                filePath, JsonSerializableAccommodation.class);
        if (!jsonAccommodation.isPresent()) {
            return Optional.empty();
        }
        try {
            return Optional.of(jsonAccommodation.get().toModelType());
        } catch (IllegalValueException ive) {
            logger.info("Illegal values found in " + filePath + ": " + ive.getMessage());
            throw new DataConversionException(ive);
        }
    }
public Optional < ReadOnlyAccommodation > readAccommodation ( Path filePath ) throws DataConversionException { requireNonNull ( filePath ) ; Optional < JsonSerializableAccommodation > jsonAccommodation = JsonUtil . readJsonFile ( filePath , JsonSerializableAccommodation . class ) ; if ( ! jsonAccommodation . isPresent ( ) ) { return Optional . empty ( ) ; } try { return Optional . of ( jsonAccommodation . get ( ) . toModelType ( ) ) ; } catch ( IllegalValueException ive ) { logger . info ( "Illegal values found in " + filePath + ": " + ive . getMessage ( ) ) ; throw new DataConversionException ( ive ) ; } }
Similar to {@link #readAccommodation}.
Similar to { @link #readAccommodation } .