public static <T> AttributeSensor<T> newSensor(Class<T> type, String name, String description) { return new BasicAttributeSensor<T>(type, name, description); }
public static <T> AttributeSensor<T> newSensor(Class<T> type, String name) { return new BasicAttributeSensor<T>(type, name); }
public static <T> AttributeSensor<T> newSensor(TypeToken<T> type, String name, String description) { return new BasicAttributeSensor<T>(type, name, description); }
private AttributeSensor<?> findSensor(EntityLocal entity, String name) { Sensor<?> s = entity.getEntityType().getSensor(name); if (s instanceof AttributeSensor) return (AttributeSensor<?>) s; return new BasicAttributeSensor<Object>(Object.class, name); }
private AttributeSensor<?> findSensor(EntityLocal entity, String name) { Sensor<?> s = entity.getEntityType().getSensor(name); if (s instanceof AttributeSensor) return (AttributeSensor<?>) s; return new BasicAttributeSensor<Object>(Object.class, name); }