[{"data":1,"prerenderedAt":3804},["ShallowReactive",2],{"search-docs":3,"doc-\u002Fother\u002Fjava\u002Fcollection\u002Flist-arraylist":886},[4,8,12,16,20,24,28,32,36,40,44,48,52,56,60,64,68,72,76,80,84,88,92,96,100,104,108,112,116,120,124,128,132,136,140,144,148,152,156,159,162,165,169,172,175,178,182,186,190,194,198,202,206,210,214,218,222,226,230,234,238,242,246,250,254,258,262,266,269,273,277,281,285,288,291,294,298,301,304,307,310,313,316,319,322,325,329,332,336,340,344,348,352,356,359,362,365,368,371,374,377,380,383,386,389,393,396,399,402,405,408,411,414,417,420,424,428,432,435,438,442,446,450,454,458,462,466,470,474,477,480,483,487,491,494,497,500,504,507,511,515,518,521,524,527,530,533,536,539,542,545,548,551,554,557,560,563,566,569,572,575,579,583,587,591,595,599,603,606,610,614,617,620,623,626,629,633,637,640,643,646,649,652,655,658,661,664,667,670,673,676,679,682,685,688,691,694,697,700,703,706,709,712,716,720,724,728,732,736,740,744,748,752,756,760,764,768,772,775,779,783,787,790,793,796,799,802,805,808,811,814,818,822,825,829,832,835,838,841,844,848,851,854,858,862,865,869,873,876,879,882],{"path":5,"title":6,"description":7},"\u002Fabout\u002Fauthor","作者相关","只想纯粹的做一个程序员...",{"path":9,"title":10,"description":11},"\u002Fabout\u002Fjourney","心路历程","",{"path":13,"title":14,"description":15},"\u002Fai\u002Fagent\u002Fframeworks","Agent 框架","主流 Agent 框架：LangChain、LlamaIndex、AutoGen、CrewAI",{"path":17,"title":18,"description":19},"\u002Fai\u002Fagent\u002Fhooks","Agent Hooks 与自动化","Claude Agent 的 Hooks 生命周期、事件类型、典型自动化场景",{"path":21,"title":22,"description":23},"\u002Fai\u002Fagent\u002Fintroduction","AI Agent 概述","AI Agent 核心概念：感知、规划、执行、记忆",{"path":25,"title":26,"description":27},"\u002Fai\u002Fagent\u002Fpractice","Agent 实战","AI Agent 实战：构建自主任务执行系统",{"path":29,"title":30,"description":31},"\u002Fai\u002Fagent\u002Fsdk","Claude Agent SDK 开发","使用 Claude Agent SDK 构建自定义 AI Agent：架构、API、生命周期",{"path":33,"title":34,"description":35},"\u002Fai\u002Fagent\u002Fsubagents","Subagents 子代理","用 Subagents 分解复杂任务、并发执行、隔离上下文",{"path":37,"title":38,"description":39},"\u002Fai\u002Fagent\u002Ftool-use","工具调用","AI Agent 工具调用：Function Calling、Tool Use 原理与实践",{"path":41,"title":42,"description":43},"\u002Fai\u002Ffundamentals\u002Fdeep-learning","深度学习入门","深度学习基础知识：前向传播、反向传播、损失函数、优化器",{"path":45,"title":46,"description":47},"\u002Fai\u002Ffundamentals\u002Fml-basics","机器学习基础","机器学习核心概念：监督学习、无监督学习、强化学习",{"path":49,"title":50,"description":51},"\u002Fai\u002Ffundamentals\u002Fneural-networks","神经网络原理","神经网络架构：CNN、RNN、注意力机制",{"path":53,"title":54,"description":55},"\u002Fai\u002Fgetting-started","AI 学习路线","AI 技术学习路线图，从基础到实战的完整指南",{"path":57,"title":58,"description":59},"\u002Fai\u002Fllm\u002Ffine-tuning","模型微调","大模型微调技术：LoRA、QLoRA、全量微调、RLHF",{"path":61,"title":62,"description":63},"\u002Fai\u002Fllm\u002Fintroduction","大模型概述","大语言模型发展历程、核心能力与主流模型对比",{"path":65,"title":66,"description":67},"\u002Fai\u002Fllm\u002Flocal-deploy","本地部署","大模型本地部署：Ollama、vLLM、llama.cpp",{"path":69,"title":70,"description":71},"\u002Fai\u002Fllm\u002Ftransformer","Transformer 架构","Transformer 架构详解：自注意力机制、位置编码、多头注意力",{"path":73,"title":74,"description":75},"\u002Fai\u002Fmcp\u002Fclient","MCP Client 开发","MCP Client 开发指南：连接、调用、集成",{"path":77,"title":78,"description":79},"\u002Fai\u002Fmcp\u002Fdebugging","MCP 调试与排错","MCP Server 开发与集成过程中的常见问题、日志分析、诊断工具",{"path":81,"title":82,"description":83},"\u002Fai\u002Fmcp\u002Fintroduction","MCP 概述","Model Context Protocol 协议概述：架构、核心概念、应用场景",{"path":85,"title":86,"description":87},"\u002Fai\u002Fmcp\u002Fserver","MCP Server 开发","MCP Server 开发指南：资源、工具、提示词的实现",{"path":89,"title":90,"description":91},"\u002Fai\u002Fmcp\u002Ftools","MCP Tools 深入","深入理解 MCP Tools：与 Resources\u002FPrompts 的差异、Schema 设计、Annotations 与权限控制",{"path":93,"title":94,"description":95},"\u002Fai\u002Fprompt\u002Fadvanced","高级 Prompt 模式","高级 Prompt 设计模式：Tree-of-Thought、自我反思、多轮对话策略",{"path":97,"title":98,"description":99},"\u002Fai\u002Fprompt\u002Fbasics","Prompt 基础","Prompt Engineering 入门：基本概念、角色设定、输出格式控制",{"path":101,"title":102,"description":103},"\u002Fai\u002Fprompt\u002Ftechniques","提示词技巧","常用提示词技巧：Few-shot、Chain-of-Thought、ReAct",{"path":105,"title":106,"description":107},"\u002Fai\u002Frag\u002Fembedding","文本嵌入","文本嵌入模型：Embedding 原理、模型选择、相似度计算",{"path":109,"title":110,"description":111},"\u002Fai\u002Frag\u002Fintroduction","RAG 概述","检索增强生成（RAG）架构原理、优势与应用场景",{"path":113,"title":114,"description":115},"\u002Fai\u002Frag\u002Fpractice","RAG 实战","RAG 应用实战：文档问答系统、知识库搭建",{"path":117,"title":118,"description":119},"\u002Fai\u002Frag\u002Fvector-database","向量数据库","主流向量数据库对比：Milvus、Pinecone、Chroma、Weaviate",{"path":121,"title":122,"description":123},"\u002Fai\u002Fskills\u002Fbest-practices","Skill 最佳实践","编写高质量 Skill 的设计原则、常见陷阱与优化技巧",{"path":125,"title":126,"description":127},"\u002Fai\u002Fskills\u002Fcreating","创建自定义 Skill","从零编写一个可被 Agent 自动发现和调用的 Skill",{"path":129,"title":130,"description":131},"\u002Fai\u002Fskills\u002Fintroduction","Agent Skills 概述","Claude Agent Skills 概念、工作原理、与 Tools\u002FMCP 的区别",{"path":133,"title":134,"description":135},"\u002Fgolang\u002Fadvanced\u002Fconcurrency","Go - 并发深入","深入理解 Go 并发编程的核心机制。",{"path":137,"title":138,"description":139},"\u002Fgolang\u002Fadvanced\u002Fgc","Go - 垃圾回收","理解 Go 的垃圾回收机制，掌握 GC 调优方法。",{"path":141,"title":142,"description":143},"\u002Fgolang\u002Fadvanced\u002Fgmp","Go - GMP 调度模型","GMP 是 Go 运行时调度器的核心模型，理解它对于编写高性能 Go 程序至关重要。",{"path":145,"title":146,"description":147},"\u002Fgolang\u002Fadvanced\u002Fgo-concurrency","Go - 并发编程","Go 的并发是其核心特性之一，通过 Goroutine 和 Channel 实现。",{"path":149,"title":150,"description":151},"\u002Fgolang\u002Fadvanced\u002Fmemory","Go - 内存模型","理解 Go 的内存分配机制和内存模型。",{"path":153,"title":154,"description":155},"\u002Fgolang\u002Fadvanced\u002Fprofiling","Go - 性能分析","掌握 Go 的性能分析工具：pprof、trace、benchmark。",{"path":157,"title":158,"description":11},"\u002Fgolang\u002Fcore\u002Fgo-basic","Go - 基础语法",{"path":160,"title":161,"description":11},"\u002Fgolang\u002Fcore\u002Fgo-composite","Go - 复合类型",{"path":163,"title":164,"description":11},"\u002Fgolang\u002Fcore\u002Fgo-control","Go - 流程控制",{"path":166,"title":167,"description":168},"\u002Fgolang\u002Fcore\u002Fgo-error","Go - 错误处理","Go 使用显式的错误返回值来处理错误，而不是异常机制。",{"path":170,"title":171,"description":11},"\u002Fgolang\u002Fcore\u002Fgo-function","Go - 函数",{"path":173,"title":174,"description":11},"\u002Fgolang\u002Fcore\u002Fgo-install","Go - 环境搭建",{"path":176,"title":177,"description":11},"\u002Fgolang\u002Fcore\u002Fgo-interface","Go - 接口",{"path":179,"title":180,"description":181},"\u002Fgolang\u002Fcore\u002Fgo-module","Go - 包管理","Go Modules 是 Go 1.11 引入的官方依赖管理方案，Go 1.16 后成为默认模式。",{"path":183,"title":184,"description":185},"\u002Fgolang\u002Fdistributed\u002Fgrpc","Go - gRPC","gRPC 是 Google 开发的高性能 RPC 框架，使用 Protocol Buffers 作为序列化协议。",{"path":187,"title":188,"description":189},"\u002Fgolang\u002Fdistributed\u002Fmicroservice","Go - 微服务","微服务架构的核心组件：服务发现、负载均衡、熔断降级。",{"path":191,"title":192,"description":193},"\u002Fgolang\u002Fdistributed\u002Fmq","Go - 消息队列","使用 Go 操作 Kafka 和 RabbitMQ。",{"path":195,"title":196,"description":197},"\u002Fgolang\u002Fdistributed\u002Fredis","Go - Redis","使用 go-redis 操作 Redis，实现缓存、分布式锁等功能。",{"path":199,"title":200,"description":201},"\u002Fgolang\u002Fengineering\u002Fconfig","Go - 配置管理","使用 viper 进行配置管理，支持多种配置格式和配置中心。",{"path":203,"title":204,"description":205},"\u002Fgolang\u002Fengineering\u002Fdocker","Go - Docker 部署","使用 Docker 容器化部署 Go 应用。",{"path":207,"title":208,"description":209},"\u002Fgolang\u002Fengineering\u002Fkubernetes","Go - Kubernetes 部署","在 Kubernetes 上部署和管理 Go 应用。",{"path":211,"title":212,"description":213},"\u002Fgolang\u002Fengineering\u002Flogging","Go - 日志系统","使用 zap 和 logrus 构建高性能结构化日志系统。",{"path":215,"title":216,"description":217},"\u002Fgolang\u002Fengineering\u002Ftesting","Go - 单元测试","Go 内置了强大的测试框架，掌握测试是编写高质量代码的基础。",{"path":219,"title":220,"description":221},"\u002Fgolang\u002Fstdlib\u002Fbufio","bufio","在 Go 语言中，bufio 包提供了带缓冲的 I\u002FO 操作，能够提高读写性能。以下是一些常用的 bufio 包 API 及其详细说明：",{"path":223,"title":224,"description":225},"\u002Fgolang\u002Fstdlib\u002Fcontainer","container","在Go语言标准库中，container 包提供了几种常用的数据结构实现，这些数据结构对于高效地管理和操作数据非常有用。以下是 container 包中主要的数据结构：",{"path":227,"title":228,"description":229},"\u002Fgolang\u002Fstdlib\u002Fcrypto","crypto","在 Go 语言中，crypto 包提供了一组用于加密和解密的功能。以下是一些常用的 crypto 包及其子包的 API 及其详细说明：",{"path":231,"title":232,"description":233},"\u002Fgolang\u002Fstdlib\u002Fencoding-csv","encoding\u002Fcsv","在 Go 语言中，encoding\u002Fcsv 包提供了对 CSV（逗号分隔值）文件进行读写的功能。以下是一些常用的 encoding\u002Fcsv 包的 API 及其详细说明：",{"path":235,"title":236,"description":237},"\u002Fgolang\u002Fstdlib\u002Fencoding-json","encoding\u002Fjson","在 Go 语言中，encoding\u002Fjson 包提供了对 JSON 数据进行编码和解码的功能。以下是一些常用的 encoding\u002Fjson 包的 API 及其详细说明：",{"path":239,"title":240,"description":241},"\u002Fgolang\u002Fstdlib\u002Fencoding-xml","encoding\u002Fxml","在 Go 语言中，encoding\u002Fxml 包提供了对 XML 数据进行编码和解码的功能。以下是一些常用的 encoding\u002Fxml 包的 API 及其详细说明：",{"path":243,"title":244,"description":245},"\u002Fgolang\u002Fstdlib\u002Fflag","flag","在Go语言中，flag 包是用于处理命令行参数的标准库，它提供了一种简单而直接的方式来解析和使用命令行参数。下面是关于 flag 包的一些基本介绍和常用功能：",{"path":247,"title":248,"description":249},"\u002Fgolang\u002Fstdlib\u002Ffmt","fmt","在 Go 语言的标准库中，fmt 包是非常重要的，它提供了处理格式化输入和输出的基本工具。以下是一些 fmt 包内常用的API：",{"path":251,"title":252,"description":253},"\u002Fgolang\u002Fstdlib\u002Fhttp","net\u002Fhttp","在 Go 语言中，net\u002Fhttp 包提供了用于构建 HTTP 客户端和服务器的强大工具。以下是一些常用的 net\u002Fhttp 包的 API 及其详细说明：",{"path":255,"title":256,"description":257},"\u002Fgolang\u002Fstdlib\u002Fio","io","在 Go 语言中，io 包提供了基本的输入输出功能。以下是一些常用的 io 包的 API 及其详细说明：",{"path":259,"title":260,"description":261},"\u002Fgolang\u002Fstdlib\u002Flog","log","在 Go 语言中，log 包提供了简单的日志记录功能。以下是一些常用的 log 包的 API 及其详细说明：",{"path":263,"title":264,"description":265},"\u002Fgolang\u002Fstdlib\u002Fmath","math","在 Go 语言中，math 包提供了基本的数学函数和常量。以下是一些常用的 math 包的 API 及其详细说明：",{"path":267,"title":268,"description":11},"\u002Fgolang\u002Fstdlib\u002Fnet","net",{"path":270,"title":271,"description":272},"\u002Fgolang\u002Fstdlib\u002Fos","os","在Go语言中，os 包是一个非常重要且常用的标准库，它提供了与操作系统交互的功能，包括文件操作、环境变量管理、进程管理等。下面是一些 os 包中常用的功能和API：",{"path":274,"title":275,"description":276},"\u002Fgolang\u002Fstdlib\u002Fsort","order","在 Go 语言中，sort 包提供了对切片和用户定义的集合进行排序的函数。它实现了常见的排序算法，如快速排序（Quicksort）和堆排序（Heapsort），并且为自定义集合提供了接口，使得用户可以根据特定的需求进行排序。",{"path":278,"title":279,"description":280},"\u002Fgolang\u002Fstdlib\u002Fstrconv","strconv","在 Go 语言中，strconv 包提供了字符串和基本数据类型之间的转换函数，例如将整数转换为字符串、字符串转换为整数，以及其他类型之间的转换。这些功能非常有用，特别是在处理用户输入或从外部数据源读取数据时。",{"path":282,"title":283,"description":284},"\u002Fgolang\u002Fstdlib\u002Ftime","time","在 Go 语言中，time 包提供了处理时间和日期的功能。以下是一些常用的 time 包的 API 及其详细说明：",{"path":286,"title":287,"description":11},"\u002Fgolang\u002Fweb\u002Fgin\u002Ferror","Gin - 错误处理",{"path":289,"title":290,"description":11},"\u002Fgolang\u002Fweb\u002Fgin\u002Ffile","Gin - 文件处理",{"path":292,"title":293,"description":11},"\u002Fgolang\u002Fweb\u002Fgin\u002Fmiddleware","Gin - 中间件",{"path":295,"title":296,"description":297},"\u002Fgolang\u002Fweb\u002Fgin\u002Fquickstart","Gin - 快速开始","Gin 是目前最流行的 Go Web 框架，以高性能和简洁 API 著称。",{"path":299,"title":300,"description":11},"\u002Fgolang\u002Fweb\u002Fgin\u002Frequest","Gin - 请求处理",{"path":302,"title":303,"description":11},"\u002Fgolang\u002Fweb\u002Fgin\u002Fresponse","Gin - 响应处理",{"path":305,"title":306,"description":11},"\u002Fgolang\u002Fweb\u002Fgin\u002Frouter","Gin - 路由",{"path":308,"title":309,"description":11},"\u002Fgolang\u002Fweb\u002Fgin\u002Fvalidation","Gin - 参数校验",{"path":311,"title":312,"description":11},"\u002Fgolang\u002Fweb\u002Fgorm\u002Fassociation","GORM - 关联关系",{"path":314,"title":315,"description":11},"\u002Fgolang\u002Fweb\u002Fgorm\u002Fcrud","GORM - CRUD 操作",{"path":317,"title":318,"description":11},"\u002Fgolang\u002Fweb\u002Fgorm\u002Fmodel","GORM - 模型定义",{"path":320,"title":321,"description":11},"\u002Fgolang\u002Fweb\u002Fgorm\u002Fperformance","GORM - 日志与性能",{"path":323,"title":324,"description":11},"\u002Fgolang\u002Fweb\u002Fgorm\u002Fquery","GORM - 高级查询",{"path":326,"title":327,"description":328},"\u002Fgolang\u002Fweb\u002Fgorm\u002Fquickstart","GORM - 快速开始","GORM 是 Go 语言最流行的 ORM 库，功能强大，使用简单。",{"path":330,"title":331,"description":11},"\u002Fgolang\u002Fweb\u002Fgorm\u002Ftransaction","GORM - 事务与 Hook",{"path":333,"title":334,"description":335},"\u002Finterview\u002Fbasic","计算机基础面经","本章节汇总了面试中常见的通用技术概念，不局限于特定语言或数据库，是考察技术内功的关键考点。",{"path":337,"title":338,"description":339},"\u002Finterview\u002Fgolang","Golang 面试题","Go 语言面试高频考点，覆盖基础语法、数据结构、并发编程、内存管理、GC、调度器等核心知识。",{"path":341,"title":342,"description":343},"\u002Finterview\u002Fk8s","Kubernetes 面试题","Kubernetes（K8s）面试高频考点，覆盖架构原理、核心资源、网络存储、调度策略、运维监控等核心知识。",{"path":345,"title":346,"description":347},"\u002Finterview\u002Fmysql","MySQL 面试题","MySQL 数据库面试高频考点，覆盖索引、事务、锁、优化、主从复制等核心知识。",{"path":349,"title":350,"description":351},"\u002Finterview\u002Fredis","Redis 面试题","Redis 面试高频考点，覆盖数据结构、持久化、集群、缓存一致性、性能优化等核心知识。",{"path":353,"title":354,"description":355},"\u002Finterview\u002Frocketmq","RocketMQ 面试题","RocketMQ 面试高频考点，覆盖消息模型、可靠性、顺序消息、事务消息、存储与高可用等核心知识。",{"path":357,"title":358,"description":11},"\u002Fother\u002Fjava\u002Fcollection\u002Flist-arraylist","List - ArrayList 源码解析",{"path":360,"title":361,"description":11},"\u002Fother\u002Fjava\u002Fcollection\u002Flist-linkedlist","List - LinkedList 源码解析",{"path":363,"title":364,"description":11},"\u002Fother\u002Fjava\u002Fcollection\u002Flist-stack","List - Satck源码解析",{"path":366,"title":367,"description":11},"\u002Fother\u002Fjava\u002Fcollection\u002Flist-vectore","List - Vector 源码解析",{"path":369,"title":370,"description":11},"\u002Fother\u002Fjava\u002Fcollection\u002Fmap-hashmap","Map - HashMap 源码解析",{"path":372,"title":373,"description":11},"\u002Fother\u002Fjava\u002Fcollection\u002Fmap-linkedhashmap","Map - LinkedHashMap 源码解析",{"path":375,"title":376,"description":11},"\u002Fother\u002Fjava\u002Fcollection\u002Fmap-treemap","Map - TreeMap 源码解析",{"path":378,"title":379,"description":11},"\u002Fother\u002Fjava\u002Fcollection\u002Fqueue-deque","Queue - Deque 接口解析",{"path":381,"title":382,"description":11},"\u002Fother\u002Fjava\u002Fcollection\u002Fqueue-queue","Queue - Queue 接口解析",{"path":384,"title":385,"description":11},"\u002Fother\u002Fjava\u002Fcollection\u002Fset-hashset","Set - HashSet源码解析",{"path":387,"title":388,"description":11},"\u002Fother\u002Fjava\u002Fcollection\u002Fset-linkedhashset","Set - LinkedHashSet 源码解析",{"path":390,"title":391,"description":392},"\u002Fother\u002Fjava\u002Fcollection\u002Fset-treeset","Set - TreeSet源码解析","TreeSet 是一个 Set 集合接口的实现类，与 HashSet 类似，其底层也是通过维护了一个 TreeMap 对象来封装了一些实现方法，故本篇不再对 TreeSet 的底层原理进行详细说明，仅对常用 API 做简单介绍，如需了解 TreeMap 的底层实现原理，请移步 Map - HashMap 源码解析",{"path":394,"title":395,"description":11},"\u002Fother\u002Fjava\u002Fcore\u002Fannotation","Java核心 - 注解",{"path":397,"title":398,"description":11},"\u002Fother\u002Fjava\u002Fcore\u002Fbasic-grammar","Java核心 - 基础语法",{"path":400,"title":401,"description":11},"\u002Fother\u002Fjava\u002Fcore\u002Fclass-and-object","Java核心 - 面向对象",{"path":403,"title":404,"description":11},"\u002Fother\u002Fjava\u002Fcore\u002Fcommon-classes","Java核心 - 常用类",{"path":406,"title":407,"description":11},"\u002Fother\u002Fjava\u002Fcore\u002Fexception","Java核心 - 异常处理",{"path":409,"title":410,"description":11},"\u002Fother\u002Fjava\u002Fcore\u002Fgenerics","Java核心 - 泛型",{"path":412,"title":413,"description":11},"\u002Fother\u002Fjava\u002Fcore\u002Fjdk-env-path","Java核心 - 环境搭建",{"path":415,"title":416,"description":11},"\u002Fother\u002Fjava\u002Fcore\u002Freflection","Java核心 - 反射",{"path":418,"title":419,"description":11},"\u002Fother\u002Fjava\u002Fcore\u002Fstring","Java核心 - String 字符串",{"path":421,"title":422,"description":423},"\u002Fother\u002Fjava\u002Fio\u002Fbuffer-stream","Java IO - 缓冲流","缓冲流是对基本流的包装，通过内置缓冲区减少系统调用次数，大幅提升读写效率。",{"path":425,"title":426,"description":427},"\u002Fother\u002Fjava\u002Fio\u002Fbyte-stream","Java IO - 字节流","字节流是 Java IO 中最基本的流类型，以字节（byte）为单位进行数据读写，可以处理任意类型的文件。",{"path":429,"title":430,"description":431},"\u002Fother\u002Fjava\u002Fio\u002Fchar-stream","Java IO - 字符流","字符流以字符为单位进行读写，专门用于处理文本文件。相比字节流，字符流能够正确处理字符编码，避免中文乱码问题。",{"path":433,"title":434,"description":11},"\u002Fother\u002Fjava\u002Fio\u002Ffile","Java IO - File 类",{"path":436,"title":437,"description":11},"\u002Fother\u002Fjava\u002Fio\u002Fio-stream-system","Java IO - IO流概述",{"path":439,"title":440,"description":441},"\u002Fother\u002Fjava\u002Fio\u002Fnio","Java IO - NIO","NIO（New IO）是 JDK 1.4 引入的新 IO 模型，提供了更高效的 IO 操作方式，支持非阻塞 IO 和多路复用。",{"path":443,"title":444,"description":445},"\u002Fother\u002Fjava\u002Fjvm\u002Fclass-loading","类加载机制","类加载机制是 JVM 将 .class 文件加载到内存，并对数据进行校验、转换解析和初始化，最终形成可被 JVM 直接使用的 Java 类型的过程。",{"path":447,"title":448,"description":449},"\u002Fother\u002Fjava\u002Fjvm\u002Fgarbage-collection","垃圾回收","垃圾回收（Garbage Collection，GC）是 JVM 自动管理内存的机制，负责回收不再使用的对象所占用的内存。",{"path":451,"title":452,"description":453},"\u002Fother\u002Fjava\u002Fjvm\u002Fjvm-memory","JVM 内存结构","JVM 在执行 Java 程序时，会把它管理的内存划分为若干个不同的数据区域。这些区域有各自的用途、创建和销毁时间。",{"path":455,"title":456,"description":457},"\u002Fother\u002Fjava\u002Fjvm\u002Fjvm-tuning","JVM 调优","JVM 调优是优化 Java 应用性能的重要手段，主要包括参数配置、性能监控和问题排查。",{"path":459,"title":460,"description":461},"\u002Fother\u002Fjava\u002Fthread\u002Fatomic","原子类","Java 原子类（Atomic Classes）提供了一种无锁的线程安全方式，基于 CAS（Compare-And-Swap）操作实现。",{"path":463,"title":464,"description":465},"\u002Fother\u002Fjava\u002Fthread\u002Fcompletable-future","CompletableFuture","CompletableFuture 是 JDK 8 引入的异步编程工具，实现了 Future 和 CompletionStage 接口，支持函数式编程和链式调用。",{"path":467,"title":468,"description":469},"\u002Fother\u002Fjava\u002Fthread\u002Fconcurrent-collections","并发集合","Java 并发包提供了多种线程安全的集合类，用于替代传统的同步集合（如 Collections.synchronizedList）。",{"path":471,"title":472,"description":473},"\u002Fother\u002Fjava\u002Fthread\u002Fconcurrent-utils","并发工具类","Java 并发包提供了多种实用的并发工具类，用于控制线程之间的协调与同步。",{"path":475,"title":476,"description":11},"\u002Fother\u002Fjava\u002Fthread\u002Fsynchronized-lock","同步机制",{"path":478,"title":479,"description":11},"\u002Fother\u002Fjava\u002Fthread\u002Fthread-basic","线程基础",{"path":481,"title":482,"description":11},"\u002Fother\u002Fjava\u002Fthread\u002Fthread-pool","线程池",{"path":484,"title":485,"description":486},"\u002Fother\u002Fspring-series\u002Fspring\u002Fannotations-beans","Spring - 基于注解管理Bean","从 Java 5 开始，Java 增加了对注解（Annotation）的支持，它是代码中的一种特殊标记，可以在编译、类加载和运行时被读取，执行相应的处理。开发人员可以通过注解在不改变原有代码和逻辑的情况下，在源代码中嵌入补充信息。",{"path":488,"title":489,"description":490},"\u002Fother\u002Fspring-series\u002Fspring\u002Fimplement-ioc","Spring - 原理手写IoC","Spring 框架的 IOC 是基于 Java 反射机制实现的，在学习手写 IoC 之前，你需要具备一定的 Java 反射相关的知识，参考本站内的 Java 教程。",{"path":492,"title":493,"description":11},"\u002Fother\u002Fspring-series\u002Fspring\u002Fintroduction-case","Spring - 入门案例",{"path":495,"title":496,"description":11},"\u002Fother\u002Fspring-series\u002Fspring\u002Fspring-aop","Spring - 面向切面AOP",{"path":498,"title":499,"description":11},"\u002Fother\u002Fspring-series\u002Fspring\u002Fspring-aot","Spring - AOT提前编译",{"path":501,"title":502,"description":503},"\u002Fother\u002Fspring-series\u002Fspring\u002Fspring-data-validation","Spring - 数据校验","在开发中，我们经常遇到参数校验的需求，比如用户注册的时候，要校验用户名不能为空、用户名长度不超过20个字符、手机号是合法的手机号格式等等。如果使用普通方式，我们会把校验的代码和真正的业务处理逻辑耦合在一起，而且如果未来要新增一种校验逻辑也需要在修改多个地方。而spring validation允许通过注解的方式来定义对象校验规则，把校验和业务逻辑分离开，让代码编写更加方便。Spring Validation其实就是对Hibernate Validator进一步的封装，方便在Spring中使用。",{"path":505,"title":506,"description":11},"\u002Fother\u002Fspring-series\u002Fspring\u002Fspring-i18n","Spring - 国际化i18n",{"path":508,"title":509,"description":510},"\u002Fother\u002Fspring-series\u002Fspring\u002Fspring-ioc","Spring - IOC容器","IoC 是 Inversion of Control 的简写，译为“控制反转”，它不是一门技术，而是一种设计思想，是一个重要的面向对象编程法则，能够指导我们如何设计出松耦合、更优良的程序。",{"path":512,"title":513,"description":514},"\u002Fother\u002Fspring-series\u002Fspring\u002Fspring-junit","Spring - 单元测试JUnit","在之前的测试方法中，几乎都能看到以下的两行代码：",{"path":516,"title":517,"description":11},"\u002Fother\u002Fspring-series\u002Fspring\u002Fspring-resources","Spring - 资源操作",{"path":519,"title":520,"description":11},"\u002Fother\u002Fspring-series\u002Fspring\u002Fspring-summarize","Spring - Spring概述",{"path":522,"title":523,"description":11},"\u002Fother\u002Fspring-series\u002Fspring\u002Fspring-transaction","Spring - 事务",{"path":525,"title":526,"description":11},"\u002Fother\u002Fspring-series\u002Fspring\u002Fxml-beans","Spring - 基于XML管理Bean",{"path":528,"title":529,"description":11},"\u002Fother\u002Fspring-series\u002Fspringboot\u002Fspringboot-config","SpringBoot - 配置详解",{"path":531,"title":532,"description":11},"\u002Fother\u002Fspring-series\u002Fspringboot\u002Fspringboot-data","SpringBoot - 数据访问",{"path":534,"title":535,"description":11},"\u002Fother\u002Fspring-series\u002Fspringboot\u002Fspringboot-quickstart","SpringBoot - 快速入门",{"path":537,"title":538,"description":11},"\u002Fother\u002Fspring-series\u002Fspringboot\u002Fspringboot-web","SpringBoot - Web 开发",{"path":540,"title":541,"description":11},"\u002Fother\u002Fspring-series\u002Fspringcloud\u002Fspringcloud-config","SpringCloud - 配置中心",{"path":543,"title":544,"description":11},"\u002Fother\u002Fspring-series\u002Fspringcloud\u002Fspringcloud-discovery","SpringCloud - 服务注册与发现",{"path":546,"title":547,"description":11},"\u002Fother\u002Fspring-series\u002Fspringcloud\u002Fspringcloud-feign","SpringCloud - 服务调用",{"path":549,"title":550,"description":11},"\u002Fother\u002Fspring-series\u002Fspringcloud\u002Fspringcloud-gateway","SpringCloud - 服务网关",{"path":552,"title":553,"description":11},"\u002Fother\u002Fspring-series\u002Fspringcloud\u002Fspringcloud-introduction","SpringCloud - 微服务概述",{"path":555,"title":556,"description":11},"\u002Fother\u002Fspring-series\u002Fspringcloud\u002Fspringcloud-sentinel","SpringCloud - 服务保护",{"path":558,"title":559,"description":11},"\u002Fother\u002Fspring-series\u002Fspringmvc\u002Fspringmvc-databind","SpringMVC - 数据绑定与转换",{"path":561,"title":562,"description":11},"\u002Fother\u002Fspring-series\u002Fspringmvc\u002Fspringmvc-exception","SpringMVC - 异常处理",{"path":564,"title":565,"description":11},"\u002Fother\u002Fspring-series\u002Fspringmvc\u002Fspringmvc-interceptor","SpringMVC - 拦截器",{"path":567,"title":568,"description":11},"\u002Fother\u002Fspring-series\u002Fspringmvc\u002Fspringmvc-introduction","SpringMVC - 简介与环境搭建",{"path":570,"title":571,"description":11},"\u002Fother\u002Fspring-series\u002Fspringmvc\u002Fspringmvc-request","SpringMVC - 请求处理",{"path":573,"title":574,"description":11},"\u002Fother\u002Fspring-series\u002Fspringmvc\u002Fspringmvc-response","SpringMVC - 响应处理",{"path":576,"title":577,"description":578},"\u002Fproject\u002Frocket-leaf\u002Farchitecture","项目架构","Rocket-Leaf 的目录结构、模块划分、数据流向，以及各层之间的依赖关系。",{"path":580,"title":581,"description":582},"\u002Fproject\u002Frocket-leaf\u002Fbackend-layers","后端分层设计","Rocket-Leaf 的 model \u002F rocketmq \u002F service 三层结构，以及服务之间的依赖关系与设计取舍。",{"path":584,"title":585,"description":586},"\u002Fproject\u002Frocket-leaf\u002Fclient-manager","RocketMQ 客户端管理器","AdminClientManager 的多客户端池、默认连接懒加载、自动重连重试的设计与实现。",{"path":588,"title":589,"description":590},"\u002Fproject\u002Frocket-leaf\u002Fencryption","连接信息加密存储","AES-256-GCM + SHA-256 字段级派生密钥的实现，以及如何在不破坏兼容性的前提下为历史明文数据做透明迁移。",{"path":592,"title":593,"description":594},"\u002Fproject\u002Frocket-leaf\u002Ffrontend","前端结构与类型绑定","React + Vite 目录组织、自动生成的 Wails 绑定、api 薄封装与自定义 hooks 的职责划分。",{"path":596,"title":597,"description":598},"\u002Fproject\u002Frocket-leaf","项目简介","Rocket-Leaf 是一款基于 Wails v3 构建的跨平台 RocketMQ 桌面管理客户端，Go 后端 + React 前端。本文档系列拆解它的架构与关键实现。",{"path":600,"title":601,"description":602},"\u002Fproject\u002Frocket-leaf\u002Fwails-v3","Wails v3 入门","Wails v3 的核心概念、Service 绑定机制，以及 Rocket-Leaf 是如何用它把 Go 后端和 React 前端打通的。",{"path":604,"title":605,"description":11},"\u002Ftutorials\u002Fcloud\u002Fdocker\u002Fdocker-basic","Docker - 入门基础",{"path":607,"title":608,"description":609},"\u002Ftutorials\u002Fcloud\u002Fdocker\u002Fdocker-compose","Docker - Compose","在部署应用时，常常使用到不止一个容器，那么在部署容器的时候就需要一个一个进行部署，这样的部署过程也相对来说比较繁琐复杂，也容易出问题，那么有没有一种更为简单的方法呢？",{"path":611,"title":612,"description":613},"\u002Ftutorials\u002Fcloud\u002Fdocker\u002Fdocker-container-connection","Docker - 容器互联","在上一个章节中我们学习了 Docker 容器的端口映射，可以将 Docker 容器和本地以及网络中的端口进行连接起来。",{"path":615,"title":616,"description":11},"\u002Ftutorials\u002Fcloud\u002Fdocker\u002Fdocker-dockerfile","Docker - Dockerfile",{"path":618,"title":619,"description":11},"\u002Ftutorials\u002Fcloud\u002Fdocker\u002Fdocker-helloworld","Docker - HelloWorld",{"path":621,"title":622,"description":11},"\u002Ftutorials\u002Fcloud\u002Fdocker\u002Fdocker-install","Docker - 安装",{"path":624,"title":625,"description":11},"\u002Ftutorials\u002Fcloud\u002Fdocker\u002Fdocker-introduce","Docker - 简介",{"path":627,"title":628,"description":11},"\u002Ftutorials\u002Fcloud\u002Fdocker\u002Fdocker-object","Docker - 镜像、容器、仓库",{"path":630,"title":631,"description":632},"\u002Ftutorials\u002Fcloud\u002Fdocker\u002Fdocker-warehouse","Docker - 仓库管理","仓库是集中存放资源的地方，代码仓库是存放代码的，那么Docker 中的仓库就是存放 Docker 镜像的。",{"path":634,"title":635,"description":636},"\u002Ftutorials\u002Fcloud\u002Fdocker\u002Fdocker-web-containers","Docker - WEB应用实例","在之前的章节中，仅对普通容器进行了演示，但在实际中常常使用到 Docker 容器中的 WEB 应用程序。",{"path":638,"title":639,"description":11},"\u002Ftutorials\u002Fcloud\u002Fkubernetes\u002Fk8s-config","Kubernetes - ConfigMap 与 Secret",{"path":641,"title":642,"description":11},"\u002Ftutorials\u002Fcloud\u002Fkubernetes\u002Fk8s-helm","Kubernetes - Helm 包管理",{"path":644,"title":645,"description":11},"\u002Ftutorials\u002Fcloud\u002Fkubernetes\u002Fk8s-install","Kubernetes - 集群安装",{"path":647,"title":648,"description":11},"\u002Ftutorials\u002Fcloud\u002Fkubernetes\u002Fk8s-introduction","Kubernetes - 简介与架构",{"path":650,"title":651,"description":11},"\u002Ftutorials\u002Fcloud\u002Fkubernetes\u002Fk8s-kubectl","Kubernetes - kubectl 命令行工具",{"path":653,"title":654,"description":11},"\u002Ftutorials\u002Fcloud\u002Fkubernetes\u002Fk8s-monitoring","Kubernetes - 监控与日志",{"path":656,"title":657,"description":11},"\u002Ftutorials\u002Fcloud\u002Fkubernetes\u002Fk8s-network-security","Kubernetes - 网络与安全",{"path":659,"title":660,"description":11},"\u002Ftutorials\u002Fcloud\u002Fkubernetes\u002Fk8s-service","Kubernetes - Service 与 Ingress",{"path":662,"title":663,"description":11},"\u002Ftutorials\u002Fcloud\u002Fkubernetes\u002Fk8s-storage","Kubernetes - 持久化存储",{"path":665,"title":666,"description":11},"\u002Ftutorials\u002Fcloud\u002Fkubernetes\u002Fk8s-workload","Kubernetes - 工作负载资源",{"path":668,"title":669,"description":11},"\u002Ftutorials\u002Fcloud\u002Flinux\u002Flinux-bash","Linux - Bash 基础语法",{"path":671,"title":672,"description":11},"\u002Ftutorials\u002Fcloud\u002Flinux\u002Flinux-file-directory","Linux - 文件与目录操作",{"path":674,"title":675,"description":11},"\u002Ftutorials\u002Fcloud\u002Flinux\u002Flinux-network","Linux - 网络配置",{"path":677,"title":678,"description":11},"\u002Ftutorials\u002Fcloud\u002Flinux\u002Flinux-package","Linux - 软件包管理",{"path":680,"title":681,"description":11},"\u002Ftutorials\u002Fcloud\u002Flinux\u002Flinux-process","Linux - 进程管理",{"path":683,"title":684,"description":11},"\u002Ftutorials\u002Fcloud\u002Flinux\u002Flinux-scripts","Linux - 常用脚本示例",{"path":686,"title":687,"description":11},"\u002Ftutorials\u002Fcloud\u002Flinux\u002Flinux-service","Linux - 服务管理",{"path":689,"title":690,"description":11},"\u002Ftutorials\u002Fcloud\u002Flinux\u002Flinux-user-permission","Linux - 用户与权限管理",{"path":692,"title":693,"description":11},"\u002Ftutorials\u002Fcloud\u002Fnginx\u002Fnginx-https","Nginx - HTTPS 配置",{"path":695,"title":696,"description":11},"\u002Ftutorials\u002Fcloud\u002Fnginx\u002Fnginx-install","Nginx - 安装与配置",{"path":698,"title":699,"description":11},"\u002Ftutorials\u002Fcloud\u002Fnginx\u002Fnginx-loadbalance","Nginx - 负载均衡",{"path":701,"title":702,"description":11},"\u002Ftutorials\u002Fcloud\u002Fnginx\u002Fnginx-optimization","Nginx - 性能优化",{"path":704,"title":705,"description":11},"\u002Ftutorials\u002Fcloud\u002Fnginx\u002Fnginx-proxy","Nginx - 反向代理",{"path":707,"title":708,"description":11},"\u002Ftutorials\u002Fcloud\u002Fnginx\u002Fnginx-static","Nginx - 静态资源服务",{"path":710,"title":711,"description":11},"\u002Ftutorials\u002Fcloud\u002Fnginx\u002Fnginx-vhost","Nginx - 虚拟主机配置",{"path":713,"title":714,"description":715},"\u002Ftutorials\u002Fdatabase\u002Fmysql\u002Fmysql-architecture","MySQL 高可用架构","主从复制、读写分离、分库分表。",{"path":717,"title":718,"description":719},"\u002Ftutorials\u002Fdatabase\u002Fmysql\u002Fmysql-index","MySQL 索引","索引是帮助 MySQL 高效获取数据的有序数据结构。",{"path":721,"title":722,"description":723},"\u002Ftutorials\u002Fdatabase\u002Fmysql\u002Fmysql-lock","MySQL 锁","锁用于解决并发访问时的数据一致性问题。",{"path":725,"title":726,"description":727},"\u002Ftutorials\u002Fdatabase\u002Fmysql\u002Fmysql-optimize","MySQL 性能优化","SQL 优化是后端开发必备技能。",{"path":729,"title":730,"description":731},"\u002Ftutorials\u002Fdatabase\u002Fmysql\u002Fmysql-transaction","MySQL 事务","事务是一组不可分割的操作，要么全部成功，要么全部失败。",{"path":733,"title":734,"description":735},"\u002Ftutorials\u002Fdatabase\u002Fmysql\u002Fsql-advanced","SQL 进阶","多表查询、子查询、函数、视图、存储过程。",{"path":737,"title":738,"description":739},"\u002Ftutorials\u002Fdatabase\u002Fmysql\u002Fsql-basic","SQL 基础","SQL（Structured Query Language）是操作关系型数据库的标准语言。",{"path":741,"title":742,"description":743},"\u002Ftutorials\u002Fdatabase\u002Fredis\u002Fredis-advanced","Redis 进阶功能","事务、发布订阅、Lua 脚本、Pipeline。",{"path":745,"title":746,"description":747},"\u002Ftutorials\u002Fdatabase\u002Fredis\u002Fredis-basic","Redis 基础","Redis 安装配置与基本命令。",{"path":749,"title":750,"description":751},"\u002Ftutorials\u002Fdatabase\u002Fredis\u002Fredis-cluster","Redis 高可用","主从复制、哨兵、Cluster 集群。",{"path":753,"title":754,"description":755},"\u002Ftutorials\u002Fdatabase\u002Fredis\u002Fredis-datatype","Redis 数据类型","Redis 5 种基本数据类型 + 4 种特殊类型。",{"path":757,"title":758,"description":759},"\u002Ftutorials\u002Fdatabase\u002Fredis\u002Fredis-optimize","Redis 性能优化","内存优化、缓存问题、最佳实践。",{"path":761,"title":762,"description":763},"\u002Ftutorials\u002Fdatabase\u002Fredis\u002Fredis-persistence","Redis 持久化","Redis 提供 RDB 和 AOF 两种持久化方式。",{"path":765,"title":766,"description":767},"\u002Ftutorials\u002Fdatabase\u002Fredis\u002Fredis-principle","Redis 底层原理","数据结构、线程模型、网络模型。",{"path":769,"title":770,"description":771},"\u002Ftutorials\u002Fdev-idea\u002Fdesign-patterns\u002Fbehaiver-patterns\u002Fobserver-pattern","观察者模式","观察者模式属于行为型模式，定义了对象之间的一对多的依赖关系，在这种模式中，当一个对象的状态发生变化时，所有依赖于它的对象都会得到通知，并且执行相关操作。观察者模式又被成为“发布—订阅模式”，即发布者发生改变后，会通知所有订阅者。",{"path":773,"title":774,"description":11},"\u002Ftutorials\u002Fdev-idea\u002Fdesign-patterns\u002Fcreate-patterns\u002Ffactory-pattern","工厂模式",{"path":776,"title":777,"description":778},"\u002Ftutorials\u002Fdev-idea\u002Fdesign-patterns\u002Fcreate-patterns\u002Fsingleton-pattern","单例模式","单例模式是最常用的设计模式之一，他可以保证在整个应用中，某个类只存在一个实例化对象，即全局使用到该类的只有一个对象，这种模式在需要限制某些类的实例数量时非常有用，通常全局只需要一个该对象即可，如一些配置文件映射对象、数据库连接对象等。",{"path":780,"title":781,"description":782},"\u002Ftutorials\u002Fdev-idea\u002Fdesign-patterns\u002Fstructural-patterns\u002Fadapter-pattern","适配器模式","适配器模式是一种结构型模式，可以将一个类的接口转换成客户端所期望的另一种接口，适配器模式可以帮助开发人员在不修改现有代码的情况下，将不兼容的类组合在一起。",{"path":784,"title":785,"description":786},"\u002Ftutorials\u002Fdev-tools\u002Fgit\u002Fgit-basic-operations","Git 创建版本库","在 Git 上创建版本库有两种方式，一种是直接拷贝远程 Git 仓库到本地，另外一种是我们自己创建本地的版本库。",{"path":788,"title":789,"description":11},"\u002Ftutorials\u002Fdev-tools\u002Fgit\u002Fgit-branch-manage","Git 分支管理",{"path":791,"title":792,"description":11},"\u002Ftutorials\u002Fdev-tools\u002Fgit\u002Fgit-content-operations","Git 仓库内容操作",{"path":794,"title":795,"description":11},"\u002Ftutorials\u002Fdev-tools\u002Fgit\u002Fgit-introduce-install","Git 介绍和安装",{"path":797,"title":798,"description":11},"\u002Ftutorials\u002Fdev-tools\u002Fgit\u002Fgit-remote-manage","Git 远程管理",{"path":800,"title":801,"description":11},"\u002Ftutorials\u002Fdev-tools\u002Fgit\u002Fgit-workspace-index-repo","Git 工作原理",{"path":803,"title":804,"description":11},"\u002Ftutorials\u002Fdev-tools\u002Fhomebrew","HomeBrew 教程",{"path":806,"title":807,"description":11},"\u002Ftutorials\u002Fdev-tools\u002Fidea\u002Fshortcuts","快捷键",{"path":809,"title":810,"description":11},"\u002Ftutorials\u002Fdev-tools\u002Fmaven\u002Fintroduce-install-config","Maven - 介绍、安装、配置",{"path":812,"title":813,"description":11},"\u002Ftutorials\u002Ffront-end\u002Fvue3\u002Fbasic-knowledge","2. 基础知识",{"path":815,"title":816,"description":817},"\u002Ftutorials\u002Ffront-end\u002Fvue3\u002Fcomponent-communication","9. 组件通信","在前面的章节内，介绍了 Vue 中最核心的内容——组件的介绍和使用，和 Java 等编程语言相反，组件并不近似于这些变成语言中的类，类可以通过类或者其实例化的对象来相互交互，但 Vue 组件之间的作用域是相互独立的，这就意味着不同组件之间的数据无法相互引用。",{"path":819,"title":820,"description":821},"\u002Ftutorials\u002Ffront-end\u002Fvue3\u002Fcomputed","4. 计算属性","虽然直接在模板中使用表达式方便，但是如果在模板中添加很多逻辑，会让模板变的臃肿且难维护，耦合度较高。有没有一种简单的方式来实现呢？答案是有的。",{"path":823,"title":824,"description":11},"\u002Ftutorials\u002Ffront-end\u002Fvue3\u002Fcreate-vue-project","1. 环境搭建及安装",{"path":826,"title":827,"description":828},"\u002Ftutorials\u002Ffront-end\u002Fvue3\u002Flife-cycle","6. 生命周期","生命周期是指组件从创建、挂载、更新到销毁的整个过程中所经历的一系列阶段。在 Vue 中，每个组件都有自己的生命周期，可以通过生命周期钩子函数来监听和处理组件在不同阶段的行为和状态。",{"path":830,"title":831,"description":11},"\u002Ftutorials\u002Ffront-end\u002Fvue3\u002Fother-api","10. 其他 API",{"path":833,"title":834,"description":11},"\u002Ftutorials\u002Ffront-end\u002Fvue3\u002Fpinia","8. Pinia",{"path":836,"title":837,"description":11},"\u002Ftutorials\u002Ffront-end\u002Fvue3\u002Frouter","7. 路由",{"path":839,"title":840,"description":11},"\u002Ftutorials\u002Ffront-end\u002Fvue3\u002Ftemplate-grammar","3. 指令及模板语法",{"path":842,"title":843,"description":11},"\u002Ftutorials\u002Ffront-end\u002Fvue3\u002Fvue3-new-component","11. Vue3 新组件",{"path":845,"title":846,"description":847},"\u002Ftutorials\u002Ffront-end\u002Fvue3\u002Fwatch","5. 监视","Watch 是 Vue 提供的一个用于监视响应式数据变化并执行相应操作的 API，能够对响应式数据的变化做出一些操作的功能。Vue3 中的 Watch 支持多种用法，包括监视响应式对象、ref 对象、数组、函数等。",{"path":849,"title":850,"description":11},"\u002Ftutorials\u002Fmq\u002Fkafka\u002Fkafka-introduction","Kafka 简介与安装",{"path":852,"title":853,"description":11},"\u002Ftutorials\u002Fmq\u002Fkafka\u002Fkafka-producer-consumer","Kafka 生产者与消费者",{"path":855,"title":856,"description":857},"\u002Ftutorials\u002Fmq\u002Fkafka\u002Fkafka-springboot","Spring Boot 整合 Kafka","Spring Kafka 提供了对 Apache Kafka 的便捷集成。",{"path":859,"title":860,"description":861},"\u002Ftutorials\u002Fmq\u002Frabbitmq\u002Frabbitmq-exchange","RabbitMQ Exchange 详解","Exchange（交换机）是 RabbitMQ 的核心组件，负责接收生产者发送的消息，并根据规则将消息路由到一个或多个队列。",{"path":863,"title":864,"description":11},"\u002Ftutorials\u002Fmq\u002Frabbitmq\u002Frabbitmq-introduction","RabbitMQ 简介与安装",{"path":866,"title":867,"description":868},"\u002Ftutorials\u002Fmq\u002Frabbitmq\u002Frabbitmq-reliability","RabbitMQ 消息可靠性","消息可靠性是消息队列的核心要求，RabbitMQ 提供了多种机制来保证消息不丢失。",{"path":870,"title":871,"description":872},"\u002Ftutorials\u002Fmq\u002Frabbitmq\u002Frabbitmq-springboot","Spring Boot 整合 RabbitMQ","Spring AMQP 提供了对 RabbitMQ 的便捷集成，大大简化了开发工作。",{"path":874,"title":875,"description":11},"\u002Ftutorials\u002Fmq\u002Frocketmq\u002Frocketmq-client","RocketMQ 客户端使用",{"path":877,"title":878,"description":11},"\u002Ftutorials\u002Fmq\u002Frocketmq\u002Frocketmq-concepts","RocketMQ 核心概念",{"path":880,"title":881,"description":11},"\u002Ftutorials\u002Fmq\u002Frocketmq\u002Frocketmq-installation","RocketMQ 安装部署",{"path":883,"title":884,"description":885},"\u002Ftutorials\u002Fmq\u002Frocketmq\u002Frocketmq-message-type","RocketMQ 消息类型","RocketMQ 支持多种消息类型，满足不同业务场景需求。",{"id":887,"title":358,"body":888,"description":11,"extension":3799,"meta":3800,"navigation":1079,"path":357,"seo":3801,"stem":3802,"__hash__":3803},"docs\u002Fother\u002Fjava\u002Fcollection\u002Flist-arraylist.md",{"type":889,"value":890,"toc":3786},"minimark",[891,898,902,905,908,912,915,972,979,982,1011,1014,1018,1124,1127,1130,1133,1638,1643,1646,1649,1710,1715,2650,2653,2656,2750,2753,2756,2882,2885,2888,2896,3340,3343,3346,3352,3367,3372,3782],[892,893,894],"p",{},[895,896],"img",{"alt":11,"src":897},"\u002Fassets\u002Fjava\u002Fcore\u002Flist-arraylist\u002F2024-03-20-12-47-16.png",[899,900,901],"h2",{"id":901},"介绍",[892,903,904],{},"ArrayList 是 List 接口基于数组的一个实现类，故其是一个顺序集合，放入元素的顺序和实际存储的顺序是相同的，并且可以动态修改，与普通数组的区别就是它是没有固定大小的限制，我们可以添加或删除元素。",[892,906,907],{},"ArrayList 继承了 AbstractList ，并实现了 List 接口。",[899,909,911],{"id":910},"常用api","常用API",[892,913,914],{},"ArrayList 位于 java.util 包下，语法格式如下：",[916,917,921],"pre",{"className":918,"code":919,"language":920,"meta":11,"style":11},"language-java shiki shiki-themes github-light github-light github-dark","ArrayList\u003CE> list = new ArrayList\u003C>();\n\u002F\u002F 由于 ArrayList 是 List 接口的实现类，故常常这样使用\nList\u003CE> list = new ArrayList\u003C>();\n","java",[922,923,924,949,956],"code",{"__ignoreMap":11},[925,926,929,933,937,940,943,946],"span",{"class":927,"line":928},"line",1,[925,930,932],{"class":931},"sxrX7","ArrayList\u003C",[925,934,936],{"class":935},"s8jYJ","E",[925,938,939],{"class":931},"> list ",[925,941,942],{"class":935},"=",[925,944,945],{"class":935}," new",[925,947,948],{"class":931}," ArrayList\u003C>();\n",[925,950,952],{"class":927,"line":951},2,[925,953,955],{"class":954},"sCsY4","\u002F\u002F 由于 ArrayList 是 List 接口的实现类，故常常这样使用\n",[925,957,959,962,964,966,968,970],{"class":927,"line":958},3,[925,960,961],{"class":931},"List\u003C",[925,963,936],{"class":935},[925,965,939],{"class":931},[925,967,942],{"class":935},[925,969,945],{"class":935},[925,971,948],{"class":931},[973,974,975],"ul",{},[976,977,978],"li",{},"E : 代表想要存进 ArrayList 中的数据类型，只能是引用类型，想存基本数据类型时，使用其包装类即可。",[892,980,981],{},"由于无法对 ArrayList 中的底层数组进行操作，想要操作时只能通过引用去调用对应的方法进行操作。常见的方法有：",[973,983,984,987,990,993,996,999,1002,1005,1008],{},[976,985,986],{},"add()：增加一个元素",[976,988,989],{},"addAll()：增加多个元素",[976,991,992],{},"set()：修改元素",[976,994,995],{},"remove()：删除一个元素",[976,997,998],{},"get()：获取指定位置的元素",[976,1000,1001],{},"toArray()：获取一个转换数组",[976,1003,1004],{},"sort()：排序",[976,1006,1007],{},"size()：计算大小",[976,1009,1010],{},"isEmpty()：判断是否为空",[899,1012,1013],{"id":1013},"实现方式",[1015,1016,1017],"h3",{"id":1017},"底层存储",[916,1019,1021],{"className":918,"code":1020,"language":920,"meta":11,"style":11},"\u002F**\n * The array buffer into which the elements of the ArrayList are stored.\n * The capacity of the ArrayList is the length of this array buffer. Any\n * empty ArrayList with elementData == DEFAULTCAPACITY_EMPTY_ELEMENTDATA\n * will be expanded to DEFAULT_CAPACITY when the first element is added.\n *\u002F\n\u002F\u002F non-private to simplify nested class access\ntransient Object[] elementData; \n\n\u002F**\n * The size of the ArrayList (the number of elements it contains).\n *\n * @serial\n *\u002F\nprivate int size;\n",[922,1022,1023,1028,1033,1038,1044,1050,1056,1062,1074,1081,1086,1092,1098,1107,1112],{"__ignoreMap":11},[925,1024,1025],{"class":927,"line":928},[925,1026,1027],{"class":954},"\u002F**\n",[925,1029,1030],{"class":927,"line":951},[925,1031,1032],{"class":954}," * The array buffer into which the elements of the ArrayList are stored.\n",[925,1034,1035],{"class":927,"line":958},[925,1036,1037],{"class":954}," * The capacity of the ArrayList is the length of this array buffer. Any\n",[925,1039,1041],{"class":927,"line":1040},4,[925,1042,1043],{"class":954}," * empty ArrayList with elementData == DEFAULTCAPACITY_EMPTY_ELEMENTDATA\n",[925,1045,1047],{"class":927,"line":1046},5,[925,1048,1049],{"class":954}," * will be expanded to DEFAULT_CAPACITY when the first element is added.\n",[925,1051,1053],{"class":927,"line":1052},6,[925,1054,1055],{"class":954}," *\u002F\n",[925,1057,1059],{"class":927,"line":1058},7,[925,1060,1061],{"class":954},"\u002F\u002F non-private to simplify nested class access\n",[925,1063,1065,1068,1071],{"class":927,"line":1064},8,[925,1066,1067],{"class":935},"transient",[925,1069,1070],{"class":935}," Object",[925,1072,1073],{"class":931},"[] elementData; \n",[925,1075,1077],{"class":927,"line":1076},9,[925,1078,1080],{"emptyLinePlaceholder":1079},true,"\n",[925,1082,1084],{"class":927,"line":1083},10,[925,1085,1027],{"class":954},[925,1087,1089],{"class":927,"line":1088},11,[925,1090,1091],{"class":954}," * The size of the ArrayList (the number of elements it contains).\n",[925,1093,1095],{"class":927,"line":1094},12,[925,1096,1097],{"class":954}," *\n",[925,1099,1101,1104],{"class":927,"line":1100},13,[925,1102,1103],{"class":954}," * ",[925,1105,1106],{"class":935},"@serial\n",[925,1108,1110],{"class":927,"line":1109},14,[925,1111,1055],{"class":954},[925,1113,1115,1118,1121],{"class":927,"line":1114},15,[925,1116,1117],{"class":935},"private",[925,1119,1120],{"class":935}," int",[925,1122,1123],{"class":931}," size;\n",[892,1125,1126],{},"由 ArrayList 的源码不难看出，其底层本质上还是一个数组，只不过提供了一些封装了各种操作该数组的方法，并且维护好了各项数据。",[1015,1128,1129],{"id":1129},"构造方法",[892,1131,1132],{},"ArrayList 集合提供了三个构造方法：分别是 无参构造法、指定容量的构造法、指定内容的构造法。",[916,1134,1136],{"className":918,"code":1135,"language":920,"meta":11,"style":11},"\u002F**\n * Default initial capacity.\n *\u002F\nprivate static final int DEFAULT_CAPACITY = 10;\n\n\u002F**\n * Constructs an empty list with the specified initial capacity.\n *\n * @param  initialCapacity  the initial capacity of the list\n * @throws IllegalArgumentException if the specified initial capacity\n *         is negative\n *\u002F\npublic ArrayList(int initialCapacity) {\n    if (initialCapacity > 0) {\n        this.elementData = new Object[initialCapacity];\n    } else if (initialCapacity == 0) {\n        this.elementData = EMPTY_ELEMENTDATA;\n    } else {\n        throw new IllegalArgumentException(\"Illegal Capacity: \"+\n                                            initialCapacity);\n    }\n}\n\n\u002F**\n * Constructs an empty list with an initial capacity of ten.\n *\u002F\npublic ArrayList() {\n    this.elementData = DEFAULTCAPACITY_EMPTY_ELEMENTDATA;\n}\n\n\u002F**\n * Constructs a list containing the elements of the specified\n * collection, in the order they are returned by the collection's\n * iterator.\n *\n * @param c the collection whose elements are to be placed into this list\n * @throws NullPointerException if the specified collection is null\n *\u002F\npublic ArrayList(Collection\u003C? extends E> c) {\n    Object[] a = c.toArray();\n    if ((size = a.length) != 0) {\n        if (c.getClass() == ArrayList.class) {\n            elementData = a;\n        } else {\n            elementData = Arrays.copyOf(a, size, Object[].class);\n        }\n    } else {\n        \u002F\u002F replace with empty array.\n        elementData = EMPTY_ELEMENTDATA;\n    }\n}\n",[922,1137,1138,1142,1147,1151,1175,1179,1183,1188,1192,1206,1220,1225,1229,1246,1263,1280,1301,1313,1323,1342,1348,1354,1360,1365,1370,1376,1381,1391,1404,1409,1414,1419,1425,1431,1437,1442,1455,1468,1473,1494,1514,1534,1554,1565,1575,1597,1603,1612,1618,1628,1633],{"__ignoreMap":11},[925,1139,1140],{"class":927,"line":928},[925,1141,1027],{"class":954},[925,1143,1144],{"class":927,"line":951},[925,1145,1146],{"class":954}," * Default initial capacity.\n",[925,1148,1149],{"class":927,"line":958},[925,1150,1055],{"class":954},[925,1152,1153,1155,1158,1161,1163,1166,1168,1172],{"class":927,"line":1040},[925,1154,1117],{"class":935},[925,1156,1157],{"class":935}," static",[925,1159,1160],{"class":935}," final",[925,1162,1120],{"class":935},[925,1164,1165],{"class":931}," DEFAULT_CAPACITY ",[925,1167,942],{"class":935},[925,1169,1171],{"class":1170},"sBjJW"," 10",[925,1173,1174],{"class":931},";\n",[925,1176,1177],{"class":927,"line":1046},[925,1178,1080],{"emptyLinePlaceholder":1079},[925,1180,1181],{"class":927,"line":1052},[925,1182,1027],{"class":954},[925,1184,1185],{"class":927,"line":1058},[925,1186,1187],{"class":954}," * Constructs an empty list with the specified initial capacity.\n",[925,1189,1190],{"class":927,"line":1064},[925,1191,1097],{"class":954},[925,1193,1194,1196,1199,1203],{"class":927,"line":1076},[925,1195,1103],{"class":954},[925,1197,1198],{"class":935},"@param",[925,1200,1202],{"class":1201},"sP4rz","  initialCapacity",[925,1204,1205],{"class":954},"  the initial capacity of the list\n",[925,1207,1208,1210,1213,1217],{"class":927,"line":1083},[925,1209,1103],{"class":954},[925,1211,1212],{"class":935},"@throws",[925,1214,1216],{"class":1215},"snPdu"," IllegalArgumentException",[925,1218,1219],{"class":954}," if the specified initial capacity\n",[925,1221,1222],{"class":927,"line":1088},[925,1223,1224],{"class":954}," *         is negative\n",[925,1226,1227],{"class":927,"line":1094},[925,1228,1055],{"class":954},[925,1230,1231,1234,1237,1240,1243],{"class":927,"line":1100},[925,1232,1233],{"class":935},"public",[925,1235,1236],{"class":1215}," ArrayList",[925,1238,1239],{"class":931},"(",[925,1241,1242],{"class":935},"int",[925,1244,1245],{"class":931}," initialCapacity) {\n",[925,1247,1248,1251,1254,1257,1260],{"class":927,"line":1109},[925,1249,1250],{"class":935},"    if",[925,1252,1253],{"class":931}," (initialCapacity ",[925,1255,1256],{"class":935},">",[925,1258,1259],{"class":1170}," 0",[925,1261,1262],{"class":931},") {\n",[925,1264,1265,1268,1271,1273,1275,1277],{"class":927,"line":1114},[925,1266,1267],{"class":1170},"        this",[925,1269,1270],{"class":931},".elementData ",[925,1272,942],{"class":935},[925,1274,945],{"class":935},[925,1276,1070],{"class":935},[925,1278,1279],{"class":931},"[initialCapacity];\n",[925,1281,1283,1286,1289,1292,1294,1297,1299],{"class":927,"line":1282},16,[925,1284,1285],{"class":931},"    } ",[925,1287,1288],{"class":935},"else",[925,1290,1291],{"class":935}," if",[925,1293,1253],{"class":931},[925,1295,1296],{"class":935},"==",[925,1298,1259],{"class":1170},[925,1300,1262],{"class":931},[925,1302,1304,1306,1308,1310],{"class":927,"line":1303},17,[925,1305,1267],{"class":1170},[925,1307,1270],{"class":931},[925,1309,942],{"class":935},[925,1311,1312],{"class":931}," EMPTY_ELEMENTDATA;\n",[925,1314,1316,1318,1320],{"class":927,"line":1315},18,[925,1317,1285],{"class":931},[925,1319,1288],{"class":935},[925,1321,1322],{"class":931}," {\n",[925,1324,1326,1329,1331,1333,1335,1339],{"class":927,"line":1325},19,[925,1327,1328],{"class":935},"        throw",[925,1330,945],{"class":935},[925,1332,1216],{"class":1215},[925,1334,1239],{"class":931},[925,1336,1338],{"class":1337},"sIIMD","\"Illegal Capacity: \"",[925,1340,1341],{"class":935},"+\n",[925,1343,1345],{"class":927,"line":1344},20,[925,1346,1347],{"class":931},"                                            initialCapacity);\n",[925,1349,1351],{"class":927,"line":1350},21,[925,1352,1353],{"class":931},"    }\n",[925,1355,1357],{"class":927,"line":1356},22,[925,1358,1359],{"class":931},"}\n",[925,1361,1363],{"class":927,"line":1362},23,[925,1364,1080],{"emptyLinePlaceholder":1079},[925,1366,1368],{"class":927,"line":1367},24,[925,1369,1027],{"class":954},[925,1371,1373],{"class":927,"line":1372},25,[925,1374,1375],{"class":954}," * Constructs an empty list with an initial capacity of ten.\n",[925,1377,1379],{"class":927,"line":1378},26,[925,1380,1055],{"class":954},[925,1382,1384,1386,1388],{"class":927,"line":1383},27,[925,1385,1233],{"class":935},[925,1387,1236],{"class":1215},[925,1389,1390],{"class":931},"() {\n",[925,1392,1394,1397,1399,1401],{"class":927,"line":1393},28,[925,1395,1396],{"class":1170},"    this",[925,1398,1270],{"class":931},[925,1400,942],{"class":935},[925,1402,1403],{"class":931}," DEFAULTCAPACITY_EMPTY_ELEMENTDATA;\n",[925,1405,1407],{"class":927,"line":1406},29,[925,1408,1359],{"class":931},[925,1410,1412],{"class":927,"line":1411},30,[925,1413,1080],{"emptyLinePlaceholder":1079},[925,1415,1417],{"class":927,"line":1416},31,[925,1418,1027],{"class":954},[925,1420,1422],{"class":927,"line":1421},32,[925,1423,1424],{"class":954}," * Constructs a list containing the elements of the specified\n",[925,1426,1428],{"class":927,"line":1427},33,[925,1429,1430],{"class":954}," * collection, in the order they are returned by the collection's\n",[925,1432,1434],{"class":927,"line":1433},34,[925,1435,1436],{"class":954}," * iterator.\n",[925,1438,1440],{"class":927,"line":1439},35,[925,1441,1097],{"class":954},[925,1443,1445,1447,1449,1452],{"class":927,"line":1444},36,[925,1446,1103],{"class":954},[925,1448,1198],{"class":935},[925,1450,1451],{"class":1201}," c",[925,1453,1454],{"class":954}," the collection whose elements are to be placed into this list\n",[925,1456,1458,1460,1462,1465],{"class":927,"line":1457},37,[925,1459,1103],{"class":954},[925,1461,1212],{"class":935},[925,1463,1464],{"class":1215}," NullPointerException",[925,1466,1467],{"class":954}," if the specified collection is null\n",[925,1469,1471],{"class":927,"line":1470},38,[925,1472,1055],{"class":954},[925,1474,1476,1478,1480,1483,1486,1489,1491],{"class":927,"line":1475},39,[925,1477,1233],{"class":935},[925,1479,1236],{"class":1215},[925,1481,1482],{"class":931},"(Collection",[925,1484,1485],{"class":935},"\u003C?",[925,1487,1488],{"class":931}," extends E",[925,1490,1256],{"class":935},[925,1492,1493],{"class":931}," c) {\n",[925,1495,1497,1500,1503,1505,1508,1511],{"class":927,"line":1496},40,[925,1498,1499],{"class":935},"    Object",[925,1501,1502],{"class":931},"[] a ",[925,1504,942],{"class":935},[925,1506,1507],{"class":931}," c.",[925,1509,1510],{"class":1215},"toArray",[925,1512,1513],{"class":931},"();\n",[925,1515,1517,1519,1522,1524,1527,1530,1532],{"class":927,"line":1516},41,[925,1518,1250],{"class":935},[925,1520,1521],{"class":931}," ((size ",[925,1523,942],{"class":935},[925,1525,1526],{"class":931}," a.length) ",[925,1528,1529],{"class":935},"!=",[925,1531,1259],{"class":1170},[925,1533,1262],{"class":931},[925,1535,1537,1540,1543,1546,1549,1551],{"class":927,"line":1536},42,[925,1538,1539],{"class":935},"        if",[925,1541,1542],{"class":931}," (c.",[925,1544,1545],{"class":1215},"getClass",[925,1547,1548],{"class":931},"() ",[925,1550,1296],{"class":935},[925,1552,1553],{"class":931}," ArrayList.class) {\n",[925,1555,1557,1560,1562],{"class":927,"line":1556},43,[925,1558,1559],{"class":931},"            elementData ",[925,1561,942],{"class":935},[925,1563,1564],{"class":931}," a;\n",[925,1566,1568,1571,1573],{"class":927,"line":1567},44,[925,1569,1570],{"class":931},"        } ",[925,1572,1288],{"class":935},[925,1574,1322],{"class":931},[925,1576,1578,1580,1582,1585,1588,1591,1594],{"class":927,"line":1577},45,[925,1579,1559],{"class":931},[925,1581,942],{"class":935},[925,1583,1584],{"class":931}," Arrays.",[925,1586,1587],{"class":1215},"copyOf",[925,1589,1590],{"class":931},"(a, size, ",[925,1592,1593],{"class":935},"Object",[925,1595,1596],{"class":931},"[].class);\n",[925,1598,1600],{"class":927,"line":1599},46,[925,1601,1602],{"class":931},"        }\n",[925,1604,1606,1608,1610],{"class":927,"line":1605},47,[925,1607,1285],{"class":931},[925,1609,1288],{"class":935},[925,1611,1322],{"class":931},[925,1613,1615],{"class":927,"line":1614},48,[925,1616,1617],{"class":954},"        \u002F\u002F replace with empty array.\n",[925,1619,1621,1624,1626],{"class":927,"line":1620},49,[925,1622,1623],{"class":931},"        elementData ",[925,1625,942],{"class":935},[925,1627,1312],{"class":931},[925,1629,1631],{"class":927,"line":1630},50,[925,1632,1353],{"class":931},[925,1634,1636],{"class":927,"line":1635},51,[925,1637,1359],{"class":931},[1639,1640,1642],"note",{"title":1641},"默认容量","\n由该部分的源码可以看出，初始化时如果未指定容量，则默认的容量大小为10；\n",[1015,1644,1645],{"id":1645},"add方法",[892,1647,1648],{},"ArrayList 中提供了 4 个 add 方法，具体如下：",[1650,1651,1652,1666],"table",{},[1653,1654,1655],"thead",{},[1656,1657,1658,1663],"tr",{},[1659,1660,1662],"th",{"align":1661},"center","方法名",[1659,1664,1665],{"align":1661},"功能",[1667,1668,1669,1678,1686,1694,1702],"tbody",{},[1656,1670,1671,1675],{},[1672,1673,1674],"td",{"align":1661},"public boolean add(E e)",[1672,1676,1677],{"align":1661},"实现的 List 接口内的 add 方法，添加并判断是否添加成功",[1656,1679,1680,1683],{},[1672,1681,1682],{"align":1661},"public void add(E e)",[1672,1684,1685],{"align":1661},"添加元素 e 到列表的末尾",[1656,1687,1688,1691],{},[1672,1689,1690],{"align":1661},"public void add(int index, E element)",[1672,1692,1693],{"align":1661},"添加元素 element 到数组的 index 位置",[1656,1695,1696,1699],{},[1672,1697,1698],{"align":1661},"public boolean addAll(Collection\u003C? extends E> c)",[1672,1700,1701],{"align":1661},"将指定集合 c 中的元素依次添加到列表的末尾",[1656,1703,1704,1707],{},[1672,1705,1706],{"align":1661},"public boolean addAll(int index, Collection\u003C? extends E> c)",[1672,1708,1709],{"align":1661},"将指定集合 c 中的元素依次添加到列表的 index 位置",[892,1711,1712],{},[895,1713],{"alt":11,"src":1714},"\u002Fassets\u002Fjava\u002Fcore\u002Flist-arraylist\u002F2024-03-20-15-26-29.png",[916,1716,1718],{"className":918,"code":1717,"language":920,"meta":11,"style":11},"\u002F**\n * Appends the specified element to the end of this list.\n *\n * @param e element to be appended to this list\n * @return {@code true} (as specified by {@link Collection#add})\n *\u002F\npublic boolean add(E e) {\n    modCount++;\n    add(e, elementData, size);\n    return true;\n}\n\npublic void add(int index, E element) {\n    rangeCheckForAdd(index);\n    checkForComodification();\n    root.add(offset + index, element);\n    updateSizeAndModCount(1);\n}\n\npublic void add(E e) {\n    checkForComodification();\n\n    try {\n        int i = cursor;\n        ArrayList.this.add(i, e);\n        cursor = i + 1;\n        lastRet = -1;\n        expectedModCount = modCount;\n    } catch (IndexOutOfBoundsException ex) {\n        throw new ConcurrentModificationException();\n    }\n}\n\n\u002F**\n * Appends all of the elements in the specified collection to the end of\n * this list, in the order that they are returned by the\n * specified collection's Iterator.  The behavior of this operation is\n * undefined if the specified collection is modified while the operation\n * is in progress.  (This implies that the behavior of this call is\n * undefined if the specified collection is this list, and this\n * list is nonempty.)\n *\n * @param c collection containing elements to be added to this list\n * @return {@code true} if this list changed as a result of the call\n * @throws NullPointerException if the specified collection is null\n *\u002F\npublic boolean addAll(Collection\u003C? extends E> c) {\n    Object[] a = c.toArray();\n    modCount++;\n    int numNew = a.length;\n    if (numNew == 0)\n        return false;\n    Object[] elementData;\n    final int s;\n    if (numNew > (elementData = this.elementData).length - (s = size))\n        elementData = grow(s + numNew);\n    System.arraycopy(a, 0, elementData, s, numNew);\n    size = s + numNew;\n    return true;\n}\n\n\u002F**\n * Inserts all of the elements in the specified collection into this\n * list, starting at the specified position.  Shifts the element\n * currently at that position (if any) and any subsequent elements to\n * the right (increases their indices).  The new elements will appear\n * in the list in the order that they are returned by the\n * specified collection's iterator.\n *\n * @param index index at which to insert the first element from the\n *              specified collection\n * @param c collection containing elements to be added to this list\n * @return {@code true} if this list changed as a result of the call\n * @throws IndexOutOfBoundsException {@inheritDoc}\n * @throws NullPointerException if the specified collection is null\n *\u002F\npublic boolean addAll(int index, Collection\u003C? extends E> c) {\n    rangeCheckForAdd(index);\n\n    Object[] a = c.toArray();\n    modCount++;\n    int numNew = a.length;\n    if (numNew == 0)\n        return false;\n    Object[] elementData;\n    final int s;\n    if (numNew > (elementData = this.elementData).length - (s = size))\n        elementData = grow(s + numNew);\n\n    int numMoved = s - index;\n    if (numMoved > 0)\n        System.arraycopy(elementData, index,\n                            elementData, index + numNew,\n                            numMoved);\n    System.arraycopy(a, 0, elementData, index, numNew);\n    size = s + numNew;\n    return true;\n}\n",[922,1719,1720,1724,1729,1733,1745,1755,1759,1772,1782,1790,1800,1804,1808,1824,1832,1839,1856,1869,1873,1877,1887,1893,1897,1904,1917,1927,1943,1957,1967,1982,1993,1997,2001,2005,2009,2014,2019,2024,2029,2034,2039,2044,2048,2059,2068,2078,2082,2101,2115,2123,2136,2150,2161,2169,2180,2211,2229,2247,2263,2272,2277,2282,2287,2293,2299,2305,2311,2317,2323,2328,2341,2347,2358,2367,2380,2391,2396,2420,2427,2432,2447,2456,2467,2480,2489,2496,2505,2530,2545,2550,2567,2581,2592,2603,2609,2623,2636,2645],{"__ignoreMap":11},[925,1721,1722],{"class":927,"line":928},[925,1723,1027],{"class":954},[925,1725,1726],{"class":927,"line":951},[925,1727,1728],{"class":954}," * Appends the specified element to the end of this list.\n",[925,1730,1731],{"class":927,"line":958},[925,1732,1097],{"class":954},[925,1734,1735,1737,1739,1742],{"class":927,"line":1040},[925,1736,1103],{"class":954},[925,1738,1198],{"class":935},[925,1740,1741],{"class":1201}," e",[925,1743,1744],{"class":954}," element to be appended to this list\n",[925,1746,1747,1749,1752],{"class":927,"line":1046},[925,1748,1103],{"class":954},[925,1750,1751],{"class":935},"@return",[925,1753,1754],{"class":954}," {@code true} (as specified by {@link Collection#add})\n",[925,1756,1757],{"class":927,"line":1052},[925,1758,1055],{"class":954},[925,1760,1761,1763,1766,1769],{"class":927,"line":1058},[925,1762,1233],{"class":935},[925,1764,1765],{"class":935}," boolean",[925,1767,1768],{"class":1215}," add",[925,1770,1771],{"class":931},"(E e) {\n",[925,1773,1774,1777,1780],{"class":927,"line":1064},[925,1775,1776],{"class":931},"    modCount",[925,1778,1779],{"class":935},"++",[925,1781,1174],{"class":931},[925,1783,1784,1787],{"class":927,"line":1076},[925,1785,1786],{"class":1215},"    add",[925,1788,1789],{"class":931},"(e, elementData, size);\n",[925,1791,1792,1795,1798],{"class":927,"line":1083},[925,1793,1794],{"class":935},"    return",[925,1796,1797],{"class":1170}," true",[925,1799,1174],{"class":931},[925,1801,1802],{"class":927,"line":1088},[925,1803,1359],{"class":931},[925,1805,1806],{"class":927,"line":1094},[925,1807,1080],{"emptyLinePlaceholder":1079},[925,1809,1810,1812,1815,1817,1819,1821],{"class":927,"line":1100},[925,1811,1233],{"class":935},[925,1813,1814],{"class":935}," void",[925,1816,1768],{"class":1215},[925,1818,1239],{"class":931},[925,1820,1242],{"class":935},[925,1822,1823],{"class":931}," index, E element) {\n",[925,1825,1826,1829],{"class":927,"line":1109},[925,1827,1828],{"class":1215},"    rangeCheckForAdd",[925,1830,1831],{"class":931},"(index);\n",[925,1833,1834,1837],{"class":927,"line":1114},[925,1835,1836],{"class":1215},"    checkForComodification",[925,1838,1513],{"class":931},[925,1840,1841,1844,1847,1850,1853],{"class":927,"line":1282},[925,1842,1843],{"class":931},"    root.",[925,1845,1846],{"class":1215},"add",[925,1848,1849],{"class":931},"(offset ",[925,1851,1852],{"class":935},"+",[925,1854,1855],{"class":931}," index, element);\n",[925,1857,1858,1861,1863,1866],{"class":927,"line":1303},[925,1859,1860],{"class":1215},"    updateSizeAndModCount",[925,1862,1239],{"class":931},[925,1864,1865],{"class":1170},"1",[925,1867,1868],{"class":931},");\n",[925,1870,1871],{"class":927,"line":1315},[925,1872,1359],{"class":931},[925,1874,1875],{"class":927,"line":1325},[925,1876,1080],{"emptyLinePlaceholder":1079},[925,1878,1879,1881,1883,1885],{"class":927,"line":1344},[925,1880,1233],{"class":935},[925,1882,1814],{"class":935},[925,1884,1768],{"class":1215},[925,1886,1771],{"class":931},[925,1888,1889,1891],{"class":927,"line":1350},[925,1890,1836],{"class":1215},[925,1892,1513],{"class":931},[925,1894,1895],{"class":927,"line":1356},[925,1896,1080],{"emptyLinePlaceholder":1079},[925,1898,1899,1902],{"class":927,"line":1362},[925,1900,1901],{"class":935},"    try",[925,1903,1322],{"class":931},[925,1905,1906,1909,1912,1914],{"class":927,"line":1367},[925,1907,1908],{"class":935},"        int",[925,1910,1911],{"class":931}," i ",[925,1913,942],{"class":935},[925,1915,1916],{"class":931}," cursor;\n",[925,1918,1919,1922,1924],{"class":927,"line":1372},[925,1920,1921],{"class":931},"        ArrayList.this.",[925,1923,1846],{"class":1215},[925,1925,1926],{"class":931},"(i, e);\n",[925,1928,1929,1932,1934,1936,1938,1941],{"class":927,"line":1378},[925,1930,1931],{"class":931},"        cursor ",[925,1933,942],{"class":935},[925,1935,1911],{"class":931},[925,1937,1852],{"class":935},[925,1939,1940],{"class":1170}," 1",[925,1942,1174],{"class":931},[925,1944,1945,1948,1950,1953,1955],{"class":927,"line":1383},[925,1946,1947],{"class":931},"        lastRet ",[925,1949,942],{"class":935},[925,1951,1952],{"class":935}," -",[925,1954,1865],{"class":1170},[925,1956,1174],{"class":931},[925,1958,1959,1962,1964],{"class":927,"line":1393},[925,1960,1961],{"class":931},"        expectedModCount ",[925,1963,942],{"class":935},[925,1965,1966],{"class":931}," modCount;\n",[925,1968,1969,1971,1974,1977,1980],{"class":927,"line":1406},[925,1970,1285],{"class":931},[925,1972,1973],{"class":935},"catch",[925,1975,1976],{"class":931}," (IndexOutOfBoundsException ",[925,1978,1979],{"class":1201},"ex",[925,1981,1262],{"class":931},[925,1983,1984,1986,1988,1991],{"class":927,"line":1411},[925,1985,1328],{"class":935},[925,1987,945],{"class":935},[925,1989,1990],{"class":1215}," ConcurrentModificationException",[925,1992,1513],{"class":931},[925,1994,1995],{"class":927,"line":1416},[925,1996,1353],{"class":931},[925,1998,1999],{"class":927,"line":1421},[925,2000,1359],{"class":931},[925,2002,2003],{"class":927,"line":1427},[925,2004,1080],{"emptyLinePlaceholder":1079},[925,2006,2007],{"class":927,"line":1433},[925,2008,1027],{"class":954},[925,2010,2011],{"class":927,"line":1439},[925,2012,2013],{"class":954}," * Appends all of the elements in the specified collection to the end of\n",[925,2015,2016],{"class":927,"line":1444},[925,2017,2018],{"class":954}," * this list, in the order that they are returned by the\n",[925,2020,2021],{"class":927,"line":1457},[925,2022,2023],{"class":954}," * specified collection's Iterator.  The behavior of this operation is\n",[925,2025,2026],{"class":927,"line":1470},[925,2027,2028],{"class":954}," * undefined if the specified collection is modified while the operation\n",[925,2030,2031],{"class":927,"line":1475},[925,2032,2033],{"class":954}," * is in progress.  (This implies that the behavior of this call is\n",[925,2035,2036],{"class":927,"line":1496},[925,2037,2038],{"class":954}," * undefined if the specified collection is this list, and this\n",[925,2040,2041],{"class":927,"line":1516},[925,2042,2043],{"class":954}," * list is nonempty.)\n",[925,2045,2046],{"class":927,"line":1536},[925,2047,1097],{"class":954},[925,2049,2050,2052,2054,2056],{"class":927,"line":1556},[925,2051,1103],{"class":954},[925,2053,1198],{"class":935},[925,2055,1451],{"class":1201},[925,2057,2058],{"class":954}," collection containing elements to be added to this list\n",[925,2060,2061,2063,2065],{"class":927,"line":1567},[925,2062,1103],{"class":954},[925,2064,1751],{"class":935},[925,2066,2067],{"class":954}," {@code true} if this list changed as a result of the call\n",[925,2069,2070,2072,2074,2076],{"class":927,"line":1577},[925,2071,1103],{"class":954},[925,2073,1212],{"class":935},[925,2075,1464],{"class":1215},[925,2077,1467],{"class":954},[925,2079,2080],{"class":927,"line":1599},[925,2081,1055],{"class":954},[925,2083,2084,2086,2088,2091,2093,2095,2097,2099],{"class":927,"line":1605},[925,2085,1233],{"class":935},[925,2087,1765],{"class":935},[925,2089,2090],{"class":1215}," addAll",[925,2092,1482],{"class":931},[925,2094,1485],{"class":935},[925,2096,1488],{"class":931},[925,2098,1256],{"class":935},[925,2100,1493],{"class":931},[925,2102,2103,2105,2107,2109,2111,2113],{"class":927,"line":1614},[925,2104,1499],{"class":935},[925,2106,1502],{"class":931},[925,2108,942],{"class":935},[925,2110,1507],{"class":931},[925,2112,1510],{"class":1215},[925,2114,1513],{"class":931},[925,2116,2117,2119,2121],{"class":927,"line":1620},[925,2118,1776],{"class":931},[925,2120,1779],{"class":935},[925,2122,1174],{"class":931},[925,2124,2125,2128,2131,2133],{"class":927,"line":1630},[925,2126,2127],{"class":935},"    int",[925,2129,2130],{"class":931}," numNew ",[925,2132,942],{"class":935},[925,2134,2135],{"class":931}," a.length;\n",[925,2137,2138,2140,2143,2145,2147],{"class":927,"line":1635},[925,2139,1250],{"class":935},[925,2141,2142],{"class":931}," (numNew ",[925,2144,1296],{"class":935},[925,2146,1259],{"class":1170},[925,2148,2149],{"class":931},")\n",[925,2151,2153,2156,2159],{"class":927,"line":2152},52,[925,2154,2155],{"class":935},"        return",[925,2157,2158],{"class":1170}," false",[925,2160,1174],{"class":931},[925,2162,2164,2166],{"class":927,"line":2163},53,[925,2165,1499],{"class":935},[925,2167,2168],{"class":931},"[] elementData;\n",[925,2170,2172,2175,2177],{"class":927,"line":2171},54,[925,2173,2174],{"class":935},"    final",[925,2176,1120],{"class":935},[925,2178,2179],{"class":931}," s;\n",[925,2181,2183,2185,2187,2189,2192,2194,2197,2200,2203,2206,2208],{"class":927,"line":2182},55,[925,2184,1250],{"class":935},[925,2186,2142],{"class":931},[925,2188,1256],{"class":935},[925,2190,2191],{"class":931}," (elementData ",[925,2193,942],{"class":935},[925,2195,2196],{"class":1170}," this",[925,2198,2199],{"class":931},".elementData).length ",[925,2201,2202],{"class":935},"-",[925,2204,2205],{"class":931}," (s ",[925,2207,942],{"class":935},[925,2209,2210],{"class":931}," size))\n",[925,2212,2214,2216,2218,2221,2224,2226],{"class":927,"line":2213},56,[925,2215,1623],{"class":931},[925,2217,942],{"class":935},[925,2219,2220],{"class":1215}," grow",[925,2222,2223],{"class":931},"(s ",[925,2225,1852],{"class":935},[925,2227,2228],{"class":931}," numNew);\n",[925,2230,2232,2235,2238,2241,2244],{"class":927,"line":2231},57,[925,2233,2234],{"class":931},"    System.",[925,2236,2237],{"class":1215},"arraycopy",[925,2239,2240],{"class":931},"(a, ",[925,2242,2243],{"class":1170},"0",[925,2245,2246],{"class":931},", elementData, s, numNew);\n",[925,2248,2250,2253,2255,2258,2260],{"class":927,"line":2249},58,[925,2251,2252],{"class":931},"    size ",[925,2254,942],{"class":935},[925,2256,2257],{"class":931}," s ",[925,2259,1852],{"class":935},[925,2261,2262],{"class":931}," numNew;\n",[925,2264,2266,2268,2270],{"class":927,"line":2265},59,[925,2267,1794],{"class":935},[925,2269,1797],{"class":1170},[925,2271,1174],{"class":931},[925,2273,2275],{"class":927,"line":2274},60,[925,2276,1359],{"class":931},[925,2278,2280],{"class":927,"line":2279},61,[925,2281,1080],{"emptyLinePlaceholder":1079},[925,2283,2285],{"class":927,"line":2284},62,[925,2286,1027],{"class":954},[925,2288,2290],{"class":927,"line":2289},63,[925,2291,2292],{"class":954}," * Inserts all of the elements in the specified collection into this\n",[925,2294,2296],{"class":927,"line":2295},64,[925,2297,2298],{"class":954}," * list, starting at the specified position.  Shifts the element\n",[925,2300,2302],{"class":927,"line":2301},65,[925,2303,2304],{"class":954}," * currently at that position (if any) and any subsequent elements to\n",[925,2306,2308],{"class":927,"line":2307},66,[925,2309,2310],{"class":954}," * the right (increases their indices).  The new elements will appear\n",[925,2312,2314],{"class":927,"line":2313},67,[925,2315,2316],{"class":954}," * in the list in the order that they are returned by the\n",[925,2318,2320],{"class":927,"line":2319},68,[925,2321,2322],{"class":954}," * specified collection's iterator.\n",[925,2324,2326],{"class":927,"line":2325},69,[925,2327,1097],{"class":954},[925,2329,2331,2333,2335,2338],{"class":927,"line":2330},70,[925,2332,1103],{"class":954},[925,2334,1198],{"class":935},[925,2336,2337],{"class":1201}," index",[925,2339,2340],{"class":954}," index at which to insert the first element from the\n",[925,2342,2344],{"class":927,"line":2343},71,[925,2345,2346],{"class":954}," *              specified collection\n",[925,2348,2350,2352,2354,2356],{"class":927,"line":2349},72,[925,2351,1103],{"class":954},[925,2353,1198],{"class":935},[925,2355,1451],{"class":1201},[925,2357,2058],{"class":954},[925,2359,2361,2363,2365],{"class":927,"line":2360},73,[925,2362,1103],{"class":954},[925,2364,1751],{"class":935},[925,2366,2067],{"class":954},[925,2368,2370,2372,2374,2377],{"class":927,"line":2369},74,[925,2371,1103],{"class":954},[925,2373,1212],{"class":935},[925,2375,2376],{"class":1215}," IndexOutOfBoundsException",[925,2378,2379],{"class":954}," {@inheritDoc}\n",[925,2381,2383,2385,2387,2389],{"class":927,"line":2382},75,[925,2384,1103],{"class":954},[925,2386,1212],{"class":935},[925,2388,1464],{"class":1215},[925,2390,1467],{"class":954},[925,2392,2394],{"class":927,"line":2393},76,[925,2395,1055],{"class":954},[925,2397,2399,2401,2403,2405,2407,2409,2412,2414,2416,2418],{"class":927,"line":2398},77,[925,2400,1233],{"class":935},[925,2402,1765],{"class":935},[925,2404,2090],{"class":1215},[925,2406,1239],{"class":931},[925,2408,1242],{"class":935},[925,2410,2411],{"class":931}," index, Collection",[925,2413,1485],{"class":935},[925,2415,1488],{"class":931},[925,2417,1256],{"class":935},[925,2419,1493],{"class":931},[925,2421,2423,2425],{"class":927,"line":2422},78,[925,2424,1828],{"class":1215},[925,2426,1831],{"class":931},[925,2428,2430],{"class":927,"line":2429},79,[925,2431,1080],{"emptyLinePlaceholder":1079},[925,2433,2435,2437,2439,2441,2443,2445],{"class":927,"line":2434},80,[925,2436,1499],{"class":935},[925,2438,1502],{"class":931},[925,2440,942],{"class":935},[925,2442,1507],{"class":931},[925,2444,1510],{"class":1215},[925,2446,1513],{"class":931},[925,2448,2450,2452,2454],{"class":927,"line":2449},81,[925,2451,1776],{"class":931},[925,2453,1779],{"class":935},[925,2455,1174],{"class":931},[925,2457,2459,2461,2463,2465],{"class":927,"line":2458},82,[925,2460,2127],{"class":935},[925,2462,2130],{"class":931},[925,2464,942],{"class":935},[925,2466,2135],{"class":931},[925,2468,2470,2472,2474,2476,2478],{"class":927,"line":2469},83,[925,2471,1250],{"class":935},[925,2473,2142],{"class":931},[925,2475,1296],{"class":935},[925,2477,1259],{"class":1170},[925,2479,2149],{"class":931},[925,2481,2483,2485,2487],{"class":927,"line":2482},84,[925,2484,2155],{"class":935},[925,2486,2158],{"class":1170},[925,2488,1174],{"class":931},[925,2490,2492,2494],{"class":927,"line":2491},85,[925,2493,1499],{"class":935},[925,2495,2168],{"class":931},[925,2497,2499,2501,2503],{"class":927,"line":2498},86,[925,2500,2174],{"class":935},[925,2502,1120],{"class":935},[925,2504,2179],{"class":931},[925,2506,2508,2510,2512,2514,2516,2518,2520,2522,2524,2526,2528],{"class":927,"line":2507},87,[925,2509,1250],{"class":935},[925,2511,2142],{"class":931},[925,2513,1256],{"class":935},[925,2515,2191],{"class":931},[925,2517,942],{"class":935},[925,2519,2196],{"class":1170},[925,2521,2199],{"class":931},[925,2523,2202],{"class":935},[925,2525,2205],{"class":931},[925,2527,942],{"class":935},[925,2529,2210],{"class":931},[925,2531,2533,2535,2537,2539,2541,2543],{"class":927,"line":2532},88,[925,2534,1623],{"class":931},[925,2536,942],{"class":935},[925,2538,2220],{"class":1215},[925,2540,2223],{"class":931},[925,2542,1852],{"class":935},[925,2544,2228],{"class":931},[925,2546,2548],{"class":927,"line":2547},89,[925,2549,1080],{"emptyLinePlaceholder":1079},[925,2551,2553,2555,2558,2560,2562,2564],{"class":927,"line":2552},90,[925,2554,2127],{"class":935},[925,2556,2557],{"class":931}," numMoved ",[925,2559,942],{"class":935},[925,2561,2257],{"class":931},[925,2563,2202],{"class":935},[925,2565,2566],{"class":931}," index;\n",[925,2568,2570,2572,2575,2577,2579],{"class":927,"line":2569},91,[925,2571,1250],{"class":935},[925,2573,2574],{"class":931}," (numMoved ",[925,2576,1256],{"class":935},[925,2578,1259],{"class":1170},[925,2580,2149],{"class":931},[925,2582,2584,2587,2589],{"class":927,"line":2583},92,[925,2585,2586],{"class":931},"        System.",[925,2588,2237],{"class":1215},[925,2590,2591],{"class":931},"(elementData, index,\n",[925,2593,2595,2598,2600],{"class":927,"line":2594},93,[925,2596,2597],{"class":931},"                            elementData, index ",[925,2599,1852],{"class":935},[925,2601,2602],{"class":931}," numNew,\n",[925,2604,2606],{"class":927,"line":2605},94,[925,2607,2608],{"class":931},"                            numMoved);\n",[925,2610,2612,2614,2616,2618,2620],{"class":927,"line":2611},95,[925,2613,2234],{"class":931},[925,2615,2237],{"class":1215},[925,2617,2240],{"class":931},[925,2619,2243],{"class":1170},[925,2621,2622],{"class":931},", elementData, index, numNew);\n",[925,2624,2626,2628,2630,2632,2634],{"class":927,"line":2625},96,[925,2627,2252],{"class":931},[925,2629,942],{"class":935},[925,2631,2257],{"class":931},[925,2633,1852],{"class":935},[925,2635,2262],{"class":931},[925,2637,2639,2641,2643],{"class":927,"line":2638},97,[925,2640,1794],{"class":935},[925,2642,1797],{"class":1170},[925,2644,1174],{"class":931},[925,2646,2648],{"class":927,"line":2647},98,[925,2649,1359],{"class":931},[1015,2651,2652],{"id":2652},"get方法",[892,2654,2655],{},"ArrayList 中 get 方法只有一种实现：public E get(int index) 获取指定下标的元素",[916,2657,2659],{"className":918,"code":2658,"language":920,"meta":11,"style":11},"\u002F**\n * Returns the element at the specified position in this list.\n *\n * @param  index index of the element to return\n * @return the element at the specified position in this list\n * @throws IndexOutOfBoundsException {@inheritDoc}\n *\u002F\npublic E get(int index) {\n    rangeCheck(index);\n\n    return elementData(index);\n}\n",[922,2660,2661,2665,2670,2674,2686,2695,2705,2709,2726,2733,2737,2746],{"__ignoreMap":11},[925,2662,2663],{"class":927,"line":928},[925,2664,1027],{"class":954},[925,2666,2667],{"class":927,"line":951},[925,2668,2669],{"class":954}," * Returns the element at the specified position in this list.\n",[925,2671,2672],{"class":927,"line":958},[925,2673,1097],{"class":954},[925,2675,2676,2678,2680,2683],{"class":927,"line":1040},[925,2677,1103],{"class":954},[925,2679,1198],{"class":935},[925,2681,2682],{"class":1201},"  index",[925,2684,2685],{"class":954}," index of the element to return\n",[925,2687,2688,2690,2692],{"class":927,"line":1046},[925,2689,1103],{"class":954},[925,2691,1751],{"class":935},[925,2693,2694],{"class":954}," the element at the specified position in this list\n",[925,2696,2697,2699,2701,2703],{"class":927,"line":1052},[925,2698,1103],{"class":954},[925,2700,1212],{"class":935},[925,2702,2376],{"class":1215},[925,2704,2379],{"class":954},[925,2706,2707],{"class":927,"line":1058},[925,2708,1055],{"class":954},[925,2710,2711,2713,2716,2719,2721,2723],{"class":927,"line":1064},[925,2712,1233],{"class":935},[925,2714,2715],{"class":931}," E ",[925,2717,2718],{"class":1215},"get",[925,2720,1239],{"class":931},[925,2722,1242],{"class":935},[925,2724,2725],{"class":931}," index) {\n",[925,2727,2728,2731],{"class":927,"line":1076},[925,2729,2730],{"class":1215},"    rangeCheck",[925,2732,1831],{"class":931},[925,2734,2735],{"class":927,"line":1083},[925,2736,1080],{"emptyLinePlaceholder":1079},[925,2738,2739,2741,2744],{"class":927,"line":1088},[925,2740,1794],{"class":935},[925,2742,2743],{"class":1215}," elementData",[925,2745,1831],{"class":931},[925,2747,2748],{"class":927,"line":1094},[925,2749,1359],{"class":931},[1015,2751,2752],{"id":2752},"set方法",[892,2754,2755],{},"set 方法的功能为，修改指定下标的元素为 element。",[916,2757,2759],{"className":918,"code":2758,"language":920,"meta":11,"style":11},"\u002F**\n * Replaces the element at the specified position in this list with\n * the specified element.\n *\n * @param index index of the element to replace\n * @param element element to be stored at the specified position\n * @return the element previously at the specified position\n * @throws IndexOutOfBoundsException {@inheritDoc}\n *\u002F\npublic E set(int index, E element) {\n    rangeCheck(index);\n\n    E oldValue = elementData(index);\n    elementData[index] = element;\n    return oldValue;\n}\n",[922,2760,2761,2765,2770,2775,2779,2790,2802,2811,2821,2825,2840,2846,2850,2861,2871,2878],{"__ignoreMap":11},[925,2762,2763],{"class":927,"line":928},[925,2764,1027],{"class":954},[925,2766,2767],{"class":927,"line":951},[925,2768,2769],{"class":954}," * Replaces the element at the specified position in this list with\n",[925,2771,2772],{"class":927,"line":958},[925,2773,2774],{"class":954}," * the specified element.\n",[925,2776,2777],{"class":927,"line":1040},[925,2778,1097],{"class":954},[925,2780,2781,2783,2785,2787],{"class":927,"line":1046},[925,2782,1103],{"class":954},[925,2784,1198],{"class":935},[925,2786,2337],{"class":1201},[925,2788,2789],{"class":954}," index of the element to replace\n",[925,2791,2792,2794,2796,2799],{"class":927,"line":1052},[925,2793,1103],{"class":954},[925,2795,1198],{"class":935},[925,2797,2798],{"class":1201}," element",[925,2800,2801],{"class":954}," element to be stored at the specified position\n",[925,2803,2804,2806,2808],{"class":927,"line":1058},[925,2805,1103],{"class":954},[925,2807,1751],{"class":935},[925,2809,2810],{"class":954}," the element previously at the specified position\n",[925,2812,2813,2815,2817,2819],{"class":927,"line":1064},[925,2814,1103],{"class":954},[925,2816,1212],{"class":935},[925,2818,2376],{"class":1215},[925,2820,2379],{"class":954},[925,2822,2823],{"class":927,"line":1076},[925,2824,1055],{"class":954},[925,2826,2827,2829,2831,2834,2836,2838],{"class":927,"line":1083},[925,2828,1233],{"class":935},[925,2830,2715],{"class":931},[925,2832,2833],{"class":1215},"set",[925,2835,1239],{"class":931},[925,2837,1242],{"class":935},[925,2839,1823],{"class":931},[925,2841,2842,2844],{"class":927,"line":1088},[925,2843,2730],{"class":1215},[925,2845,1831],{"class":931},[925,2847,2848],{"class":927,"line":1094},[925,2849,1080],{"emptyLinePlaceholder":1079},[925,2851,2852,2855,2857,2859],{"class":927,"line":1100},[925,2853,2854],{"class":931},"    E oldValue ",[925,2856,942],{"class":935},[925,2858,2743],{"class":1215},[925,2860,1831],{"class":931},[925,2862,2863,2866,2868],{"class":927,"line":1109},[925,2864,2865],{"class":931},"    elementData[index] ",[925,2867,942],{"class":935},[925,2869,2870],{"class":931}," element;\n",[925,2872,2873,2875],{"class":927,"line":1114},[925,2874,1794],{"class":935},[925,2876,2877],{"class":931}," oldValue;\n",[925,2879,2880],{"class":927,"line":1282},[925,2881,1359],{"class":931},[1015,2883,2884],{"id":2884},"remove方法",[892,2886,2887],{},"ArrayList 中的 remove 方法有两个实现：",[973,2889,2890,2893],{},[976,2891,2892],{},"public E remove(int index)：删除指定下标的元素",[976,2894,2895],{},"public boolean remove(Object o)：删除第一个匹配成功的指定对象",[916,2897,2899],{"className":918,"code":2898,"language":920,"meta":11,"style":11},"\u002F**\n * Removes the element at the specified position in this list.\n * Shifts any subsequent elements to the left (subtracts one from their\n * indices).\n *\n * @param index the index of the element to be removed\n * @return the element that was removed from the list\n * @throws IndexOutOfBoundsException {@inheritDoc}\n *\u002F\npublic E remove(int index) {\n    rangeCheck(index);\n\n    modCount++;\n    E oldValue = elementData(index);\n\n    int numMoved = size - index - 1;\n    if (numMoved > 0)\n        System.arraycopy(elementData, index+1, elementData, index,\n                            numMoved);\n    elementData[--size] = null; \u002F\u002F clear to let GC do its work\n\n    return oldValue;\n}\n\n\u002F**\n * Removes the first occurrence of the specified element from this list,\n * if it is present.  If the list does not contain the element, it is\n * unchanged.  More formally, removes the element with the lowest index\n * \u003Ctt>i\u003C\u002Ftt> such that\n * \u003Ctt>(o==null&nbsp;?&nbsp;get(i)==null&nbsp;:&nbsp;o.equals(get(i)))\u003C\u002Ftt>\n * (if such an element exists).  Returns \u003Ctt>true\u003C\u002Ftt> if this list\n * contained the specified element (or equivalently, if this list\n * changed as a result of the call).\n *\n * @param o element to be removed from this list, if present\n * @return \u003Ctt>true\u003C\u002Ftt> if this list contained the specified element\n *\u002F\npublic boolean remove(Object o) {\n    if (o == null) {\n        for (int index = 0; index \u003C size; index++)\n            if (elementData[index] == null) {\n                fastRemove(index);\n                return true;\n            }\n    } else {\n        for (int index = 0; index \u003C size; index++)\n            if (o.equals(elementData[index])) {\n                fastRemove(index);\n                return true;\n            }\n    }\n    return false;\n}\n",[922,2900,2901,2905,2910,2915,2920,2924,2935,2944,2954,2958,2973,2979,2983,2991,3001,3005,3027,3039,3055,3059,3081,3085,3091,3095,3099,3103,3108,3113,3118,3123,3128,3133,3138,3143,3147,3159,3168,3172,3184,3197,3226,3240,3247,3256,3261,3269,3293,3306,3312,3320,3324,3328,3336],{"__ignoreMap":11},[925,2902,2903],{"class":927,"line":928},[925,2904,1027],{"class":954},[925,2906,2907],{"class":927,"line":951},[925,2908,2909],{"class":954}," * Removes the element at the specified position in this list.\n",[925,2911,2912],{"class":927,"line":958},[925,2913,2914],{"class":954}," * Shifts any subsequent elements to the left (subtracts one from their\n",[925,2916,2917],{"class":927,"line":1040},[925,2918,2919],{"class":954}," * indices).\n",[925,2921,2922],{"class":927,"line":1046},[925,2923,1097],{"class":954},[925,2925,2926,2928,2930,2932],{"class":927,"line":1052},[925,2927,1103],{"class":954},[925,2929,1198],{"class":935},[925,2931,2337],{"class":1201},[925,2933,2934],{"class":954}," the index of the element to be removed\n",[925,2936,2937,2939,2941],{"class":927,"line":1058},[925,2938,1103],{"class":954},[925,2940,1751],{"class":935},[925,2942,2943],{"class":954}," the element that was removed from the list\n",[925,2945,2946,2948,2950,2952],{"class":927,"line":1064},[925,2947,1103],{"class":954},[925,2949,1212],{"class":935},[925,2951,2376],{"class":1215},[925,2953,2379],{"class":954},[925,2955,2956],{"class":927,"line":1076},[925,2957,1055],{"class":954},[925,2959,2960,2962,2964,2967,2969,2971],{"class":927,"line":1083},[925,2961,1233],{"class":935},[925,2963,2715],{"class":931},[925,2965,2966],{"class":1215},"remove",[925,2968,1239],{"class":931},[925,2970,1242],{"class":935},[925,2972,2725],{"class":931},[925,2974,2975,2977],{"class":927,"line":1088},[925,2976,2730],{"class":1215},[925,2978,1831],{"class":931},[925,2980,2981],{"class":927,"line":1094},[925,2982,1080],{"emptyLinePlaceholder":1079},[925,2984,2985,2987,2989],{"class":927,"line":1100},[925,2986,1776],{"class":931},[925,2988,1779],{"class":935},[925,2990,1174],{"class":931},[925,2992,2993,2995,2997,2999],{"class":927,"line":1109},[925,2994,2854],{"class":931},[925,2996,942],{"class":935},[925,2998,2743],{"class":1215},[925,3000,1831],{"class":931},[925,3002,3003],{"class":927,"line":1114},[925,3004,1080],{"emptyLinePlaceholder":1079},[925,3006,3007,3009,3011,3013,3016,3018,3021,3023,3025],{"class":927,"line":1282},[925,3008,2127],{"class":935},[925,3010,2557],{"class":931},[925,3012,942],{"class":935},[925,3014,3015],{"class":931}," size ",[925,3017,2202],{"class":935},[925,3019,3020],{"class":931}," index ",[925,3022,2202],{"class":935},[925,3024,1940],{"class":1170},[925,3026,1174],{"class":931},[925,3028,3029,3031,3033,3035,3037],{"class":927,"line":1303},[925,3030,1250],{"class":935},[925,3032,2574],{"class":931},[925,3034,1256],{"class":935},[925,3036,1259],{"class":1170},[925,3038,2149],{"class":931},[925,3040,3041,3043,3045,3048,3050,3052],{"class":927,"line":1315},[925,3042,2586],{"class":931},[925,3044,2237],{"class":1215},[925,3046,3047],{"class":931},"(elementData, index",[925,3049,1852],{"class":935},[925,3051,1865],{"class":1170},[925,3053,3054],{"class":931},", elementData, index,\n",[925,3056,3057],{"class":927,"line":1325},[925,3058,2608],{"class":931},[925,3060,3061,3064,3067,3070,3072,3075,3078],{"class":927,"line":1344},[925,3062,3063],{"class":931},"    elementData[",[925,3065,3066],{"class":935},"--",[925,3068,3069],{"class":931},"size] ",[925,3071,942],{"class":935},[925,3073,3074],{"class":1170}," null",[925,3076,3077],{"class":931},"; ",[925,3079,3080],{"class":954},"\u002F\u002F clear to let GC do its work\n",[925,3082,3083],{"class":927,"line":1350},[925,3084,1080],{"emptyLinePlaceholder":1079},[925,3086,3087,3089],{"class":927,"line":1356},[925,3088,1794],{"class":935},[925,3090,2877],{"class":931},[925,3092,3093],{"class":927,"line":1362},[925,3094,1359],{"class":931},[925,3096,3097],{"class":927,"line":1367},[925,3098,1080],{"emptyLinePlaceholder":1079},[925,3100,3101],{"class":927,"line":1372},[925,3102,1027],{"class":954},[925,3104,3105],{"class":927,"line":1378},[925,3106,3107],{"class":954}," * Removes the first occurrence of the specified element from this list,\n",[925,3109,3110],{"class":927,"line":1383},[925,3111,3112],{"class":954}," * if it is present.  If the list does not contain the element, it is\n",[925,3114,3115],{"class":927,"line":1393},[925,3116,3117],{"class":954}," * unchanged.  More formally, removes the element with the lowest index\n",[925,3119,3120],{"class":927,"line":1406},[925,3121,3122],{"class":954}," * \u003Ctt>i\u003C\u002Ftt> such that\n",[925,3124,3125],{"class":927,"line":1411},[925,3126,3127],{"class":954}," * \u003Ctt>(o==null&nbsp;?&nbsp;get(i)==null&nbsp;:&nbsp;o.equals(get(i)))\u003C\u002Ftt>\n",[925,3129,3130],{"class":927,"line":1416},[925,3131,3132],{"class":954}," * (if such an element exists).  Returns \u003Ctt>true\u003C\u002Ftt> if this list\n",[925,3134,3135],{"class":927,"line":1421},[925,3136,3137],{"class":954}," * contained the specified element (or equivalently, if this list\n",[925,3139,3140],{"class":927,"line":1427},[925,3141,3142],{"class":954}," * changed as a result of the call).\n",[925,3144,3145],{"class":927,"line":1433},[925,3146,1097],{"class":954},[925,3148,3149,3151,3153,3156],{"class":927,"line":1439},[925,3150,1103],{"class":954},[925,3152,1198],{"class":935},[925,3154,3155],{"class":1201}," o",[925,3157,3158],{"class":954}," element to be removed from this list, if present\n",[925,3160,3161,3163,3165],{"class":927,"line":1444},[925,3162,1103],{"class":954},[925,3164,1751],{"class":935},[925,3166,3167],{"class":954}," \u003Ctt>true\u003C\u002Ftt> if this list contained the specified element\n",[925,3169,3170],{"class":927,"line":1457},[925,3171,1055],{"class":954},[925,3173,3174,3176,3178,3181],{"class":927,"line":1470},[925,3175,1233],{"class":935},[925,3177,1765],{"class":935},[925,3179,3180],{"class":1215}," remove",[925,3182,3183],{"class":931},"(Object o) {\n",[925,3185,3186,3188,3191,3193,3195],{"class":927,"line":1475},[925,3187,1250],{"class":935},[925,3189,3190],{"class":931}," (o ",[925,3192,1296],{"class":935},[925,3194,3074],{"class":1170},[925,3196,1262],{"class":931},[925,3198,3199,3202,3205,3207,3209,3211,3213,3216,3219,3222,3224],{"class":927,"line":1496},[925,3200,3201],{"class":935},"        for",[925,3203,3204],{"class":931}," (",[925,3206,1242],{"class":935},[925,3208,3020],{"class":931},[925,3210,942],{"class":935},[925,3212,1259],{"class":1170},[925,3214,3215],{"class":931},"; index ",[925,3217,3218],{"class":935},"\u003C",[925,3220,3221],{"class":931}," size; index",[925,3223,1779],{"class":935},[925,3225,2149],{"class":931},[925,3227,3228,3231,3234,3236,3238],{"class":927,"line":1516},[925,3229,3230],{"class":935},"            if",[925,3232,3233],{"class":931}," (elementData[index] ",[925,3235,1296],{"class":935},[925,3237,3074],{"class":1170},[925,3239,1262],{"class":931},[925,3241,3242,3245],{"class":927,"line":1536},[925,3243,3244],{"class":1215},"                fastRemove",[925,3246,1831],{"class":931},[925,3248,3249,3252,3254],{"class":927,"line":1556},[925,3250,3251],{"class":935},"                return",[925,3253,1797],{"class":1170},[925,3255,1174],{"class":931},[925,3257,3258],{"class":927,"line":1567},[925,3259,3260],{"class":931},"            }\n",[925,3262,3263,3265,3267],{"class":927,"line":1577},[925,3264,1285],{"class":931},[925,3266,1288],{"class":935},[925,3268,1322],{"class":931},[925,3270,3271,3273,3275,3277,3279,3281,3283,3285,3287,3289,3291],{"class":927,"line":1599},[925,3272,3201],{"class":935},[925,3274,3204],{"class":931},[925,3276,1242],{"class":935},[925,3278,3020],{"class":931},[925,3280,942],{"class":935},[925,3282,1259],{"class":1170},[925,3284,3215],{"class":931},[925,3286,3218],{"class":935},[925,3288,3221],{"class":931},[925,3290,1779],{"class":935},[925,3292,2149],{"class":931},[925,3294,3295,3297,3300,3303],{"class":927,"line":1605},[925,3296,3230],{"class":935},[925,3298,3299],{"class":931}," (o.",[925,3301,3302],{"class":1215},"equals",[925,3304,3305],{"class":931},"(elementData[index])) {\n",[925,3307,3308,3310],{"class":927,"line":1614},[925,3309,3244],{"class":1215},[925,3311,1831],{"class":931},[925,3313,3314,3316,3318],{"class":927,"line":1620},[925,3315,3251],{"class":935},[925,3317,1797],{"class":1170},[925,3319,1174],{"class":931},[925,3321,3322],{"class":927,"line":1630},[925,3323,3260],{"class":931},[925,3325,3326],{"class":927,"line":1635},[925,3327,1353],{"class":931},[925,3329,3330,3332,3334],{"class":927,"line":2152},[925,3331,1794],{"class":935},[925,3333,2158],{"class":1170},[925,3335,1174],{"class":931},[925,3337,3338],{"class":927,"line":2163},[925,3339,1359],{"class":931},[1015,3341,3342],{"id":3342},"自动扩容",[892,3344,3345],{},"每次向数组中添加元素时，都会去检查添加元素的个数是否会超过当前数组的长度，如果超出，数组则会进行扩容，直到满足添加数据的需求为止。ArrayList 中的扩容是通过 ensureCapacity(int minCapacity) 方法，实际执行扩容的过程是通过调用 grow(int minCapacity) 方法来实现的。每次扩容后会变为原来容量的 1.5 倍。",[892,3347,3348],{},[3349,3350,3351],"strong",{},"扩容过程为：",[3353,3354,3355,3358,3361,3364],"ol",{},[976,3356,3357],{},"当添加元素时，首先会检查当前数组的容量是否足够存放新元素。如果容量不够，则会执行扩容操作。",[976,3359,3360],{},"扩容操作会创建一个新的数组，通常是原来容量的 1.5 倍大小。",[976,3362,3363],{},"然后将原数组中的元素复制到新数组中。",[976,3365,3366],{},"最后，将新数组设置为 ArrayList 的内部数组，以替代原来的数组。",[892,3368,3369],{},[895,3370],{"alt":11,"src":3371},"\u002Fassets\u002Fjava\u002Fcore\u002Flist-arraylist\u002F2024-03-20-15-26-41.png",[916,3373,3375],{"className":918,"code":3374,"language":920,"meta":11,"style":11},"\u002F**\n * Increases the capacity of this \u003Ctt>ArrayList\u003C\u002Ftt> instance, if\n * necessary, to ensure that it can hold at least the number of elements\n * specified by the minimum capacity argument.\n *\n * @param   minCapacity   the desired minimum capacity\n *\u002F\npublic void ensureCapacity(int minCapacity) {\n    int minExpand = (elementData != DEFAULTCAPACITY_EMPTY_ELEMENTDATA)\n        \u002F\u002F any size if not default element table\n        ? 0\n        \u002F\u002F larger than default for default empty table. It's already\n        \u002F\u002F supposed to be at default size.\n        : DEFAULT_CAPACITY;\n\n    if (minCapacity > minExpand) {\n        ensureExplicitCapacity(minCapacity);\n    }\n}\n\n    private void ensureCapacityInternal(int minCapacity) {\n    ensureExplicitCapacity(calculateCapacity(elementData, minCapacity));\n}\n\nprivate void ensureExplicitCapacity(int minCapacity) {\n    modCount++;\n\n    \u002F\u002F overflow-conscious code\n    if (minCapacity - elementData.length > 0)\n        grow(minCapacity);\n}\n\n\u002F**\n * Increases the capacity to ensure that it can hold at least the\n * number of elements specified by the minimum capacity argument.\n *\n * @param minCapacity the desired minimum capacity\n *\u002F\nprivate void grow(int minCapacity) {\n    \u002F\u002F overflow-conscious code\n    int oldCapacity = elementData.length;\n    int newCapacity = oldCapacity + (oldCapacity >> 1);\n    if (newCapacity - minCapacity \u003C 0)\n        newCapacity = minCapacity;\n    if (newCapacity - MAX_ARRAY_SIZE > 0)\n        newCapacity = hugeCapacity(minCapacity);\n    \u002F\u002F minCapacity is usually close to size, so this is a win:\n    elementData = Arrays.copyOf(elementData, newCapacity);\n}\n",[922,3376,3377,3381,3386,3391,3396,3400,3412,3416,3432,3448,3453,3461,3466,3471,3479,3483,3495,3503,3507,3511,3515,3531,3544,3548,3552,3567,3575,3579,3584,3601,3608,3612,3616,3620,3625,3630,3634,3646,3650,3664,3668,3680,3703,3721,3731,3748,3759,3764,3778],{"__ignoreMap":11},[925,3378,3379],{"class":927,"line":928},[925,3380,1027],{"class":954},[925,3382,3383],{"class":927,"line":951},[925,3384,3385],{"class":954}," * Increases the capacity of this \u003Ctt>ArrayList\u003C\u002Ftt> instance, if\n",[925,3387,3388],{"class":927,"line":958},[925,3389,3390],{"class":954}," * necessary, to ensure that it can hold at least the number of elements\n",[925,3392,3393],{"class":927,"line":1040},[925,3394,3395],{"class":954}," * specified by the minimum capacity argument.\n",[925,3397,3398],{"class":927,"line":1046},[925,3399,1097],{"class":954},[925,3401,3402,3404,3406,3409],{"class":927,"line":1052},[925,3403,1103],{"class":954},[925,3405,1198],{"class":935},[925,3407,3408],{"class":1201},"   minCapacity",[925,3410,3411],{"class":954},"   the desired minimum capacity\n",[925,3413,3414],{"class":927,"line":1058},[925,3415,1055],{"class":954},[925,3417,3418,3420,3422,3425,3427,3429],{"class":927,"line":1064},[925,3419,1233],{"class":935},[925,3421,1814],{"class":935},[925,3423,3424],{"class":1215}," ensureCapacity",[925,3426,1239],{"class":931},[925,3428,1242],{"class":935},[925,3430,3431],{"class":931}," minCapacity) {\n",[925,3433,3434,3436,3439,3441,3443,3445],{"class":927,"line":1076},[925,3435,2127],{"class":935},[925,3437,3438],{"class":931}," minExpand ",[925,3440,942],{"class":935},[925,3442,2191],{"class":931},[925,3444,1529],{"class":935},[925,3446,3447],{"class":931}," DEFAULTCAPACITY_EMPTY_ELEMENTDATA)\n",[925,3449,3450],{"class":927,"line":1083},[925,3451,3452],{"class":954},"        \u002F\u002F any size if not default element table\n",[925,3454,3455,3458],{"class":927,"line":1088},[925,3456,3457],{"class":935},"        ?",[925,3459,3460],{"class":1170}," 0\n",[925,3462,3463],{"class":927,"line":1094},[925,3464,3465],{"class":954},"        \u002F\u002F larger than default for default empty table. It's already\n",[925,3467,3468],{"class":927,"line":1100},[925,3469,3470],{"class":954},"        \u002F\u002F supposed to be at default size.\n",[925,3472,3473,3476],{"class":927,"line":1109},[925,3474,3475],{"class":935},"        :",[925,3477,3478],{"class":931}," DEFAULT_CAPACITY;\n",[925,3480,3481],{"class":927,"line":1114},[925,3482,1080],{"emptyLinePlaceholder":1079},[925,3484,3485,3487,3490,3492],{"class":927,"line":1282},[925,3486,1250],{"class":935},[925,3488,3489],{"class":931}," (minCapacity ",[925,3491,1256],{"class":935},[925,3493,3494],{"class":931}," minExpand) {\n",[925,3496,3497,3500],{"class":927,"line":1303},[925,3498,3499],{"class":1215},"        ensureExplicitCapacity",[925,3501,3502],{"class":931},"(minCapacity);\n",[925,3504,3505],{"class":927,"line":1315},[925,3506,1353],{"class":931},[925,3508,3509],{"class":927,"line":1325},[925,3510,1359],{"class":931},[925,3512,3513],{"class":927,"line":1344},[925,3514,1080],{"emptyLinePlaceholder":1079},[925,3516,3517,3520,3522,3525,3527,3529],{"class":927,"line":1350},[925,3518,3519],{"class":935},"    private",[925,3521,1814],{"class":935},[925,3523,3524],{"class":1215}," ensureCapacityInternal",[925,3526,1239],{"class":931},[925,3528,1242],{"class":935},[925,3530,3431],{"class":931},[925,3532,3533,3536,3538,3541],{"class":927,"line":1356},[925,3534,3535],{"class":1215},"    ensureExplicitCapacity",[925,3537,1239],{"class":931},[925,3539,3540],{"class":1215},"calculateCapacity",[925,3542,3543],{"class":931},"(elementData, minCapacity));\n",[925,3545,3546],{"class":927,"line":1362},[925,3547,1359],{"class":931},[925,3549,3550],{"class":927,"line":1367},[925,3551,1080],{"emptyLinePlaceholder":1079},[925,3553,3554,3556,3558,3561,3563,3565],{"class":927,"line":1372},[925,3555,1117],{"class":935},[925,3557,1814],{"class":935},[925,3559,3560],{"class":1215}," ensureExplicitCapacity",[925,3562,1239],{"class":931},[925,3564,1242],{"class":935},[925,3566,3431],{"class":931},[925,3568,3569,3571,3573],{"class":927,"line":1378},[925,3570,1776],{"class":931},[925,3572,1779],{"class":935},[925,3574,1174],{"class":931},[925,3576,3577],{"class":927,"line":1383},[925,3578,1080],{"emptyLinePlaceholder":1079},[925,3580,3581],{"class":927,"line":1393},[925,3582,3583],{"class":954},"    \u002F\u002F overflow-conscious code\n",[925,3585,3586,3588,3590,3592,3595,3597,3599],{"class":927,"line":1406},[925,3587,1250],{"class":935},[925,3589,3489],{"class":931},[925,3591,2202],{"class":935},[925,3593,3594],{"class":931}," elementData.length ",[925,3596,1256],{"class":935},[925,3598,1259],{"class":1170},[925,3600,2149],{"class":931},[925,3602,3603,3606],{"class":927,"line":1411},[925,3604,3605],{"class":1215},"        grow",[925,3607,3502],{"class":931},[925,3609,3610],{"class":927,"line":1416},[925,3611,1359],{"class":931},[925,3613,3614],{"class":927,"line":1421},[925,3615,1080],{"emptyLinePlaceholder":1079},[925,3617,3618],{"class":927,"line":1427},[925,3619,1027],{"class":954},[925,3621,3622],{"class":927,"line":1433},[925,3623,3624],{"class":954}," * Increases the capacity to ensure that it can hold at least the\n",[925,3626,3627],{"class":927,"line":1439},[925,3628,3629],{"class":954}," * number of elements specified by the minimum capacity argument.\n",[925,3631,3632],{"class":927,"line":1444},[925,3633,1097],{"class":954},[925,3635,3636,3638,3640,3643],{"class":927,"line":1457},[925,3637,1103],{"class":954},[925,3639,1198],{"class":935},[925,3641,3642],{"class":1201}," minCapacity",[925,3644,3645],{"class":954}," the desired minimum capacity\n",[925,3647,3648],{"class":927,"line":1470},[925,3649,1055],{"class":954},[925,3651,3652,3654,3656,3658,3660,3662],{"class":927,"line":1475},[925,3653,1117],{"class":935},[925,3655,1814],{"class":935},[925,3657,2220],{"class":1215},[925,3659,1239],{"class":931},[925,3661,1242],{"class":935},[925,3663,3431],{"class":931},[925,3665,3666],{"class":927,"line":1496},[925,3667,3583],{"class":954},[925,3669,3670,3672,3675,3677],{"class":927,"line":1516},[925,3671,2127],{"class":935},[925,3673,3674],{"class":931}," oldCapacity ",[925,3676,942],{"class":935},[925,3678,3679],{"class":931}," elementData.length;\n",[925,3681,3682,3684,3687,3689,3691,3693,3696,3699,3701],{"class":927,"line":1536},[925,3683,2127],{"class":935},[925,3685,3686],{"class":931}," newCapacity ",[925,3688,942],{"class":935},[925,3690,3674],{"class":931},[925,3692,1852],{"class":935},[925,3694,3695],{"class":931}," (oldCapacity ",[925,3697,3698],{"class":935},">>",[925,3700,1940],{"class":1170},[925,3702,1868],{"class":931},[925,3704,3705,3707,3710,3712,3715,3717,3719],{"class":927,"line":1556},[925,3706,1250],{"class":935},[925,3708,3709],{"class":931}," (newCapacity ",[925,3711,2202],{"class":935},[925,3713,3714],{"class":931}," minCapacity ",[925,3716,3218],{"class":935},[925,3718,1259],{"class":1170},[925,3720,2149],{"class":931},[925,3722,3723,3726,3728],{"class":927,"line":1567},[925,3724,3725],{"class":931},"        newCapacity ",[925,3727,942],{"class":935},[925,3729,3730],{"class":931}," minCapacity;\n",[925,3732,3733,3735,3737,3739,3742,3744,3746],{"class":927,"line":1577},[925,3734,1250],{"class":935},[925,3736,3709],{"class":931},[925,3738,2202],{"class":935},[925,3740,3741],{"class":931}," MAX_ARRAY_SIZE ",[925,3743,1256],{"class":935},[925,3745,1259],{"class":1170},[925,3747,2149],{"class":931},[925,3749,3750,3752,3754,3757],{"class":927,"line":1599},[925,3751,3725],{"class":931},[925,3753,942],{"class":935},[925,3755,3756],{"class":1215}," hugeCapacity",[925,3758,3502],{"class":931},[925,3760,3761],{"class":927,"line":1605},[925,3762,3763],{"class":954},"    \u002F\u002F minCapacity is usually close to size, so this is a win:\n",[925,3765,3766,3769,3771,3773,3775],{"class":927,"line":1614},[925,3767,3768],{"class":931},"    elementData ",[925,3770,942],{"class":935},[925,3772,1584],{"class":931},[925,3774,1587],{"class":1215},[925,3776,3777],{"class":931},"(elementData, newCapacity);\n",[925,3779,3780],{"class":927,"line":1620},[925,3781,1359],{"class":931},[3783,3784,3785],"style",{},"html pre.shiki code .sxrX7, html code.shiki .sxrX7{--shiki-light:#24292E;--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .s8jYJ, html code.shiki .s8jYJ{--shiki-light:#D73A49;--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sCsY4, html code.shiki .sCsY4{--shiki-light:#6A737D;--shiki-default:#6A737D;--shiki-dark:#6A737D}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sBjJW, html code.shiki .sBjJW{--shiki-light:#005CC5;--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sP4rz, html code.shiki .sP4rz{--shiki-light:#E36209;--shiki-default:#E36209;--shiki-dark:#FFAB70}html pre.shiki code .snPdu, html code.shiki .snPdu{--shiki-light:#6F42C1;--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sIIMD, html code.shiki .sIIMD{--shiki-light:#032F62;--shiki-default:#032F62;--shiki-dark:#9ECBFF}",{"title":11,"searchDepth":951,"depth":951,"links":3787},[3788,3789,3790],{"id":901,"depth":951,"text":901},{"id":910,"depth":951,"text":911},{"id":1013,"depth":951,"text":1013,"children":3791},[3792,3793,3794,3795,3796,3797,3798],{"id":1017,"depth":958,"text":1017},{"id":1129,"depth":958,"text":1129},{"id":1645,"depth":958,"text":1645},{"id":2652,"depth":958,"text":2652},{"id":2752,"depth":958,"text":2752},{"id":2884,"depth":958,"text":2884},{"id":3342,"depth":958,"text":3342},"md",{},{"title":358,"description":11},"other\u002Fjava\u002Fcollection\u002Flist-arraylist","9YlD2qR_y5FN1aTh91ibscGK6oNm16mM1bcZC2-RKKA",1775496427458]