Skip to content

Instantly share code, notes, and snippets.

@karol-lotkowski

karol-lotkowski/Rule.java Secret

Created Oct 18, 2015
Embed
What would you like to do?
Dropwizard clean code rule representation class.
package com.karollotkowski.cleancode.core;
import com.fasterxml.jackson.annotation.JsonProperty;
import javax.annotation.concurrent.Immutable;
@Immutable
public class Rule {
private String title;
private String description;
public Rule() {
// Jackson deserialization
}
public Rule(final String title, final String description) {
this.title = title;
this.description = description;
}
@JsonProperty
public String getTitle() {
return title;
}
@JsonProperty
public String getDescription() {
return description;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment