other parameters ) { String customerId = getCustomerIdFromSessionToken(deviceToken); // Do something and returns the search return ArrayList(); } private String getCustomerIdFromSessionToken(String authToken) { // Retrieve the customer through the user session return "CustomerId"; } }
other parameters ) { String customerId = getCustomerIdFromSessionToken(deviceToken); // Do something and returns the search return ArrayList(); } private String getCustomerIdFromSessionToken(String authToken) { // Retrieve the customer through the user session return "CustomerId"; } }
other parameters ) { String customerId = getCustomerIdFromSessionToken(deviceToken); // Do something and returns the search return ArrayList(); } private String getCustomerIdFromSessionToken(String authToken) { // Retrieve the customer through the user session return "CustomerId"; } }
other parameters ) { String customerId = getCustomerIdFromSessionToken(deviceToken); // Do something and returns the search return ArrayList(); } private String getCustomerIdFromSessionToken(String authToken) { // Retrieve the customer through the user session return "CustomerId"; } }
other parameters ) { String customerId = getCustomerIdFromSessionToken(deviceToken); // Do something and returns the search return ArrayList(); } private String getCustomerIdFromSessionToken(String authToken) { // Retrieve the customer through the user session return "CustomerId"; } }
): List<Any> { val customerId = getCustomerIdFromSessionToken(deviceToken) // Do something and returns the search return ArrayList() } private fun getCustomerIdFromSessionToken(authToken: String): String { // Retrieve the customer through the user session return "CustomerId" } }
): List<Any> { val customerId = getCustomerIdFromSessionToken(deviceToken) // Do something and returns the search return ArrayList() } private fun getCustomerIdFromSessionToken(authToken: String): String { // Retrieve the customer through the user session return "CustomerId" } }
): List<Any> { val customerId = getCustomerIdFromSessionToken(sessionToken) // Do something and returns the search return ArrayList() } private fun getCustomerIdFromSessionToken(sessionToken: String): String { // Retrieve the customer through the user session return "CustomerId" } }
): List<Any> { val customerId = getCustomerIdFromSessionToken(sessionToken) // Do something and returns the search return ArrayList() } private fun getCustomerIdFromSessionToken(sessionToken: SessionToken): String { // Retrieve the customer through the user session return "CustomerId" } }
object ViewMode: ViewState() } fun verifyState(state: ViewState) { when (state) { is ViewState.Started -> println("Started") is ViewState.EditMode -> println("EditMode") is ViewState.ViewMode -> println("ViewMode") } }
object ViewMode: ViewState() class Error(val message: String = "Unknown error"): ViewState() } fun verifyState(state: ViewState) { when (state) { is ViewState.Started -> println("Started") is ViewState.EditMode -> println("EditMode") is ViewState.ViewMode -> println("ViewMode") } } when expressions guarantee that their branches exhaustively check the possible subclasses of a sealed class.