Class Util
java.lang.Object
com.adobe.granite.activitystreams.utils.Util
Util...-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String[]The list of characters that are valid label characters -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic MutableActivitystatic MutableActivityObjectcopy(ActivityObject obj) static MutableMediaLinkstatic StringcreateValidName(String title) Create a valid label out of an arbitrary string.static StringcreateValidName(String title, String[] labelCharMapping) Create a valid label out of an arbitrary string with a custom character mapping.
-
Field Details
-
STANDARD_LABEL_CHAR_MAPPING
The list of characters that are valid label characters
-
-
Constructor Details
-
Util
public Util()
-
-
Method Details
-
copy
-
copy
-
copy
-
createValidName
Create a valid label out of an arbitrary string. Same as callingcreateValidName(String, String[])usingSTANDARD_LABEL_CHAR_MAPPING.- Parameters:
title- title to convert into a name- Returns:
- a valid label string
-
createValidName
Create a valid label out of an arbitrary string with a custom character mapping.- Parameters:
title- title to convert into a namelabelCharMapping- a mapping of chars (index of the array) to strings that should be used as replacement for the characters- Returns:
- a valid label string
-