Skip to content

Instantly share code, notes, and snippets.

@mchmielarz
Last active June 4, 2019 09:39
Show Gist options
  • Save mchmielarz/0fca7faf85cad328edcd2078f5523fe0 to your computer and use it in GitHub Desktop.
Save mchmielarz/0fca7faf85cad328edcd2078f5523fe0 to your computer and use it in GitHub Desktop.
@Value
@Accessors(fluent = true)
public class EmailAddress {
private final String value;
}
@Value
@Accessors(fluent = true)
public class Payload {
private final String message;
}
public class EmailSender {
public boolean send(EmailAddress emailAddress, Payload payload) {
return doSend(emailAddress.value(), payload.message());
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment