Imagine you need to set the following constraints for the Notification class:
titlecannot be empty,contentlength cannot be longer than 50 symbols,messageslist can contain from 1 to 5 messages,textColorcan have the next values: "R", "G", "B".
Match the fields and the corresponding annotations:
Java
public class Notification {
{1}
private String title;
{2}
private String content;
{3}
private List<Message> messages;
{4}
private String textColor;
// getters and setters
}
Kotlin
class Notification(
{1}
var title: String,
{2}
var content: String,
{3}
var messages: List<Message>,
{4}
var textColor: String
)