Class CCName
java.lang.Object
live.crowdcontrol.cc4j.websocket.payload.CCName
- All Implemented Interfaces:
Comparable<CCName>
The name of an object.
Encapsulates both the display name and the name for sorting.
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
CCName
Creates a name.- Parameters:
displayName- viewer-facing display namesort- name for alphabetical sorting
-
CCName
Creates a name.- Parameters:
displayName- viewer-facing display name
-
-
Method Details
-
getDisplayName
Gets the name displayed to users.- Returns:
- display name
-
getSortValue
Gets the name used for alphabetical sorting. If null, fall back togetDisplayName().- Returns:
- sort name
-
computeSortValue
Computes the name used for alphabetical sorting. ReturnsgetSortValue()if present, elsegetDisplayName().- Returns:
- computed sort name
-
compareTo
- Specified by:
compareToin interfaceComparable<CCName>
-