public List < RawEntry > toRawList ( ) { if ( t == null || t . size ( ) == 0 ) { return Collections . emptyList ( ) ; } List < RawEntry > result = new ArrayList < RawEntry > ( t . size ( ) ) ; int lastDuration = 0 ; for ( int i = 0 ; i < t . size ( ) ; i ++ ) { long timestamp = t . get ( i ) ; int duration = - 1 ; if ( i < d . size ( ) ) { duration = d . get ( i ) ; } if ( duration == - 1 ) { duration = lastDuration ; } lastDuration = duration ; long timestampMillis ; long durationMillis ; if ( u == null || u . equals ( "m" ) ) { timestampMillis = 1000L * 60 * timestamp ; durationMillis = 1000L * 60 * duration ; } else if ( u . equals ( "s" ) ) { timestampMillis = 1000L * timestamp ; durationMillis = 1000L * duration ; } else if ( u . equals ( "S" ) ) { timestampMillis = timestamp ; durationMillis = duration ; } else { throw new IllegalArgumentException ( "Unit not supported: " + u ) ; } result . add ( new RawEntry ( timestampMillis , durationMillis , c == null || i >= c . size ( ) ? null : c . get ( i ) , s == null || i >= s . size ( ) ? null : s . get ( i ) , a == null || i >= a . size ( ) ? null : a . get ( i ) , m == null || i >= m . size ( ) ? null : m . get ( i ) , x == null || i >= x . size ( ) ? null : x . get ( i ) , n == null || i >= n . size ( ) ? null : n . get ( i ) , o == null || i >= o . size ( ) ? null : o . get ( i ) ) ) ; } return result ; }
Convert into raw list form .