本文整理汇总了Java中com.espertech.esper.event.arr.ObjectArrayEventType.getPropertiesIndexes方法的典型用法代码示例。如果您正苦于以下问题:Java ObjectArrayEventType.getPropertiesIndexes方法的具体用法?Java ObjectArrayEventType.getPropertiesIndexes怎么用?Java ObjectArrayEventType.getPropertiesIndexes使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.espertech.esper.event.arr.ObjectArrayEventType
的用法示例。
在下文中一共展示了ObjectArrayEventType.getPropertiesIndexes方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: EventBeanManufacturerObjectArray
import com.espertech.esper.event.arr.ObjectArrayEventType; //导入方法依赖的package包/类
/**
* Ctor.
*
* @param eventType type to create
* @param eventAdapterService event factory
* @param properties written properties
*/
public EventBeanManufacturerObjectArray(ObjectArrayEventType eventType, EventAdapterService eventAdapterService, WriteablePropertyDescriptor[] properties) {
this.eventAdapterService = eventAdapterService;
this.eventType = eventType;
Map<String, Integer> indexes = eventType.getPropertiesIndexes();
indexPerWritable = new int[properties.length];
boolean oneToOneMapping = true;
for (int i = 0; i < properties.length; i++) {
String propertyName = properties[i].getPropertyName();
Integer index = indexes.get(propertyName);
if (index == null) {
throw new IllegalStateException("Failed to find property '" + propertyName + "' among the array indexes");
}
indexPerWritable[i] = index;
if (index != i) {
oneToOneMapping = false;
}
}
oneToOne = oneToOneMapping && properties.length == eventType.getPropertyNames().length;
}