public final class DefUtils extends Object
Modifier and Type | Method and Description |
---|---|
static void |
assertIdentifier(String id)
Throws an exception if the given string is not a valid identifier.
|
static void |
assertPath(String pathName)
Throws an exception if the given string is not a valid identifier path name.
|
static void |
assertPropertyIdentifiers(Collection<String> properties)
Throws an exception if any member of the given set of properties is not a valid identifier.
|
static void |
assertVarValue(Object val)
Throws an exception if the given string is not a valid variable value.
|
static boolean |
isIdentifier(String id)
Returns true if the given string is a valid identifier.
|
static boolean |
isVarValue(Object val)
Returns true if the given string is a valid variable value.
|
static String |
toIdentifier(Number number)
Converts the given number to a Tcases identifier
|
static String |
toIdentifier(String name)
Converts the given name to a Tcases identifier
|
static String |
toNumberIdentifiers(String text)
Replaces numeric values in the given text with representative identifiers.
|
static String[] |
toPath(String pathName)
Translates the given identifier path name into a corresponding
sequence of identifiers.
|
public static boolean isIdentifier(String id)
public static String[] toPath(String pathName)
public static void assertIdentifier(String id) throws IllegalArgumentException
IllegalArgumentException
public static boolean isVarValue(Object val)
public static void assertVarValue(Object val) throws IllegalArgumentException
IllegalArgumentException
public static void assertPath(String pathName) throws IllegalArgumentException
IllegalArgumentException
public static void assertPropertyIdentifiers(Collection<String> properties) throws IllegalArgumentException
IllegalArgumentException
public static String toIdentifier(String name)
public static String toIdentifier(Number number)
Copyright © 2024 The Cornutum Project. All rights reserved.