本文整理汇总了Java中org.apache.commons.collections4.queue.CircularFifoQueue.add方法的典型用法代码示例。如果您正苦于以下问题:Java CircularFifoQueue.add方法的具体用法?Java CircularFifoQueue.add怎么用?Java CircularFifoQueue.add使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.commons.collections4.queue.CircularFifoQueue
的用法示例。
在下文中一共展示了CircularFifoQueue.add方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: incrementQueue
import org.apache.commons.collections4.queue.CircularFifoQueue; //导入方法依赖的package包/类
public void incrementQueue(CircularFifoQueue<MinuteInfo> queue) {
ZonedDateTime now = MinuteInfo.getCurrentMinute();
MinuteInfo minuteInfo = null;
if (!queue.isEmpty()) {
minuteInfo = queue.get(queue.size()-1);
//minuteInfo = queue.get(0);
//Log.info("first: {0}", queue.get(0).getMinute());
//Log.info("last: {0}", queue.get(queue.size() -1).getMinute());
//Log.info("now: {0}", now);
if (!minuteInfo.getMinute().equals(now)) {
//Log.info("Minutes do not matched, prepare for new minute");
minuteInfo = null;
}
}
if (minuteInfo == null) {
minuteInfo = new MinuteInfo();
minuteInfo.setMinute(now);
queue.add(minuteInfo);
}
//Log.info("Increment minute {0} {1}", minuteInfo.getMinute().toString(), minuteInfo.getCount().get());
minuteInfo.getCount().incrementAndGet();
}
示例2: isFull_add2266
import org.apache.commons.collections4.queue.CircularFifoQueue; //导入方法依赖的package包/类
@Test(timeout = 1000)
public void isFull_add2266() {
fr.inria.diversify.testamplification.logger.Logger.writeTestStart(Thread.currentThread(),this, "isFull_add2266");
final Set<java.lang.String> set = new HashSet<java.lang.String>();
set.add("1");
set.add("1");
set.add("2");
set.add("3");
try {
org.apache.commons.collections4.CollectionUtils.isFull(null);
} catch (final NullPointerException ex) {
}
fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),6924,null,6923,org.apache.commons.collections4.CollectionUtils.isFull(set));
final CircularFifoQueue<java.lang.String> buf = new CircularFifoQueue<java.lang.String>(set);
fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),6926,null,6925,org.apache.commons.collections4.CollectionUtils.isFull(buf));
buf.remove("2");
fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),6928,null,6927,org.apache.commons.collections4.CollectionUtils.isFull(buf));
buf.add("2");
fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),6930,null,6929,org.apache.commons.collections4.CollectionUtils.isFull(buf));
fr.inria.diversify.testamplification.logger.Logger.writeTestFinish(Thread.currentThread());
}
示例3: isFull_add2267
import org.apache.commons.collections4.queue.CircularFifoQueue; //导入方法依赖的package包/类
@Test(timeout = 1000)
public void isFull_add2267() {
fr.inria.diversify.testamplification.logger.Logger.writeTestStart(Thread.currentThread(),this, "isFull_add2267");
final Set<java.lang.String> set = new HashSet<java.lang.String>();
set.add("1");
set.add("2");
set.add("2");
set.add("3");
try {
org.apache.commons.collections4.CollectionUtils.isFull(null);
} catch (final NullPointerException ex) {
}
fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),6924,null,6923,org.apache.commons.collections4.CollectionUtils.isFull(set));
final CircularFifoQueue<java.lang.String> buf = new CircularFifoQueue<java.lang.String>(set);
fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),6926,null,6925,org.apache.commons.collections4.CollectionUtils.isFull(buf));
buf.remove("2");
fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),6928,null,6927,org.apache.commons.collections4.CollectionUtils.isFull(buf));
buf.add("2");
fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),6930,null,6929,org.apache.commons.collections4.CollectionUtils.isFull(buf));
fr.inria.diversify.testamplification.logger.Logger.writeTestFinish(Thread.currentThread());
}
示例4: isFull_add2268
import org.apache.commons.collections4.queue.CircularFifoQueue; //导入方法依赖的package包/类
@Test(timeout = 1000)
public void isFull_add2268() {
fr.inria.diversify.testamplification.logger.Logger.writeTestStart(Thread.currentThread(),this, "isFull_add2268");
final Set<java.lang.String> set = new HashSet<java.lang.String>();
set.add("1");
set.add("2");
set.add("3");
set.add("3");
try {
org.apache.commons.collections4.CollectionUtils.isFull(null);
} catch (final NullPointerException ex) {
}
fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),6924,null,6923,org.apache.commons.collections4.CollectionUtils.isFull(set));
final CircularFifoQueue<java.lang.String> buf = new CircularFifoQueue<java.lang.String>(set);
fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),6926,null,6925,org.apache.commons.collections4.CollectionUtils.isFull(buf));
buf.remove("2");
fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),6928,null,6927,org.apache.commons.collections4.CollectionUtils.isFull(buf));
buf.add("2");
fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),6930,null,6929,org.apache.commons.collections4.CollectionUtils.isFull(buf));
fr.inria.diversify.testamplification.logger.Logger.writeTestFinish(Thread.currentThread());
}
示例5: isFull_add2269
import org.apache.commons.collections4.queue.CircularFifoQueue; //导入方法依赖的package包/类
@Test(timeout = 1000)
public void isFull_add2269() {
fr.inria.diversify.testamplification.logger.Logger.writeTestStart(Thread.currentThread(),this, "isFull_add2269");
final Set<java.lang.String> set = new HashSet<java.lang.String>();
set.add("1");
set.add("2");
set.add("3");
try {
org.apache.commons.collections4.CollectionUtils.isFull(null);
org.apache.commons.collections4.CollectionUtils.isFull(null);
} catch (final NullPointerException ex) {
}
fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),6924,null,6923,org.apache.commons.collections4.CollectionUtils.isFull(set));
final CircularFifoQueue<java.lang.String> buf = new CircularFifoQueue<java.lang.String>(set);
fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),6926,null,6925,org.apache.commons.collections4.CollectionUtils.isFull(buf));
buf.remove("2");
fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),6928,null,6927,org.apache.commons.collections4.CollectionUtils.isFull(buf));
buf.add("2");
fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),6930,null,6929,org.apache.commons.collections4.CollectionUtils.isFull(buf));
fr.inria.diversify.testamplification.logger.Logger.writeTestFinish(Thread.currentThread());
}
示例6: isFull_add2270
import org.apache.commons.collections4.queue.CircularFifoQueue; //导入方法依赖的package包/类
@Test(timeout = 1000)
public void isFull_add2270() {
fr.inria.diversify.testamplification.logger.Logger.writeTestStart(Thread.currentThread(),this, "isFull_add2270");
final Set<java.lang.String> set = new HashSet<java.lang.String>();
set.add("1");
set.add("2");
set.add("3");
try {
org.apache.commons.collections4.CollectionUtils.isFull(null);
} catch (final NullPointerException ex) {
}
fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),6924,null,6923,org.apache.commons.collections4.CollectionUtils.isFull(set));
final CircularFifoQueue<java.lang.String> buf = new CircularFifoQueue<java.lang.String>(set);
fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),6926,null,6925,org.apache.commons.collections4.CollectionUtils.isFull(buf));
buf.remove("2");
buf.remove("2");
fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),6928,null,6927,org.apache.commons.collections4.CollectionUtils.isFull(buf));
buf.add("2");
fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),6930,null,6929,org.apache.commons.collections4.CollectionUtils.isFull(buf));
fr.inria.diversify.testamplification.logger.Logger.writeTestFinish(Thread.currentThread());
}
示例7: isFull_add2271
import org.apache.commons.collections4.queue.CircularFifoQueue; //导入方法依赖的package包/类
@Test(timeout = 1000)
public void isFull_add2271() {
fr.inria.diversify.testamplification.logger.Logger.writeTestStart(Thread.currentThread(),this, "isFull_add2271");
final Set<java.lang.String> set = new HashSet<java.lang.String>();
set.add("1");
set.add("2");
set.add("3");
try {
org.apache.commons.collections4.CollectionUtils.isFull(null);
} catch (final NullPointerException ex) {
}
fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),6924,null,6923,org.apache.commons.collections4.CollectionUtils.isFull(set));
final CircularFifoQueue<java.lang.String> buf = new CircularFifoQueue<java.lang.String>(set);
fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),6926,null,6925,org.apache.commons.collections4.CollectionUtils.isFull(buf));
buf.remove("2");
fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),6928,null,6927,org.apache.commons.collections4.CollectionUtils.isFull(buf));
buf.add("2");
buf.add("2");
fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),6930,null,6929,org.apache.commons.collections4.CollectionUtils.isFull(buf));
fr.inria.diversify.testamplification.logger.Logger.writeTestFinish(Thread.currentThread());
}
示例8: isFull
import org.apache.commons.collections4.queue.CircularFifoQueue; //导入方法依赖的package包/类
@Test
public void isFull() {
fr.inria.diversify.testamplification.logger.Logger.writeTestStart(Thread.currentThread(),this, "isFull");
final Set<java.lang.String> set = new HashSet<java.lang.String>();
set.add("foo");
set.add("2");
set.add("3");
try {
org.apache.commons.collections4.CollectionUtils.isFull(null);
} catch (final NullPointerException ex) {
}
fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),6924,null,6923,org.apache.commons.collections4.CollectionUtils.isFull(set));
final CircularFifoQueue<java.lang.String> buf = new CircularFifoQueue<java.lang.String>(set);
fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),6926,null,6925,org.apache.commons.collections4.CollectionUtils.isFull(buf));
buf.remove("2");
fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),6928,null,6927,org.apache.commons.collections4.CollectionUtils.isFull(buf));
buf.add("2");
fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),6930,null,6929,org.apache.commons.collections4.CollectionUtils.isFull(buf));
fr.inria.diversify.testamplification.logger.Logger.writeTestFinish(Thread.currentThread());
}
示例9: isFull_literalMutation2214
import org.apache.commons.collections4.queue.CircularFifoQueue; //导入方法依赖的package包/类
@Test
public void isFull_literalMutation2214() {
fr.inria.diversify.testamplification.logger.Logger.writeTestStart(Thread.currentThread(),this, "isFull_literalMutation2214");
final Set<java.lang.String> set = new HashSet<java.lang.String>();
set.add("1");
set.add("foo");
set.add("3");
try {
org.apache.commons.collections4.CollectionUtils.isFull(null);
} catch (final NullPointerException ex) {
}
fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),6924,null,6923,org.apache.commons.collections4.CollectionUtils.isFull(set));
final CircularFifoQueue<java.lang.String> buf = new CircularFifoQueue<java.lang.String>(set);
fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),6926,null,6925,org.apache.commons.collections4.CollectionUtils.isFull(buf));
buf.remove("2");
fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),6928,null,6927,org.apache.commons.collections4.CollectionUtils.isFull(buf));
buf.add("2");
fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),6930,null,6929,org.apache.commons.collections4.CollectionUtils.isFull(buf));
fr.inria.diversify.testamplification.logger.Logger.writeTestFinish(Thread.currentThread());
}
示例10: isFull_literalMutation2215
import org.apache.commons.collections4.queue.CircularFifoQueue; //导入方法依赖的package包/类
@Test
public void isFull_literalMutation2215() {
fr.inria.diversify.testamplification.logger.Logger.writeTestStart(Thread.currentThread(),this, "isFull_literalMutation2215");
final Set<java.lang.String> set = new HashSet<java.lang.String>();
set.add("1");
set.add("2");
set.add("foo");
try {
org.apache.commons.collections4.CollectionUtils.isFull(null);
} catch (final NullPointerException ex) {
}
fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),6924,null,6923,org.apache.commons.collections4.CollectionUtils.isFull(set));
final CircularFifoQueue<java.lang.String> buf = new CircularFifoQueue<java.lang.String>(set);
fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),6926,null,6925,org.apache.commons.collections4.CollectionUtils.isFull(buf));
buf.remove("2");
fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),6928,null,6927,org.apache.commons.collections4.CollectionUtils.isFull(buf));
buf.add("2");
fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),6930,null,6929,org.apache.commons.collections4.CollectionUtils.isFull(buf));
fr.inria.diversify.testamplification.logger.Logger.writeTestFinish(Thread.currentThread());
}
示例11: isFull_literalMutation2217
import org.apache.commons.collections4.queue.CircularFifoQueue; //导入方法依赖的package包/类
@Test
public void isFull_literalMutation2217() {
fr.inria.diversify.testamplification.logger.Logger.writeTestStart(Thread.currentThread(),this, "isFull_literalMutation2217");
final Set<java.lang.String> set = new HashSet<java.lang.String>();
set.add("1");
set.add("2");
set.add("3");
try {
org.apache.commons.collections4.CollectionUtils.isFull(null);
} catch (final NullPointerException ex) {
}
fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),6924,null,6923,org.apache.commons.collections4.CollectionUtils.isFull(set));
final CircularFifoQueue<java.lang.String> buf = new CircularFifoQueue<java.lang.String>(set);
fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),6926,null,6925,org.apache.commons.collections4.CollectionUtils.isFull(buf));
buf.remove("foo");
fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),6928,null,6927,org.apache.commons.collections4.CollectionUtils.isFull(buf));
buf.add("2");
fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),6930,null,6929,org.apache.commons.collections4.CollectionUtils.isFull(buf));
fr.inria.diversify.testamplification.logger.Logger.writeTestFinish(Thread.currentThread());
}
示例12: isFull_literalMutation2218
import org.apache.commons.collections4.queue.CircularFifoQueue; //导入方法依赖的package包/类
@Test
public void isFull_literalMutation2218() {
fr.inria.diversify.testamplification.logger.Logger.writeTestStart(Thread.currentThread(),this, "isFull_literalMutation2218");
final Set<java.lang.String> set = new HashSet<java.lang.String>();
set.add("1");
set.add("2");
set.add("3");
try {
org.apache.commons.collections4.CollectionUtils.isFull(null);
} catch (final NullPointerException ex) {
}
fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),6924,null,6923,org.apache.commons.collections4.CollectionUtils.isFull(set));
final CircularFifoQueue<java.lang.String> buf = new CircularFifoQueue<java.lang.String>(set);
fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),6926,null,6925,org.apache.commons.collections4.CollectionUtils.isFull(buf));
buf.remove("2");
fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),6928,null,6927,org.apache.commons.collections4.CollectionUtils.isFull(buf));
buf.add("foo");
fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),6930,null,6929,org.apache.commons.collections4.CollectionUtils.isFull(buf));
fr.inria.diversify.testamplification.logger.Logger.writeTestFinish(Thread.currentThread());
}
示例13: isFull_remove1780
import org.apache.commons.collections4.queue.CircularFifoQueue; //导入方法依赖的package包/类
@Test(timeout = 1000)
public void isFull_remove1780() {
fr.inria.diversify.testamplification.logger.Logger.writeTestStart(Thread.currentThread(),this, "isFull_remove1780");
final Set<java.lang.String> set = new HashSet<java.lang.String>();
set.add("2");
set.add("3");
try {
org.apache.commons.collections4.CollectionUtils.isFull(null);
} catch (final NullPointerException ex) {
}
fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),6924,null,6923,org.apache.commons.collections4.CollectionUtils.isFull(set));
final CircularFifoQueue<java.lang.String> buf = new CircularFifoQueue<java.lang.String>(set);
fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),6926,null,6925,org.apache.commons.collections4.CollectionUtils.isFull(buf));
buf.remove("2");
fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),6928,null,6927,org.apache.commons.collections4.CollectionUtils.isFull(buf));
buf.add("2");
fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),6930,null,6929,org.apache.commons.collections4.CollectionUtils.isFull(buf));
fr.inria.diversify.testamplification.logger.Logger.writeTestFinish(Thread.currentThread());
}
示例14: isFull_remove1781
import org.apache.commons.collections4.queue.CircularFifoQueue; //导入方法依赖的package包/类
@Test(timeout = 1000)
public void isFull_remove1781() {
fr.inria.diversify.testamplification.logger.Logger.writeTestStart(Thread.currentThread(),this, "isFull_remove1781");
final Set<java.lang.String> set = new HashSet<java.lang.String>();
set.add("2");
set.add("3");
try {
org.apache.commons.collections4.CollectionUtils.isFull(null);
} catch (final NullPointerException ex) {
}
fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),6924,null,6923,org.apache.commons.collections4.CollectionUtils.isFull(set));
final CircularFifoQueue<java.lang.String> buf = new CircularFifoQueue<java.lang.String>(set);
fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),6926,null,6925,org.apache.commons.collections4.CollectionUtils.isFull(buf));
buf.remove("2");
fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),6928,null,6927,org.apache.commons.collections4.CollectionUtils.isFull(buf));
buf.add("2");
fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),6930,null,6929,org.apache.commons.collections4.CollectionUtils.isFull(buf));
fr.inria.diversify.testamplification.logger.Logger.writeTestFinish(Thread.currentThread());
}
示例15: isFull_remove1782
import org.apache.commons.collections4.queue.CircularFifoQueue; //导入方法依赖的package包/类
@Test(timeout = 1000)
public void isFull_remove1782() {
fr.inria.diversify.testamplification.logger.Logger.writeTestStart(Thread.currentThread(),this, "isFull_remove1782");
final Set<java.lang.String> set = new HashSet<java.lang.String>();
set.add("2");
set.add("3");
try {
org.apache.commons.collections4.CollectionUtils.isFull(null);
} catch (final NullPointerException ex) {
}
fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),6924,null,6923,org.apache.commons.collections4.CollectionUtils.isFull(set));
final CircularFifoQueue<java.lang.String> buf = new CircularFifoQueue<java.lang.String>(set);
fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),6926,null,6925,org.apache.commons.collections4.CollectionUtils.isFull(buf));
buf.remove("2");
fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),6928,null,6927,org.apache.commons.collections4.CollectionUtils.isFull(buf));
buf.add("2");
fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),6930,null,6929,org.apache.commons.collections4.CollectionUtils.isFull(buf));
fr.inria.diversify.testamplification.logger.Logger.writeTestFinish(Thread.currentThread());
}