mirror of
https://github.com/meteoinfo/MeteoInfo.git
synced 2025-12-08 20:36:05 +00:00
add MultiIndex class
This commit is contained in:
parent
c8c41599e7
commit
788ae3d51f
@ -123,6 +123,8 @@ public class Index<V> implements Iterable<V>{
|
|||||||
return new IntIndex(data);
|
return new IntIndex(data);
|
||||||
} else if (data.get(0) instanceof String) {
|
} else if (data.get(0) instanceof String) {
|
||||||
return new StringIndex(data);
|
return new StringIndex(data);
|
||||||
|
} else if (data.get(0) instanceof List) {
|
||||||
|
return new MultiIndex(data);
|
||||||
} else {
|
} else {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,13 @@
|
|||||||
|
package org.meteoinfo.dataframe;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class MultiIndex extends Index<List> {
|
||||||
|
/**
|
||||||
|
* Construction
|
||||||
|
* @param data The index data
|
||||||
|
*/
|
||||||
|
public MultiIndex(List data) {
|
||||||
|
this.data = data;
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user