java - 谁能帮助我理解 ArrayList<ArrayDeque<ByteBuffer>> 类型?

标签 java

我找到了类型here :

ArrayList<ArrayDeque<ByteBuffer>> mMuxerInputQueue;

我不太明白。

为什么这样定义?

最佳答案

有关更多信息,我们应该知道您在哪里找到此声明以及为什么需要使用它......但是,继续......

您有一个列表,其中每个位置都包含字节集合

让我们更好地解释一下:

  • 你有一个ArrayList,直到这里一切正常。对吗?

  • ArrayList在每个位置包含一个名为 ArrayDeque 的集合。 :

    Resizable-array implementation of the Deque interface. Array deques have no capacity restrictions; they grow as necessary to support usage. They are not thread-safe; in the absence of external synchronization, they do not support concurrent access by multiple threads. Null elements are prohibited. This class is likely to be faster than Stack when used as a stack, and faster than LinkedList when used as a queue.

  • 还有这个ArrayDeque每个位置都包含 ByteBuffer ,即 Buffer 的扩展,它是字节的容器:

    Buffer: A container for data of a specific primitive type.

关于java - 谁能帮助我理解 ArrayList<ArrayDeque<ByteBuffer>> 类型?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31582036/

相关文章:

java - 从 Windows 控制台中的 Java 代码问题打印出 unicode

java - 如何从资源文件夹加载文件?

java - 如何在组织中实现角色/职称的层次结构并在 JAVA 中在它们之间进行交易

java - 修复代码 : Finding all calls to the ordinal method of an enum

java - 在对象数组中找到第一个空槽

java - Tapestry:使用@Startup和@Order注释的启动顺序

java - 如何在java中构建url?

java - 如何解决 "The Google Maps Android API Street View service has been disabled for this application"?

java - 如何检查请求的 TLS 版本

java - 我必须指定 jooq 结果类型吗?