public abstract class Case extends Object
Constructor and Description |
---|
Case() |
Modifier and Type | Method and Description |
---|---|
String |
format(Iterable<String> atoms) |
String |
name() |
List<String> |
parse(String name)
Parse the
name argument and returns a list of the name atoms. |
protected static List<String> |
split(String s,
String regex) |
String |
to(Case dest,
String name)
Convert a name from this case to the dest case
|
static Map<String,Case> |
vars()
Useful for formatting or parsing string, eg:CASE_CAMEL.format(CASE_SNAKE.parse("foo_bar")),it will return fooBar
|
public String name()
public List<String> parse(String name)
name
argument and returns a list of the name atoms.name
- the name to parseIllegalArgumentException
- if the name has a syntax errorpublic String to(Case dest, String name)
dest
- the destination casename
- the name to convertCopyright © 2020 Eclipse. All rights reserved.