1 19 20 package org.netbeans.modules.xslt.model.enums; 21 22 23 27 public enum Annotaions implements EnumValue { 28 29 PRESERVE, 30 STRIP, 31 UNSPECIFIED, 32 INVALID; 33 34 35 38 39 public boolean isInvalid() { 40 return this == INVALID ; 41 } 42 43 48 49 public String toString() { 50 if ( isInvalid() ) { 51 return ""; 52 } 53 else { 54 return super.toString().toLowerCase(); 55 } 56 } 57 58 65 public static Annotaions forString( String str ) { 66 if ( str == null ) { 67 return null; 68 } 69 Annotaions[] annotations = values(); 70 for (Annotaions annotation : annotations) { 71 if ( str.equals( annotation.toString())) { 72 return annotation; 73 } 74 } 75 return INVALID; 76 } 77 } 78 | Popular Tags |