Skip to content

Instantly share code, notes, and snippets.

@cbart
Created June 12, 2012 19:58
interface Time {
// ...
@Ensures({
"result >= 0",
"result <= 23"
})
int getHour();
@Requires({
"newHour >= 0",
"newHour <= 23"
})
@Ensures("getHour() == newHour")
void setHour(int newHour);
// ...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment