public final class FilePattern extends Object
| Constructor and Description |
|---|
FilePattern() |
| Modifier and Type | Method and Description |
|---|---|
int |
extractIndex(String fileName)
Extracts index from file name.
|
static FilePattern |
from(String string)
Parses string representation of
FilePattern and returns its instance. |
String |
getFileNameWith(int index)
Generates file name with specified index.
|
boolean |
matches(String str)
Checks, if file names matches by this pattern;
|
public static FilePattern from(@NonNull String string)
FilePattern and returns its instance.string - string to parseFilePattern instance from stringIllegalArgumentException - in case of absent '#' index characterpublic String getFileNameWith(int index)
index - file name index.public boolean matches(String str)
str - file name to check.true - if this pattern matches, false otherwise.public int extractIndex(String fileName)
fileName - file name.Copyright © 2018 Infobip Ltd.. All rights reserved.