Skip to content

Instantly share code, notes, and snippets.

@dagi3d
Created July 20, 2010 12:25
Show Gist options
  • Save dagi3d/482889 to your computer and use it in GitHub Desktop.
Save dagi3d/482889 to your computer and use it in GitHub Desktop.
public class Post {
public static final int STATUS_DRAFT = 0;
public static final int STATUS_PENDING_REVIEW = 1;
public static final int STATUS_PUBLISHED = 2;
private int status = STATUS_DRAFT;
public String getStatus()
{
String message = "";
switch (this.status) {
case STATUS_DRAFT: message = "Borrador"; break;
case STATUS_PENDING_REVIEW: message = "Pendiente de revisión"; break;
case STATUS_PUBLISHED: message = "Publicado"; break;
}
return message;
}
}
@dagi3d
Copy link
Author

dagi3d commented Jul 20, 2010

100% GPL

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment