public Object[] toObjectArray(
     ThriftEventBundle thriftEventBundle,
     AttributeType[] attributeTypeOrder,
     IndexCounter indexCounter) {
   if (attributeTypeOrder != null) {
     Object[] objects = new Object[attributeTypeOrder.length];
     for (int i = 0; i < attributeTypeOrder.length; i++) {
       switch (attributeTypeOrder[i]) {
         case INT:
           objects[i] = thriftEventBundle.getIntAttributeList().get(indexCounter.getIntCount());
           indexCounter.incrementIntCount();
           break;
         case LONG:
           objects[i] = thriftEventBundle.getLongAttributeList().get(indexCounter.getLongCount());
           indexCounter.incrementLongCount();
           break;
         case STRING:
           String stringValue =
               thriftEventBundle.getStringAttributeList().get(indexCounter.getStringCount());
           if (stringValue.equals(EventDefinitionConverterUtils.nullString)) {
             objects[i] = null;
           } else {
             objects[i] = stringValue;
           }
           indexCounter.incrementStringCount();
           break;
         case DOUBLE:
           objects[i] =
               thriftEventBundle.getDoubleAttributeList().get(indexCounter.getDoubleCount());
           indexCounter.incrementDoubleCount();
           break;
         case FLOAT:
           objects[i] =
               thriftEventBundle
                   .getDoubleAttributeList()
                   .get(indexCounter.getDoubleCount())
                   .floatValue();
           indexCounter.incrementDoubleCount();
           break;
         case BOOL:
           objects[i] = thriftEventBundle.getBoolAttributeList().get(indexCounter.getBoolCount());
           indexCounter.incrementBoolCount();
           break;
       }
     }
     return objects;
   } else {
     return null;
   }
 }