Added Direction enum
This commit is contained in:
parent
633ff9c3ab
commit
b454e52e67
|
@ -0,0 +1,20 @@
|
|||
package org.gcube.informationsystem.base.reference;
|
||||
|
||||
/**
|
||||
* @author Luca Frosini (ISTI - CNR)
|
||||
*/
|
||||
public enum Direction {
|
||||
|
||||
IN, OUT, BOTH;
|
||||
|
||||
public Direction opposite() {
|
||||
if(this.equals(IN)) {
|
||||
return OUT;
|
||||
}else if(this.equals(OUT)) {
|
||||
return IN;
|
||||
} else {
|
||||
return BOTH;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue