File tree Expand file tree Collapse file tree
src/main/java/com/scalableminds/bloscjava Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -198,6 +198,19 @@ public enum Compressor {
198198 Compressor (String compressor ) {
199199 this .compressor = compressor ;
200200 }
201+
202+ public static Compressor fromString (String compressor ) {
203+ for (Compressor e : values ()) {
204+ if (e .compressor .equals (compressor )) {
205+ return e ;
206+ }
207+ }
208+ return null ;
209+ }
210+
211+ public String getValue () {
212+ return compressor ;
213+ }
201214 }
202215
203216 /**
@@ -221,5 +234,18 @@ public enum Shuffle {
221234 Shuffle (int shuffle ) {
222235 this .shuffle = shuffle ;
223236 }
237+
238+ public static Shuffle fromInt (int shuffle ) {
239+ for (Shuffle e : values ()) {
240+ if (e .shuffle == shuffle ) {
241+ return e ;
242+ }
243+ }
244+ return null ;
245+ }
246+
247+ public int getValue () {
248+ return shuffle ;
249+ }
224250 }
225251}
You can’t perform that action at this time.
0 commit comments