@Test public void testDate() throws Exception { ARFFVectorIterable iterable = readModelFromResource("date.arff"); Iterator<Vector> iter = iterable.iterator(); Vector firstVector = iter.next(); DateFormat format = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss", Locale.ENGLISH); Date date = format.parse("2001-07-04T12:08:56"); long result = date.getTime(); assertEquals(result, firstVector.get(1), 0); format = new SimpleDateFormat("yyyy.MM.dd G 'at' HH:mm:ss z", Locale.ENGLISH); date = format.parse("2001.07.04 AD at 12:08:56 PDT"); result = date.getTime(); assertEquals(result, firstVector.get(2), 0); format = new SimpleDateFormat("EEE, MMM d, ''yy", Locale.ENGLISH); date = format.parse("Wed, Jul 4, '01,4 0:08 PM, PDT"); result = date.getTime(); assertEquals(result, firstVector.get(3), 0); format = new SimpleDateFormat("K:mm a, z", Locale.ENGLISH); date = format.parse("0:08 PM, PDT"); result = date.getTime(); assertEquals(result, firstVector.get(4), 0); format = new SimpleDateFormat("yyyyy.MMMMM.dd GGG hh:mm aaa", Locale.ENGLISH); date = format.parse("02001.July.04 AD 12:08 PM"); result = date.getTime(); assertEquals(result, firstVector.get(5), 0); format = new SimpleDateFormat("EEE, d MMM yyyy HH:mm:ss Z", Locale.ENGLISH); date = format.parse("Wed, 4 Jul 2001 12:08:56 -0700"); result = date.getTime(); assertEquals(result, firstVector.get(6), 0); }
@Override public Iterator<Vector> iterator() { return new ARFFIterator(buff, model); }
ARFFVectorIterable implements Iterable<Vector> { @Override public Iterator<Vector> iterator() { return new ARFFIterator(buff, model); } }
ARFFVectorIterable implements Iterable<Vector> { @Override public Iterator<Vector> iterator() { return new ARFFIterator(buff, model); } ARFFVectorIterable(File file, ARFFModel model);  ARFFVectorIterable(File file, Charset encoding, ARFFModel model);  ARFFVectorIterable(String arff, ARFFModel model);  ARFFVectorIterable(Reader reader, ARFFModel model); }
ARFFVectorIterable implements Iterable<Vector> { @Override public Iterator<Vector> iterator() { return new ARFFIterator(buff, model); } ARFFVectorIterable(File file, ARFFModel model);  ARFFVectorIterable(File file, Charset encoding, ARFFModel model);  ARFFVectorIterable(String arff, ARFFModel model);  ARFFVectorIterable(Reader reader, ARFFModel model); @Override Iterator<Vector> iterator(); ARFFModel getModel(); }
ARFFVectorIterable implements Iterable<Vector> { @Override public Iterator<Vector> iterator() { return new ARFFIterator(buff, model); } ARFFVectorIterable(File file, ARFFModel model);  ARFFVectorIterable(File file, Charset encoding, ARFFModel model);  ARFFVectorIterable(String arff, ARFFModel model);  ARFFVectorIterable(Reader reader, ARFFModel model); @Override Iterator<Vector> iterator(); ARFFModel getModel();  }