Exemplo n.º 1
0
  /** Loads the data from multiple paths specified by pathes */
  public static Data loadData(Dataset dataset, FileSystem fs, Path[] pathes) throws IOException {
    List<Instance> instances = new ArrayList<>();

    for (Path path : pathes) {
      Data loadedData = loadData(dataset, fs, path);
      for (int index = 0; index <= loadedData.size(); index++) {
        instances.add(loadedData.get(index));
      }
    }
    return new Data(dataset, instances);
  }
Exemplo n.º 2
0
 @Override
 public String toString() {
   return "ExtensionBlock: length=" + _data.size() + ",type=" + getType();
 }
Exemplo n.º 3
0
 @Override
 public int getCount() {
   // TODO Auto-generated method stub
   Log.i("MsgInfoActivity", "Data size: " + Data.size());
   return Data.size();
 }
Exemplo n.º 4
0
 public int size(Object key) {
   Data data = (Data) map.get(key);
   return data == null ? 0 : data.size();
 }
Exemplo n.º 5
0
 public synchronized int size(Object key) {
   Data data = (Data) map.get(key);
   if (data == null) map.put(key, (data = new Data(key)));
   return data.size();
 }