概要 | パッケージ | クラス | 階層ツリー | 非推奨 API | 索引 | ヘルプ
前のクラス 次のクラス | フレームあり フレームなし
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド

## jAudioFeatureExtractor.GeneralTools
クラス StringMethods

    java.lang.Object
      jAudioFeatureExtractor.GeneralTools.StringMethods

    public class StringMethods

extends java.lang.Object

A holder class for static methods relating to manipulating strings.

作成者:
  Cory McKay
関連項目:
  `String`

コンストラクタの概要
`StringMethods()`

メソッドの概要
`static java.lang.String` | `convertFilePathToFileName(java.lang.String file_path)` Returns the name of the file referred to by the given path.
`static java.lang.String` | `getBeginningOfString(java.lang.String string_to_shorten, int number_characters)` Returns a copy of the given string with all but the first number_characters eliminated.
`static java.lang.String` | `getBeginningOfStringWithHyphenFiller(java.lang.String string_to_shorten, int number_characters)` Returns a copy of the given string with all but the first number_characters eliminated.
`static java.lang.String` | `getDirectoryName(java.lang.String file_path)` Returns the name of the directory that the given filename is found in.
`static java.lang.String` | `getDoubleInScientificNotation(double number_to_round, int significant_digits)` Returns a formatted version of number_to_round that has been converted to scientific notation and includes the given number of significant_digits.
`static java.lang.String` | `getExtension(java.lang.String filename)` Returns the 2, 3 or 4 letter extension of the given file name.
`static int` | `getIndexOfString(java.lang.String given_name, java.lang.String[] possible_names)` Returns the index in the possible_names array where the given_name parameter occurs.
`static java.lang.String` | `getRoundedDouble(double number_to_round, int decimal_places)` Returns a formatted version of number_to_round.
`static java.lang.String[]` | `removeDoubles(java.lang.String[] strings)` Returns a shorened copy of the given array of strings with all duplicate entries removed.
`static java.lang.String` | `removeExtension(java.lang.String filename)` Returns a copy of the given string with the extension removed.

クラス java.lang.Object から継承されたメソッド
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

コンストラクタの詳細

### StringMethods

    public StringMethods()

メソッドの詳細

### convertFilePathToFileName

    public static java.lang.String convertFilePathToFileName(java.lang.String file_path)

  Returns the name of the file referred to by the given path.

  パラメータ:
    `file_path` - The file path from which the file name is to be extracted.
  戻り値:
    The name of the file referred to in the parameter.

### getDirectoryName

    public static java.lang.String getDirectoryName(java.lang.String file_path)
                                             throws java.lang.Exception

  Returns the name of the directory that the given filename is found in. Throws an exception if no valid directory separator is present.

  例外:
    `java.lang.Exception`

### removeExtension

    public static java.lang.String removeExtension(java.lang.String filename)

  Returns a copy of the given string with the extension removed. Returns null if there is no extension or if there are less than five characters in the string.

  IMPORTANT: filename should consist of at least four characters.

  パラメータ:
    `filename` - The name of the file from which the extension is to be removed.
  戻り値:
    The name of the file with the extension removed.

### getExtension

    public static java.lang.String getExtension(java.lang.String filename)

  Returns the 2, 3 or 4 letter extension of the given file name. Returns null if there is no extension or if there are less than 4 characters in the string.

  IMPORTANT: filename should consist of at least four characters.

  パラメータ:
    `filename` - The name of the file from which the extension is to be returned.
  戻り値:
    The extension of the file.

### getBeginningOfString

    public static java.lang.String getBeginningOfString(java.lang.String string_to_shorten,
                                                        int number_characters)

  Returns a copy of the given string with all but the first number_characters eliminated. If the given string is shorter than number_characters, then blank spaces are added to the end of the string in order to make it the full length.

  パラメータ:
    `string_to_shorten` - The string to be shortened or have spaces added to its end.
    `number_characters` - Number of characters in the new string.
  戻り値:
    The shortened string.

### getBeginningOfStringWithHyphenFiller

    public static java.lang.String getBeginningOfStringWithHyphenFiller(java.lang.String string_to_shorten,
                                                                        int number_characters)

  Returns a copy of the given string with all but the first number_characters eliminated. If the given string is shorter than number_characters, then hyphens are are added to the end of the string in order to make it the full length (with two blank spaces on each side.

  パラメータ:
    `string_to_shorten` - The string to be shortened or have spaces added to its end.
    `number_characters` - Number of characters in the new string.
  戻り値:
    The shortened string.

### getDoubleInScientificNotation

    public static java.lang.String getDoubleInScientificNotation(double number_to_round,
                                                                 int significant_digits)

  Returns a formatted version of number_to_round that has been converted to scientific notation and includes the given number of significant_digits.

  Values of not a number, negative infinity and positive infinity will be returned as NaN, -Infinity and Infinity respectively.

  パラメータ:
    `number_to_round` - The number that is to be formatted.
    `significant_digits` - The number of significant digits to use.

### getRoundedDouble

    public static java.lang.String getRoundedDouble(double number_to_round,
                                                    int decimal_places)

  Returns a formatted version of number_to_round. It will always show a 0 before numbers less than one, and will only show up to decimal_places decimal places.

  Values of not a number, negative infinity and positive infinity will be returned as NaN, -Infinity and Infinity respectively.

  パラメータ:
    `number_to_round` - The number that is to be rounded.
    `decimal_places` - The maximum number of decimal places that will be displayed.

### getIndexOfString

    public static int getIndexOfString(java.lang.String given_name,
                                       java.lang.String[] possible_names)
                                throws java.lang.Exception

  Returns the index in the possible_names array where the given_name parameter occurs. Throws an exception if it is not there.

  パラメータ:
    `given_name` - The string to search for in possible_names.
    `possible_names` - The array to search for given_names in.
  戻り値:
    The index in possible_names that contains given_name.
  例外:
    `java.lang.Exception`

### removeDoubles

    public static java.lang.String[] removeDoubles(java.lang.String[] strings)

  Returns a shorened copy of the given array of strings with all duplicate entries removed. The original array of strings is not changed.

  パラメータ:
    `strings` - The array of strings to remove duplicate entries from.
  戻り値:
    A shortened copy of the given strings with duplicates removed.

概要 | パッケージ | クラス | 階層ツリー | 非推奨 API | 索引 | ヘルプ
前のクラス 次のクラス | フレームあり フレームなし
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド