test_class.declarator: FACTORY = new ValueFactoryImpl()
test_class.modifier: private static final
test_class.original_string: private static final ValueFactoryImpl FACTORY = new ValueFactoryImpl();
test_class.type: ValueFactoryImpl
test_class.var_name: FACTORY
test_class.file: series/src/test/java/com/barchart/feed/series/DataSeriesImplTest.java
test_class.identifier: DataSeriesImplTest
test_case.body: @Test
      public void testInsertData() {
  //        1        2013-12-10T09:00:00.003-06:00
  //        2        2013-12-10T09:00:00.005-06:00
  //        3        2013-12-10T09:00:00.007-06:00
  //        4        2013-12-10T09:00:00.009-06:00
  //        5        2013-12-10T09:00:00.011-06:00
  //        6        2013-12-10T09:00:00.013-06:00
  //        7        2013-12-10T09:00:00.015-06:00
  //        8        2013-12-10T09:00:01.000-06:00
  //        9        2013-12-10T09:00:01.002-06:00
  //        10       2013-12-10T09:00:01.004-06:00
  //        11       2013-12-10T09:00:01.006-06:00
  //        12       2013-12-10T09:00:02.000-06:00
  //        13       2013-12-10T09:00:02.002-06:00
  //        14       2013-12-10T09:00:02.004-06:00
  //        15       2013-12-10T12:00:00.147-06:00
  //        2013-12-10T11:59:58.001-06:00
  
          final DateTime dt = new DateTime(2013, 12, 10, 9, 0, 0, 0);
          final DateTime dt2 = new DateTime(2013, 12, 10, 9, 0, 0, 3);
          final DateTime dt3 = new DateTime(2013, 12, 10, 9, 0, 0, 5);
          final DateTime dt4 = new DateTime(2013, 12, 10, 9, 0, 0, 7);
          final DateTime dt5 = new DateTime(2013, 12, 10, 9, 0, 0, 9);
          final DateTime dt6 = new DateTime(2013, 12, 10, 9, 0, 0, 11);
          final DateTime dt7 = new DateTime(2013, 12, 10, 9, 0, 0, 13);
          final DateTime dt8 = new DateTime(2013, 12, 10, 9, 0, 0, 15);
          final DateTime dt9 = new DateTime(2013, 12, 10, 9, 0, 1, 0);
          final DateTime dt10 = new DateTime(2013, 12, 10, 9, 0, 1, 2);
          final DateTime dt11 = new DateTime(2013, 12, 10, 9, 0, 1, 4);
          final DateTime dt12 = new DateTime(2013, 12, 10, 9, 0, 1, 6);
          final DateTime dt13 = new DateTime(2013, 12, 10, 9, 0, 2, 0);
          final DateTime dt14 = new DateTime(2013, 12, 10, 9, 0, 2, 2);
          final DateTime dt15 = new DateTime(2013, 12, 10, 9, 0, 2, 4);
          final DateTime dt16 = new DateTime(2013, 12, 10, 12, 0, 0, 147);
  
          final DateTime t = new DateTime(2013, 12, 10, 11, 59, 58, 1);
  
          final Period p = new Period(PeriodType.TICK, 1);
          final DataSeriesImpl<DataPointImpl> ds = new DataSeriesImpl<DataPointImpl>(p);
  
  		ds.insertData(new BarImpl(null, dt, p, null, null, null, null, null, null));
          assertEquals(1, ds.size());
  		assertEquals(0, ds.indexOf(dt, false));
  
  		ds.insertData(new BarImpl(null, dt2, p, null, null, null, null, null, null));
          assertEquals(2, ds.size());
  		assertEquals(1, ds.indexOf(dt2, false));
  
  		ds.insertData(new BarImpl(null, dt3, p, null, null, null, null, null, null));
          assertEquals(3, ds.size());
  		assertEquals(2, ds.indexOf(dt3, false));
  
  		ds.insertData(new BarImpl(null, dt4, p, null, null, null, null, null, null));
          assertEquals(4, ds.size());
  		assertEquals(3, ds.indexOf(dt4, false));
  
  		ds.insertData(new BarImpl(null, dt5, p, null, null, null, null, null, null));
          assertEquals(5, ds.size());
  		assertEquals(4, ds.indexOf(dt5, false));
  
  		ds.insertData(new BarImpl(null, dt6, p, null, null, null, null, null, null));
          assertEquals(6, ds.size());
  		assertEquals(5, ds.indexOf(dt6, false));
  
  		ds.insertData(new BarImpl(null, dt7, p, null, null, null, null, null, null));
          assertEquals(7, ds.size());
  		assertEquals(6, ds.indexOf(dt7, false));
  
  		ds.insertData(new BarImpl(null, dt8, p, null, null, null, null, null, null));
          assertEquals(8, ds.size());
  		assertEquals(7, ds.indexOf(dt8, false));
  
  		ds.insertData(new BarImpl(null, dt9, p, null, null, null, null, null, null));
          assertEquals(9, ds.size());
  		assertEquals(8, ds.indexOf(dt9, false));
  
  		ds.insertData(new BarImpl(null, dt10, p, null, null, null, null, null, null));
          assertEquals(10, ds.size());
  		assertEquals(9, ds.indexOf(dt10, false));
  
  		ds.insertData(new BarImpl(null, dt11, p, null, null, null, null, null, null));
          assertEquals(11, ds.size());
  		assertEquals(10, ds.indexOf(dt11, false));
  
  		ds.insertData(new BarImpl(null, dt12, p, null, null, null, null, null, null));
          assertEquals(12, ds.size());
  		assertEquals(11, ds.indexOf(dt12, false));
  
  		ds.insertData(new BarImpl(null, dt13, p, null, null, null, null, null, null));
          assertEquals(13, ds.size());
  		assertEquals(12, ds.indexOf(dt13, false));
  
  		ds.insertData(new BarImpl(null, dt14, p, null, null, null, null, null, null));
          assertEquals(14, ds.size());
  		assertEquals(13, ds.indexOf(dt14, false));
  
  		ds.insertData(new BarImpl(null, dt15, p, null, null, null, null, null, null));
          assertEquals(15, ds.size());
  		assertEquals(14, ds.indexOf(dt15, false));
  
  		ds.insertData(new BarImpl(null, dt16, p, null, null, null, null, null, null));
          assertEquals(16, ds.size());
  		assertEquals(15, ds.indexOf(dt16, false));
  
          ////
  
          //Becomes index 15 and bumps the above insertion to the right
  		ds.insertData(new BarImpl(null, t, p, null, null, null, null, null, null));
          assertEquals(17, ds.size());
  		assertEquals(15, ds.indexOf(t, false));
  
          //Prev dt16 now is moved to the right due to the above insertion
  		assertEquals(16, ds.indexOf(dt16, false));
  
          System.out.println(dt);
      }
test_case.class_method_signature: DataSeriesImplTest.testInsertData()
test_case.full_signature: @Test public void testInsertData()
test_case.identifier: testInsertData
test_case.invocations: insertData assertEquals size assertEquals indexOf insertData assertEquals size assertEquals indexOf insertData assertEquals size assertEquals indexOf insertData assertEquals size assertEquals indexOf insertData assertEquals size assertEquals indexOf insertData assertEquals size assertEquals indexOf insertData assertEquals size assertEquals indexOf insertData assertEquals size assertEquals indexOf insertData assertEquals size assertEquals indexOf insertData assertEquals size assertEquals indexOf insertData assertEquals size assertEquals indexOf insertData assertEquals size assertEquals indexOf insertData assertEquals size assertEquals indexOf insertData assertEquals size assertEquals indexOf insertData assertEquals size assertEquals indexOf insertData assertEquals size assertEquals indexOf insertData assertEquals size assertEquals indexOf assertEquals indexOf println
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testInsertData()
focal_class.declarator: period
focal_class.modifier: private
focal_class.original_string: private Period period;
focal_class.type: Period
focal_class.var_name: period
focal_class.declarator: data = Collections.synchronizedList(new ArrayList<DataPointImpl>())
focal_class.modifier: private
focal_class.original_string: private List<DataPointImpl> data = Collections.synchronizedList(new ArrayList<DataPointImpl>());
focal_class.type: List<DataPointImpl>
focal_class.var_name: data
focal_class.file: series/src/main/java/com/barchart/feed/series/DataSeriesImpl.java
focal_class.identifier: DataSeriesImpl
focal_class.interfaces: implements DataSeries<E>
focal_class.class_method_signature: DataSeriesImpl.DataSeriesImpl(Period period)
focal_class.full_signature: public  DataSeriesImpl(Period period)
focal_class.identifier: DataSeriesImpl
focal_class.modifiers: public
focal_class.parameters: (Period period)
focal_class.signature:  DataSeriesImpl(Period period)
focal_class.class_method_signature: DataSeriesImpl.getPeriod()
focal_class.full_signature: @Override public Period getPeriod()
focal_class.identifier: getPeriod
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: Period
focal_class.signature: Period getPeriod()
focal_class.class_method_signature: DataSeriesImpl.getStart()
focal_class.full_signature: @Override public DateTime getStart()
focal_class.identifier: getStart
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: DateTime
focal_class.signature: DateTime getStart()
focal_class.class_method_signature: DataSeriesImpl.getEnd()
focal_class.full_signature: @Override public DateTime getEnd()
focal_class.identifier: getEnd
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: DateTime
focal_class.signature: DateTime getEnd()
focal_class.class_method_signature: DataSeriesImpl.getFirst()
focal_class.full_signature: @SuppressWarnings("unchecked") @Override public E getFirst()
focal_class.identifier: getFirst
focal_class.modifiers: @SuppressWarnings("unchecked") @Override public
focal_class.parameters: ()
focal_class.return: E
focal_class.signature: E getFirst()
focal_class.class_method_signature: DataSeriesImpl.getLast()
focal_class.full_signature: @SuppressWarnings("unchecked") @Override public E getLast()
focal_class.identifier: getLast
focal_class.modifiers: @SuppressWarnings("unchecked") @Override public
focal_class.parameters: ()
focal_class.return: E
focal_class.signature: E getLast()
focal_class.class_method_signature: DataSeriesImpl.size()
focal_class.full_signature: @Override public int size()
focal_class.identifier: size
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int size()
focal_class.class_method_signature: DataSeriesImpl.get(int index)
focal_class.full_signature: @SuppressWarnings("unchecked") @Override public E get(int index)
focal_class.identifier: get
focal_class.modifiers: @SuppressWarnings("unchecked") @Override public
focal_class.parameters: (int index)
focal_class.return: E
focal_class.signature: E get(int index)
focal_class.class_method_signature: DataSeriesImpl.forDate(DateTime date)
focal_class.full_signature: @SuppressWarnings("unchecked") @Override public E forDate(DateTime date)
focal_class.identifier: forDate
focal_class.modifiers: @SuppressWarnings("unchecked") @Override public
focal_class.parameters: (DateTime date)
focal_class.return: E
focal_class.signature: E forDate(DateTime date)
focal_class.class_method_signature: DataSeriesImpl.closestIndexOf(Time time, int idxLower, int idxUpper, boolean compareAtRes)
focal_class.full_signature: @Override public int closestIndexOf(Time time, int idxLower, int idxUpper, boolean compareAtRes)
focal_class.identifier: closestIndexOf
focal_class.modifiers: @Override public
focal_class.parameters: (Time time, int idxLower, int idxUpper, boolean compareAtRes)
focal_class.return: int
focal_class.signature: int closestIndexOf(Time time, int idxLower, int idxUpper, boolean compareAtRes)
focal_class.class_method_signature: DataSeriesImpl.indexOf(DateTime date, boolean exactOnly)
focal_class.full_signature: @Override public int indexOf(DateTime date, boolean exactOnly)
focal_class.identifier: indexOf
focal_class.modifiers: @Override public
focal_class.parameters: (DateTime date, boolean exactOnly)
focal_class.return: int
focal_class.signature: int indexOf(DateTime date, boolean exactOnly)
focal_class.class_method_signature: DataSeriesImpl.getInterpolatedIndex(int size, long searchMillis, long leastMillis, long mostMillis, boolean isExact)
focal_class.full_signature: private int getInterpolatedIndex(int size, long searchMillis, long leastMillis, long mostMillis, boolean isExact)
focal_class.identifier: getInterpolatedIndex
focal_class.modifiers: private
focal_class.parameters: (int size, long searchMillis, long leastMillis, long mostMillis, boolean isExact)
focal_class.return: int
focal_class.signature: int getInterpolatedIndex(int size, long searchMillis, long leastMillis, long mostMillis, boolean isExact)
focal_class.class_method_signature: DataSeriesImpl.indexOf(DateTime date, int high, int low, boolean exactOnly)
focal_class.full_signature: public int indexOf(DateTime date, int high, int low, boolean exactOnly)
focal_class.identifier: indexOf
focal_class.modifiers: public
focal_class.parameters: (DateTime date, int high, int low, boolean exactOnly)
focal_class.return: int
focal_class.signature: int indexOf(DateTime date, int high, int low, boolean exactOnly)
focal_class.class_method_signature: DataSeriesImpl.iterator()
focal_class.full_signature: @SuppressWarnings("unchecked") @Override public Iterator<E> iterator()
focal_class.identifier: iterator
focal_class.modifiers: @SuppressWarnings("unchecked") @Override public
focal_class.parameters: ()
focal_class.return: Iterator<E>
focal_class.signature: Iterator<E> iterator()
focal_class.class_method_signature: DataSeriesImpl.reverseIterator()
focal_class.full_signature: @Override @SuppressWarnings("unchecked") public Iterator<E> reverseIterator()
focal_class.identifier: reverseIterator
focal_class.modifiers: @Override @SuppressWarnings("unchecked") public
focal_class.parameters: ()
focal_class.return: Iterator<E>
focal_class.signature: Iterator<E> reverseIterator()
focal_class.class_method_signature: DataSeriesImpl.toArray()
focal_class.full_signature: @Override @SuppressWarnings("unchecked") public E[] toArray()
focal_class.identifier: toArray
focal_class.modifiers: @Override @SuppressWarnings("unchecked") public
focal_class.parameters: ()
focal_class.return: E[]
focal_class.signature: E[] toArray()
focal_class.class_method_signature: DataSeriesImpl.insertData(E e)
focal_class.full_signature: public void insertData(E e)
focal_class.identifier: insertData
focal_class.modifiers: public
focal_class.parameters: (E e)
focal_class.return: void
focal_class.signature: void insertData(E e)
focal_class.class_method_signature: DataSeriesImpl.add(E e)
focal_class.full_signature: @Override public boolean add(E e)
focal_class.identifier: add
focal_class.modifiers: @Override public
focal_class.parameters: (E e)
focal_class.return: boolean
focal_class.signature: boolean add(E e)
focal_class.class_method_signature: DataSeriesImpl.add(int index, E e)
focal_class.full_signature: @Override public void add(int index, E e)
focal_class.identifier: add
focal_class.modifiers: @Override public
focal_class.parameters: (int index, E e)
focal_class.return: void
focal_class.signature: void add(int index, E e)
focal_class.class_method_signature: DataSeriesImpl.set(int index, E e)
focal_class.full_signature: @Override public E set(int index, E e)
focal_class.identifier: set
focal_class.modifiers: @Override public
focal_class.parameters: (int index, E e)
focal_class.return: E
focal_class.signature: E set(int index, E e)
focal_class.class_method_signature: DataSeriesImpl.remove(int index)
focal_class.full_signature: @Override @SuppressWarnings("unchecked") public E remove(int index)
focal_class.identifier: remove
focal_class.modifiers: @Override @SuppressWarnings("unchecked") public
focal_class.parameters: (int index)
focal_class.return: E
focal_class.signature: E remove(int index)
focal_class.class_method_signature: DataSeriesImpl.isEmpty()
focal_class.full_signature: @Override public boolean isEmpty()
focal_class.identifier: isEmpty
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean isEmpty()
focal_class.class_method_signature: DataSeriesImpl.contains(Object o)
focal_class.full_signature: @Override public boolean contains(Object o)
focal_class.identifier: contains
focal_class.modifiers: @Override public
focal_class.parameters: (Object o)
focal_class.return: boolean
focal_class.signature: boolean contains(Object o)
focal_class.class_method_signature: DataSeriesImpl.toArray(T[] a)
focal_class.full_signature: @Override public T[] toArray(T[] a)
focal_class.identifier: toArray
focal_class.modifiers: @Override public
focal_class.parameters: (T[] a)
focal_class.return: T[]
focal_class.signature: T[] toArray(T[] a)
focal_class.class_method_signature: DataSeriesImpl.remove(Object o)
focal_class.full_signature: @Override public boolean remove(Object o)
focal_class.identifier: remove
focal_class.modifiers: @Override public
focal_class.parameters: (Object o)
focal_class.return: boolean
focal_class.signature: boolean remove(Object o)
focal_class.class_method_signature: DataSeriesImpl.containsAll(Collection<?> c)
focal_class.full_signature: @Override public boolean containsAll(Collection<?> c)
focal_class.identifier: containsAll
focal_class.modifiers: @Override public
focal_class.parameters: (Collection<?> c)
focal_class.return: boolean
focal_class.signature: boolean containsAll(Collection<?> c)
focal_class.class_method_signature: DataSeriesImpl.addAll(Collection<? extends E> c)
focal_class.full_signature: @SuppressWarnings("unchecked") @Override public boolean addAll(Collection<? extends E> c)
focal_class.identifier: addAll
focal_class.modifiers: @SuppressWarnings("unchecked") @Override public
focal_class.parameters: (Collection<? extends E> c)
focal_class.return: boolean
focal_class.signature: boolean addAll(Collection<? extends E> c)
focal_class.class_method_signature: DataSeriesImpl.addAll(int index, Collection<? extends E> c)
focal_class.full_signature: @SuppressWarnings("unchecked") @Override public boolean addAll(int index, Collection<? extends E> c)
focal_class.identifier: addAll
focal_class.modifiers: @SuppressWarnings("unchecked") @Override public
focal_class.parameters: (int index, Collection<? extends E> c)
focal_class.return: boolean
focal_class.signature: boolean addAll(int index, Collection<? extends E> c)
focal_class.class_method_signature: DataSeriesImpl.removeAll(Collection<?> c)
focal_class.full_signature: @Override public boolean removeAll(Collection<?> c)
focal_class.identifier: removeAll
focal_class.modifiers: @Override public
focal_class.parameters: (Collection<?> c)
focal_class.return: boolean
focal_class.signature: boolean removeAll(Collection<?> c)
focal_class.class_method_signature: DataSeriesImpl.retainAll(Collection<?> c)
focal_class.full_signature: @Override public boolean retainAll(Collection<?> c)
focal_class.identifier: retainAll
focal_class.modifiers: @Override public
focal_class.parameters: (Collection<?> c)
focal_class.return: boolean
focal_class.signature: boolean retainAll(Collection<?> c)
focal_class.class_method_signature: DataSeriesImpl.clear()
focal_class.full_signature: @Override public void clear()
focal_class.identifier: clear
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void clear()
focal_class.class_method_signature: DataSeriesImpl.indexOf(Object o)
focal_class.full_signature: @Override public int indexOf(Object o)
focal_class.identifier: indexOf
focal_class.modifiers: @Override public
focal_class.parameters: (Object o)
focal_class.return: int
focal_class.signature: int indexOf(Object o)
focal_class.class_method_signature: DataSeriesImpl.lastIndexOf(Object o)
focal_class.full_signature: @Override public int lastIndexOf(Object o)
focal_class.identifier: lastIndexOf
focal_class.modifiers: @Override public
focal_class.parameters: (Object o)
focal_class.return: int
focal_class.signature: int lastIndexOf(Object o)
focal_class.class_method_signature: DataSeriesImpl.listIterator()
focal_class.full_signature: @SuppressWarnings("unchecked") @Override public ListIterator<E> listIterator()
focal_class.identifier: listIterator
focal_class.modifiers: @SuppressWarnings("unchecked") @Override public
focal_class.parameters: ()
focal_class.return: ListIterator<E>
focal_class.signature: ListIterator<E> listIterator()
focal_class.class_method_signature: DataSeriesImpl.listIterator(int index)
focal_class.full_signature: @SuppressWarnings("unchecked") @Override public ListIterator<E> listIterator(int index)
focal_class.identifier: listIterator
focal_class.modifiers: @SuppressWarnings("unchecked") @Override public
focal_class.parameters: (int index)
focal_class.return: ListIterator<E>
focal_class.signature: ListIterator<E> listIterator(int index)
focal_class.class_method_signature: DataSeriesImpl.subList(int fromIndex, int toIndex)
focal_class.full_signature: @SuppressWarnings("unchecked") @Override public List<E> subList(int fromIndex, int toIndex)
focal_class.identifier: subList
focal_class.modifiers: @SuppressWarnings("unchecked") @Override public
focal_class.parameters: (int fromIndex, int toIndex)
focal_class.return: List<E>
focal_class.signature: List<E> subList(int fromIndex, int toIndex)
focal_method.body: public void insertData(E e) {
  		data.add(indexOf(e.getDate(), false), (DataPointImpl) e);
  	}
focal_method.class_method_signature: DataSeriesImpl.insertData(E e)
focal_method.full_signature: public void insertData(E e)
focal_method.identifier: insertData
focal_method.invocations: add indexOf getDate
focal_method.modifiers: public
focal_method.parameters: (E e)
focal_method.return: void
focal_method.signature: void insertData(E e)