use of com.ait.tooling.nativetools.client.collection.NFastStringHistogram in project lienzo-core by ahome-it.
the class AttributesChangedManager method addAttributesChangedHandler.
public final HandlerRegistration addAttributesChangedHandler(final Attribute attribute, final AttributesChangedHandler handler) {
if ((null == attribute) || (null == handler)) {
return null;
}
if (null != m_ser) {
if (null == m_ctr) {
m_ctr = new NFastStringHistogram();
}
if (null == m_map) {
m_map = new NFastStringMap<>();
}
final String name = attribute.getProperty();
m_ctr.inc(name);
HandlerManager entry = m_map.get(name);
if (null == entry) {
m_map.put(name, entry = new HandlerManager(m_ser));
}
return new HandlerRegistrationProxy(name, entry.addHandler(AttributesChangedEvent.getType(), handler));
}
return null;
}
Aggregations