public static EnumSet<EmbeddingFlags> asSet(int value){
  EnumSet<EmbeddingFlags> set=EnumSet.noneOf(EmbeddingFlags.class);
  for (  EmbeddingFlags flag : EmbeddingFlags.values()) {
    if ((value & flag.mask()) == flag.mask()) {
      set.add(flag);
    }
  }
  return set;
}

public static EnumSet < EmbeddingFlags > asSet ( int value ) { EnumSet < EmbeddingFlags > set = EnumSet . noneOf ( EmbeddingFlags . class ) ; for ( EmbeddingFlags flag : EmbeddingFlags . values ( ) ) { if ( ( value & flag . mask ( ) ) == flag . mask ( ) ) { set . add ( flag ) ; } } return set ; }
generates an enumset \ < embeddingflags \ > representation of the supplied unsigned short .
