org.jgroups.util.Util.shuffle()方法的使用及代码示例

x33g5p2x  于2022-02-01 转载在 其他  
字(0.7k)|赞(0)|评价(0)|浏览(194)

本文整理了Java中org.jgroups.util.Util.shuffle()方法的一些代码示例,展示了Util.shuffle()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Util.shuffle()方法的具体详情如下:
包路径:org.jgroups.util.Util
类名称:Util
方法名:shuffle

Util.shuffle介绍

[英]Reorders elements of an array in-place. No bounds checking is performed. Null elements are shuffled, too
[中]在适当的位置重新排列数组的元素。不执行边界检查。空元素也会被洗牌

代码示例

代码示例来源:origin: wildfly/wildfly

protected static void shuffle(MessageBatch batch) {
  Message[] msgs=batch.array();
  Util.shuffle(msgs, 0, batch.index());
}

代码示例来源:origin: org.jboss.eap/wildfly-client-all

protected static void shuffle(MessageBatch batch) {
  Message[] msgs=batch.array();
  Util.shuffle(msgs, 0, batch.index());
}

相关文章

微信公众号

最新文章

更多

Util类方法