use of com.ait.tooling.nativetools.client.collection.NFastStringSet in project lienzo-core by ahome-it.
the class AbstractAccumulatingAttributesChangedBatcher method dispatch.
protected final void dispatch() {
if ((null != m_manager) && (false == m_changed.isEmpty())) {
final NFastStringSet changed = new NFastStringSet(m_changed);
m_changed = new NFastStringSet();
final long begtime = m_begtime;
final long endtime = m_endtime;
final AttributesChangedManager manager = m_manager;
m_begtime = 0L;
m_endtime = 0L;
m_manager = null;
manager.fireChanged(changed, begtime, endtime);
}
}
use of com.ait.tooling.nativetools.client.collection.NFastStringSet in project lienzo-core by ahome-it.
the class ImmediateAttributesChangedBatcher method bufferAttributeWithManager.
@Override
public void bufferAttributeWithManager(final String name, final AttributesChangedManager manager) {
final long time = System.currentTimeMillis();
Scheduler.get().scheduleFixedDelay(new RepeatingCommand() {
@Override
public boolean execute() {
manager.fireChanged(new NFastStringSet(name), time, time);
return false;
}
}, 0);
}
use of com.ait.tooling.nativetools.client.collection.NFastStringSet in project lienzo-core by ahome-it.
the class AttributesChangedEvent method one.
public final boolean one(final List<Attribute> attributes) {
int count = 0;
final NFastStringSet seen = new NFastStringSet();
for (Attribute attribute : attributes) {
final String name = attribute.getProperty();
if (false == seen.contains(name)) {
if (m_changed.contains(name)) {
if (++count > 1) {
return false;
}
seen.add(name);
}
}
}
return (0 != count);
}
use of com.ait.tooling.nativetools.client.collection.NFastStringSet in project lienzo-core by ahome-it.
the class AttributesChangedEvent method one.
public final boolean one(final Attribute... attributes) {
int count = 0;
final NFastStringSet seen = new NFastStringSet();
for (Attribute attribute : attributes) {
final String name = attribute.getProperty();
if (false == seen.contains(name)) {
if (m_changed.contains(name)) {
if (++count > 1) {
return false;
}
seen.add(name);
}
}
}
return (0 != count);
}
use of com.ait.tooling.nativetools.client.collection.NFastStringSet in project lienzo-core by ahome-it.
the class AttributesChangedEvent method count.
public final int count(final List<Attribute> attributes) {
int count = 0;
final NFastStringSet seen = new NFastStringSet();
for (Attribute attribute : attributes) {
final String name = attribute.getProperty();
if (false == seen.contains(name)) {
if (m_changed.contains(name)) {
count++;
seen.add(name);
}
}
}
return count;
}
Aggregations