add MultiIndex class

This commit is contained in:
wyq 2023-01-28 22:56:39 +08:00
parent c8c41599e7
commit 788ae3d51f
2 changed files with 15 additions and 0 deletions

View File

@ -123,6 +123,8 @@ public class Index<V> implements Iterable<V>{
return new IntIndex(data);
} else if (data.get(0) instanceof String) {
return new StringIndex(data);
} else if (data.get(0) instanceof List) {
return new MultiIndex(data);
} else {
return null;
}

View File

@ -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;
}
}