TavernerPOS - Source Code

Clone: 

git clone http://www.librarysmith.co.uk/tavernerPOS

 

package com.floreantpos.bo.ui;

public enum Command {
	NEW,
	EDIT,
	DELETE,
	SAVE,
	CANCEL,
	NEW_TRANSACTION,
	UNKNOWN
	;

	public static Command fromString(String s) {
		Command[] values = values();
		for (Command command : values) {
			if(command.name().equalsIgnoreCase(s)) {
				return command;
			}
		}

		return UNKNOWN;
	}
}

Add comment
These comments are moderated so so won't be published until reviewed.