url stringlengths 11 2.25k | text stringlengths 88 50k | ts timestamp[s]date 2026-01-13 08:47:33 2026-01-13 09:30:40 |
|---|---|---|
https://giantrabbit.com/our-work?client=company-one-theatre | Our Work | Giant Rabbit Skip to main content Menu Close Main navigation Our Services Our Work About Us Strategy Design Development CRM Selection & Data Migration Fundraising & User Analytics Drupal 7 Upgrades to Backdrop CMS Project Rescues Managed Hosting Support & Maintenance Security  All Arts & Culture Education Environment Health Human Rights Social Justice Technology & Privacy  About Giant Rabbit The Team Jobs Contact Us  Our Work Our clients are fighting for public health, access to abortion, and LGBTQ+ rights. They're going to court on behalf of asylum-seekers and promoting human rights around the world. We support organizations that fight climate change, work for environmental conservation, and warn people about the risks of avalanches. Our clients are also working theaters, performing arts organizations, museums, and cultural institutions. Defending human rights at home and abroad. Partner Since 2018 Center for Gender and Refugee Studies Partner Since 2022 Family Violence Appellate Project Partner Since 2013 Front Line Defenders Partner Since 2022 Human Rights First Partner Since 2022 Justice Action Center Partner Since 2016 National Network of Abortion Funds (NNAF) Partner Since 2020 Observatory for the Protection of Human Rights Defenders Partner Since 2022 Youth Law Center Working toward a healthier future. Partner Since 2019 American Academy of Pediatrics California Chapter 1 Partner Since 2022 Advancing New Standards in Reproductive Health (ANSIRH) Partner Since 2023 Beyond the Pill Partner Since 2015 Cutaneous Lymphoma Foundation Partner Since 2020 Farmers Market Coalition Partner Since 2021 HealthRIGHT 360 Partner Since 2019 Ibis Reproductive Health Services Partner Since 2020 Mandela Partners Protecting the environment and fighting climate change. Partner From 2022 To 2023 Audubon Canyon Ranch Partner Since 2017 Ecology Center Partner Since 2014 Edible Schoolyard Project Partner Since 2007 eLock Technologies Partner Since 2022 Environmental Grantmakers Association Partner Since 2019 Highstead Partner Since 2020 John Muir Land Trust Partner Since 2022 Just Zero Partner Since 2014 Leave No Trace Partner Since 2020 Northwest Avalanche Center (NWAC) Partner Since 2023 One Tree Planted Partner Since 2021 Payette Avalanche Center Partner Since 2022 Sempervirens Partner Since 2019 Sierra Avalanche Center Partner Since 2014 The Trust For Public Land Partner Since 2022 Utah Avalanche Center Working for social and economic justice for all. Partner Since 2021 A New Way of Life Partner Since 2022 Center for Constitutional Rights Partner Since 2021 Center for WorkLife Law Partner Since 2021 Common Cause Partner Since 2010 CompassPoint Partner Since 2021 Equality Action Center Partner Since 2018 Keshet Partner Since 2024 Labor Notes Partner Since 2022 Legal Link Partner Since 2022 Mirror Memoirs Partner Since 2013 Unbound Philanthropy Partner Since 2018 Migrant Justice Building connection through arts, culture, and food. Partner Since 2013 18 Reasons Partner Since 2021 Artists Communities Alliance Partner Since 2019 Authors Alliance Partner Since 2018 Company One Theatre Partner Since 2017 Howlround Theatre Commons Partner Since 2023 Lighthouse Writers Workshop Partner Since 2023 Museo de las Americas Partner Since 2013 Sacred Lands Film Project Improving the quality and accessibility of education. Partner Since 2022 Academy College Prep Partner From 2017 To 2022 Bellwether Education Partner Since 2020 California Community Colleges Transfer Guarantee Pathway to Historically Black Colleges and Universities Partner From 2019 To 2020 The College of Business at Oregon State University Partner Since 2011 Ignited Partner From 2018 To 2022 Maker Ed Partner Since 2014 myShakespeare Partner Since 2019 Umoja Community Education Foundation Using technology for good and defending digital rights and privacy. Partner Since 2014 Electronic Frontier Foundation Partner Since 2019 FreeBSD Foundation Partner From 2015 To 2016 Internet Archive Partner Since 2012 Society of Motion Picture & Television Engineers (SMPTE) Partner From 2013 To 2021 The TOR Project Partner Since 2014 USENIX Partner Since 2020 Women's Audio Mission Partner From 2013 To 2015 Wikimedia Foundation Non-profit Sectors Human Rights Health Environment Social Justice Arts & Culture Education Technology & Privacy ❮ How can we help? Get in touch Giant Rabbit LLC 415.355.4211 info@giantrabbit.com Copyright © 2018-2025 by Giant Rabbit LLC. Artwork by RBlack . | Read our privacy policy . | 2026-01-13T09:29:31 |
http://www.chinadaily.com.cn/culture/#myCarousel | Culture, Entertainment and Art - Culture news, Chinese culture,Pop Culture - Chinadaily.com.cn Search HOME CHINA WORLD BUSINESS LIFESTYLE CULTURE TRAVEL VIDEO SPORTS OPINION REGIONAL NEWSPAPER MOBILE Global Edition ASIA 中文 双语 Français HOME CHINA WORLD BUSINESS LIFESTYLE CULTURE TRAVEL VIDEO SPORTS OPINION REGIONAL NEWSPAPER China Daily PDF China Daily E-paper MOBILE Culture Art Music&Theater Film&TV Books Heritage Events&Festivals People Cultural Exchange Video Photo Home > Culture Art Music and Theater Film and TV Books Heritage Events and Festivals People Cultural Exchange Video Photo Gallery Super idol rewrites the script Tracking Chinese cultural frontline in 2025 A sweeping portrait of China's vast northwest Minor Cold: Winter digs in 1 2 3 4 Super idol rewrites the script Tracking Chinese cultural frontline in 2025 A sweeping portrait of China's vast northwest Minor Cold: Winter digs in Unearthing Hongshan Museums showcase Chinese New Year traditions Museums showcase Chinese New Year traditions Serenading an ancient city Old vinyls reflect modern desire for music Exhibition highlights artists' vivid devotion to colors My Fair Princess legacy rebooted with short drama Traditional Chinese opera with a contemporary twist Beneath a modern metropolis, an ancient capital emerges 24 Solar Terms + Minor Cold: Winter digs in Minor Cold: Winter digs in Culture Insider + Winter Clothing Festival: A day of remembrance and warmth Winter Clothing Festival: A day of remembrance and warmth Living Heritage + A lesson steeped in tradition A lesson steeped in tradition Yuanxi + Exploring China's Xixia Imperial Tombs with Yuanxi Exploring China's Xixia Imperial Tombs with Yuanxi Video + 2025 captivating Chinese screens Leaping into the dark Tracking Chinese cultural frontline in 2025 Art + Exhibition highlights artists' vivid devotion to colors Connecting ancient art with modern values Teaching the spirit of brushwork Galloping toward the new Through the Seasons invites reflection and renewal Film and TV + My Fair Princess legacy rebooted with short drama Film tribute to novelist is a dream for theatergoers Guarding relics against all odds 2025 captivating Chinese screens After the spotlight fades Music and Theater + Serenading an ancient city Old vinyls reflect modern desire for music Traditional Chinese opera with a contemporary twist Striking a fresh chord A journey comes full circle Books + Ancient words reawaken as China's classics go digital Visual album brings Qinqiang Opera to a broader audience Bookshop forum explores paths for high-quality growth University bookstore opens reading center in Indonesia A sweeping portrait of China's vast northwest Heritage + Beneath a modern metropolis, an ancient capital emerges Unearthing Hongshan Couple turns 100,000 Great Wall photographs into actionable protection Guarding relics against all odds Mysterious Yingjing pottery captures attention People + Heritage crafts find new life Herder skis to podium Beyond the landmarks, Beijing's mountains bring peace and serenity Knowledge shared, lives changed Young Ukrainian vlogger documents life in China Most Popular Editor's Picks + Tracing China's origins Tales & Trails: Gansu Linxia — a vibrant civilization along the Yellow River Photo Gallery + Exhibition highlights artists' vivid devotion to colors Galloping toward the new Festive atmosphere, immersive cultural experience in North China ancient town Video + 2025 captivating Chinese screens Leaping into the dark Tracking Chinese cultural frontline in 2025 Special Coverage + Global Mayors Dialogue · Dunhuang World Conference on China Studies Chinaculture.org Golf: China's ancient game? Xinjiang: A living tapestry of intangible cultural heritage Top BACK TO THE TOP English 中文 HOME CHINA WORLD BUSINESS LIFESTYLE CULTURE TRAVEL VIDEO SPORTS OPINION REGIONAL NEWSPAPER China Daily PDF China Daily E-paper MOBILE Copyright 1994 - . All rights reserved. The content (including but not limited to text, photo, multimedia information, etc) published in this site belongs to China Daily Information Co (CDIC). Without written authorization from CDIC, such content shall not be republished or used in any form. Note: Browsers with 1024*768 or higher resolution are suggested for this site. License for publishing multimedia online 0108263 Registration Number: 130349 About China Daily Advertise on Site Contact Us Job Offer Expat Employment FOLLOW US Copyright 1994 - . All rights reserved. The content (including but not limited to text, photo, multimedia information, etc) published in this site belongs to China Daily Information Co (CDIC). Without written authorization from CDIC, such content shall not be republished or used in any form. -->   | 2026-01-13T09:29:31 |
http://groovy-lang.org/css/css/prettify.min.css | The Apache Groovy programming language - 404 Socialize Discuss on the mailing-list Groovy on X Groovy on Bluesky Groovy on Mastodon Groovy on LinkedIn Events and conferences Source code on GitHub Report issues in Jira Stack Overflow questions Slack Community You are using an outdated browser. Please upgrade your browser to improve your experience. Apache Groovy™ Learn Documentation Download Support Contribute Ecosystem Blog posts Socialize Oops! The page you are looking for does not exist! We could not find the page you are looking for. Maybe you are looking for one of those? The reference documentation of the Groovy language. The latest Javadocs of the language. The latest Groovydocs of the language. Description of the Groovy development kit APIs . Groovy Learn Documentation Download Support Contribute Ecosystem Blog posts About Source code Security Books Thanks Sponsorship FAQ Search Socialize Discuss on the mailing-list Groovy on X Groovy on Bluesky Groovy on Mastodon Groovy on LinkedIn Events and conferences Source code on GitHub Report issues in Jira Stack Overflow questions Slack Community The Groovy programming language is supported by the Apache Software Foundation and the Groovy community. Apache, Apache Groovy, Groovy, and the ASF logo are either registered trademarks or trademarks of The Apache Software Foundation. © 2003-2025 the Apache Groovy project — Groovy is Open Source: license , privacy policy . | 2026-01-13T09:29:31 |
https://brave.com/hi/download/ | Brave ब्राउज़र डाउनलोड | Brave Yes Dismiss ब्राउज़र डाउनलोड डेस्कटॉप Android iOS सुविधाएँ शील्ड्स VPN लियो AI वॉलेट रिवॉर्ड प्लेलिस्ट समाचार बात करें एडवांस प्राइवेसी सभी सुविधाएँ प्रीमियम Brave सर्च Brave सर्च को आज़माएँ Ask Brave Brave सर्च के बारे में वेब डिस्कवरी प्रोजेक्ट Brave ही क्यों? ब्राउज़र और सर्च संबंधी गाइड प्राइवेसी, एक्सटेंशन और हर प्लैटफ़ॉर्म के लिए सबसे अच्छा विकल्प. वेब3 गाइड क्रिप्टो, NFT और ब्लॉकचेन से संबंधित सब कुछ. Web3 की बुनियादी जानकारी पाएँ. गोपनीयता संबंधित शब्दकोश इंटरनेट और कम्प्यूटर से जुड़े शब्दों का आसान और संक्षिप्त परिचय. तुलना करें देखें कि Brave दूसरे ब्राउज़र्स और सर्च इंजन की तुलना में कितना बेहतर है। AI features LLM, मशीन लर्निंग और AI की बुनियादी बातें, यूज़र और डेवलपर दोनों के लिए. ब्लॉग Brave ब्लॉग प्राइवेसी से जुड़े अपडेट वेब स्टैंडर्ड रिसर्च Brave पॉडकास्ट Scale with Search API संक्षिप्त ब्यौरा कीमतें लॉग इन करें / साइन अप करें दस्तावेज़ गाइड MCP सर्वर पर विज्ञापन करें संक्षिप्त ब्यौरा Ads डैशबोर्ड दर्शक केस स्टडी सहायता केंद्र क्यों Brave Ads? Brave विज्ञापनों के फ़ॉर्मैट सर्च ऐड्स नया टैब टेकओवर नोटिफ़िकेशन ऐड्स विज्ञापनों के और रिसोर्स Brave पाएँ वेब पर खोजें हमारा अब तक का सबसे तेज़ ब्राउज़र Brave ब्राउज़र डाउनलोड नया Brave ब्राउज़र उन ऐड्स और ट्रैकर्स को ब्लॉक करता है जो आपको धीमा करते हैं और आपकी प्राइवेसी में दखल देते हैं। वेब कैसे काम कर सकती है, यह सोचने का नया तरीका पता लगाएँ। Brave पाएँ Brave ब्राउज़र (डेस्कटॉप) का यह वर्ज़न Windows , macOS और Linux पर डाउनलोड के लिए उपलब्ध है. या सीधे Windows स्टोर से डाउनलोड करें: 3x तक ज़्यादा तेज़ी से ब्राउज़ करें आपका पीछा करने वाले विज्ञापनों और ट्रैकर को ब्लॉक करें सेटिंग इंपोर्ट करें और 60 सेकंड में स्विच करें मोबाइल के लिए Brave ब्राउज़र Brave आपके मोबाइल डिवाइस के लिए एक तेज़, मुफ़्त और सुरक्षित वेब ब्राउज़र है। इसमें विज्ञापनों के लिए ब्लॉकर है, जो ट्रैकिंग रोकता है और मोबाइल डेटा और बैटरी लाइफ़ को बचाने के लिए तैयार किया गया है। Android या iOS के लिए Brave ब्राउज़र (मोबाइल) पाएँ। क्या आप Brave के शुरुआती वर्ज़न आज़माना चाहते हैं? आम तौर पर, नई सुविधाएँ Nightly चैनल में पेश किए जाते हैं। जब हम उनकी समस्याएँ दूर कर देते हैं, तब उन्हें आपको यहाँ दिखाई दे रहे Brave के रिलीज़ वर्शन में शामिल करने से पहले, आखिरी जाँच के लिए बीटा बिल्ड में भेज देते हैं। Brave पाएँ संसाधन सहायता केंद्र कम्युनिटी Brave में नया क्या है? रिलीज़ नोट स्टेटस अक्सर पूछे जाने वाले सवाल ट्रांसपेरेंसी रिपोर्ट मर्चेंडाइस स्टोर गोपनीयता नीति Brave Browser Brave सर्च Brave Search RTBF वेबसाइट और ईमेल पब्लिशर और क्रिएटर विज्ञापनदाता CCPA ब्राउज़र डेस्कटॉप Android iOS Linux बीटा Nightly खोज वेब पर खोजें Ask Brave Brave Search API कंपनी इसके बारे में ब्लॉग ब्रांड ऐसेट नौकरियाँ इवेंट GitHub रिसर्च समीक्षाएँ Tor Onion पता सोशल मीडिया Reddit X (formerly Twitter) Mastodon Bluesky Facebook YouTube दूसरे प्रोडक्ट्स AI features Brave प्रीमियम बेसिक अटेंशन टोकन YouTube ऐड ब्लॉकर uBlock Origin विकल्प Brave Creators पर विज्ञापन करें ब्राउज़र ऐड्स सर्च ऐड्स Ads डैशबोर्ड संपर्क करें सपोर्ट community.brave.app user-support@brave.com विज्ञापन adsales@brave.com कृपया इस ईमेल पते का इस्तेमाल सिर्फ़ तभी करें जब आप Brave के साथ विज्ञापन खरीदने में दिलचस्पी रखते हों. सहायता के लिए, कृपया community.brave.app पर जाएँ. बिज़नेस bizdev@brave.com प्रेस press@brave.com डेवलपर रिसोर्सेज़ Brave Wallet दस्तावेज़ Brave Search API दस्तावेज़ MCP सर्वर ऑफ़िस Brave सैन फ़्रांसिस्को 580 Howard St. Unit 402, San Francisco, CA 94105 कोई भाषा चुनें Azərbaycanca Bahasa Indonesia Català Čeština Dansk Deutsch Eesti English Español Filipino Français Hrvatski Italiano Kiswahili Latviešu Lietuvių Magyar Nederlands Norsk (Bokmål) O‘zbek Polski Português Română Slovenčina Slovenščina Suomi Svenska Tiếng Việt Türkçe Ελληνικά Български Қазақша Русский Српски Українська ქართული हिन्दी ภาษาไทย ខ្មែរ 한국어 中文 (中国) 中文 (繁體) 日本語 इस्तेमाल करने की शर्तें | सुरक्षा से जुड़ी समस्या की रिपोर्ट करें © 2015 - 2026 Brave Software, Inc. | सभी अधिकार सुरक्षित हैं लगभग हो गया... Google Play ऐप में कृपया Brave का इंस्टॉलेशन जारी रखें . कृपया Brave का इंस्टॉलेशन जारी रखें ऐप स्टोर . आप सबसे बेहतर ऑनलाइन प्राइवेसी सुविधा से सिर्फ़ 60 सेकंड दूर हैं Brave को डाउनलोड करें इंस्टॉलर चलाएँ सेटिंग इम्पोर्ट करें स्टेप 1 Brave को डाउनलोड करें Chrome के डाउनलोड्स (यह इस विंडो के ऊपरी दाएँ कोने में होना चाहिए) से इंस्टॉलर खोलें। स्टेप 2 इंस्टॉलर चलाएँ अगर आपसे कहा जाए, तो यूज़र ऐक्सेस कंट्रोल डायलॉग में "हाँ" पर क्लिक करें। स्टेप 3 सेटिंग इम्पोर्ट करें इंस्टॉलेशन पूरा होने का इंतज़ार करें, फिर Chrome से अपने ब्राउज़र की सेटिंग्स इंपोर्ट करें। अगर आपका डाउनलोड अपने आप शुरू नहीं होता है, तो क्लिक करें यहाँ . मदद चाहिए? ऐप पाने के लिए स्कैन करें | 2026-01-13T09:29:31 |
https://cloudflare.com/zh-cn/banking-and-financial-services/ | 银行与金融服务数字化转型 | Cloudflare 注册 语言 English English (United Kingdom) Deutsch Español (Latinoamérica) Español (España) Français Italiano 日本語 한국어 Polski Português (Brasil) Русский 繁體中文 简体中文 平台 全球连通云 Cloudflare 全球连通云提供 60 多种网络、安全和性能服务。 Enterprisee 适用于中大型组织 小型公司 对于小型组织 合作伙伴 成为 Cloudflare 合作伙伴 用户案例 现代化应用 加速性能 确保应用的可用性 优化网络体验 现代化安全 VPN 替代品 网络钓鱼防护 保护 Web 应用和 API 现代化网络 咖啡店网络 WAN 现代化 简化您的企业网络 CXO 主题 采用 AI 将 AI 融入员工团队与数字体验 AI 安全 保护智能体式 AI 和生成式 AI 应用 数据合规 简化合规并最小化风险 后量子加密技术 保护数据并满足合规标准 行业 医疗保健 银行 零售 游戏 公共部门 资源 产品指南 参考架构 分析师报告 互动 活动 演示 网络研讨会 研讨会 请求演示 产品 产品 工作空间安全 Zero Trust 网络访问 安全 Web 网关 电子邮件安全 云访问安全代理 应用安全 L7 DDoS 防护 Web 应用防火墙 API 安全解决方案 机器人管理 应用性能 CDN DNS 智能路由 Load balancing 网络和 SASE L3/4 DDoS 保护 NaaS / SD- WAN 防火墙即服务 网络互连 计划与价格 Enterprise 计划 小型企业计划 个人计划 比较各项计划 全球服务 支持和 Success 捆绑包 优化的 Cloudflare 体验 专业服务 专家引导部署 技术帐户管理 专注的技术管理 安全运营服务 Cloudflare 监控与响应 域名注册 购买和管理域名 1.1.1.1 免费 DNS 解析器 资源 产品指南 参考架构 分析师报告 产品演示和导览 帮助我选择 开发人员 文档 开发人员图书馆 文档和指南 应用演示 探索您能构建什么 教程 分步构建教程 参考架构 图表和设计模式 产品 人工智能 AI Gateway 观测和控制 AI 应用 Workers AI 在我们的网络上运行 ML 模型 计算 Observability 日志、指标和追踪 Workers 构建和部署无服务器应用 媒体 Images 转换、优化图像 Realtime 构建实时音频和视频应用 存储和数据库 D1 创建无服务器 SQL 数据库 R2 存储数据无需支付昂贵的出口费用 计划与价格 Workers 构建并部署无服务器应用 Workers KV 应用的无服务器键值存储 R2 轻松存储数据,无高昂出口费用 探索项目 客户故事 30 秒 AI 演示 快速入门指南 探索 Workers Playground 构建、测试和部署 开发人员 Discord 加入社区 开始构建 合作伙伴 合作伙伴网络 通过 Cloudflare 发展、创新并满足客户需求 合作伙伴门户 查找资源并注册交易 合作关 系类型 PowerUP 计划 发展业务的同时保障客户连接和安全 技术合作伙伴 探索我们的技术合作伙伴和集成生态系统 全球系统集成商 支持无缝的大规模数字化转型 服务提供商 发现我们的重要服务提供商网络 自助服务代理计划 为您的客户管理自助帐户 对等互连门户 为您的网络提供流量洞察 查找合作伙伴 为您的业务赋能 —— 与 Cloudflare Powered+ 合 作伙伴携手 资源 互动 演示 + 产品导览 按需产品演示 案例研究 Cloudflare 助力成功 网络研讨会 深入洞察的讨论 研讨会 虚拟论坛 图书馆 实用指南、技术路线图及其他资源 报告 来自 Cloudflare 研究的见解 博客 技术深挖和产品资讯 学习中心 教育工具和操作指南 构建 参考架构 技术指南 解决方案与产品指南 产品文档 文档 开发者文档 探索 theNET 数字企业战略洞察 Cloudflare TV 创新系列和活动 Cloudforce One 威胁研究与运营 Radar 互联网流量和安全趋势 分析师报告 行业研究报告 活动 即将举行的区域活动 信任、隐私和合规 合规信息和政策 支持 联系我们 社区论坛 无法访问帐户? 开发人员 Discord 获取帮助 公司 公司信息 领导力 认识我们的领导团队 投资者关系 投资者信息 媒体中心 探索近期新闻 招聘 探索空缺职位 信任,隐私与安全 隐私 政策、数据和保护 信任 政策、流程和安全 合规性 认证与监管 透明度 政策与披露 公众利益 人道主义 Project Galileo 政府机构 Athenian Project 选举 Cloudflare For Campaigns 健康 Project Fair Shot 全球网络 全球节点和状态 登录 联系销售 为全球银行业数字现代化保驾护航 Cloudflare 赋能银行交付无缝、安全的数字体验,同时满足数据主权、监管和人性要求,从而推动创新和提高运营效率。 预约演示 获取解决方案详情 增强安全防护,应对不断扩大的威胁形势 Cloudflare 提供强有力的安全防护,使用最先进加密技术和 AI 驱动的威胁检测与响应能力,应对不断演变的网络威胁,包括 Web、API 和网络漏洞。 在云端进行现代应用开发和创新 实现安全的云应用开发,整合先进的 AI 和机器学习技术,推动数字化转型,持续优化客户体验。 规模化网络韧性和卓越性能 确保覆盖全球的高优先级网络韧性和性能,同时满足 数据主权要求 ,提升客户体验。 精简监管合规 应对 PCI、GDPR、DORA 和 NIS2 等全球监管需求,在保护敏感数据的同时, 确保合规性 和运营效率。 以安全、可扩展、合规的数字解决方案重塑银行业 防范新兴网络安全威胁 银行业面临不断演变的网络威胁和日益严格的监管要求。高级威胁情报和实时洞察帮助银行主动保护数字资产。我们服务和分析 20% 的全球 Web 流量,拥有无可比拟的可见性。因而我们每日拦截数百亿次网络威胁,保护您的 IT 环境。此外,我们通过 Zero Trust 方法阻止勒索软件、网络钓鱼和影子 IT,防范最常见的攻击手段,利用最 先进的加密技术、DDoS 和客户侧防护措施保护 Web 应用并防止供应链攻击。 了解更多 以现代云应用开发驱动创新 在云端开发现代应用,加速数字化未来与创新。将 AI、机器学习和大数据分析安全集成到运营中,驱动个性化服务和流程优化。现代化核心系统和推出数字钱包等创新金融产品,全面提升所有渠道的客户互动体验。 了解更多 无与伦比的网络韧性、性能和全球覆盖 通过 280 Tbps 网络容量和低延迟连接(与 95% 的互联网用户距离约 50 毫秒),确保运营维持韧性和高性能。利用我们的 Anycast 网络路由实现全球冗余,它允许多台服务器运行我们的所有服务,同时共享相同的 IP 地址,并将请求路由到最近的服务器。通过我们的多供应商主/备模式支持双供应商要求,提供第 3 层网络流量保护。这种网络实力确保提供持续可靠的服务,即便在流量高峰期,也能让您的客户享受流畅体验。 了解更多 满足全球法规合规要求 遵守 PCI DSS 4.0、GDPR、DORA 和 NIS2 等关键法规。Zero Trust 安全方法确保持续的身份验证和严格的访问控制,同时通过应用安全、强大加密和数据脱敏有效保护敏感信息。我们帮助您保持审计就绪,最大限度地降低风险,顺畅实现监管合规。 了解更多 通过 Cloudflare 全球连通云提高客户留存率、降低风险并改善响应时间 49% 通过应用性能优化将客户留存率提升达 49% 1 50% 政策和合规风险降低达 50% 2 75% DDoS 攻击响应时间加快达 75% 3 分析机构的表彰 Cloudflare 获得 Gartner® SSE 魔力象限™ 认可 我们相信这一认可证明了 Cloudflare 的“轻分支、重云端”架构以及其帮助全球性、具有云计算意识的企业加速网络现代化的能力。 阅读报告 Cloudflare 在 Forrester Wave™:2023 年第四季度边缘开发平台报告中获评为“领导者” Forrester Research, Inc 根据开发者体验、安全性以及定价的灵活性和透明度等 33 个类别,评估了边缘开发平台市场中最重要的供应商。 阅读报告 Cloudflare 被 2024 年 GigaOm Radar CDN 报告评为“领导者” 2024 年 GigaOm Radar CDN 报告将 Cloudflare 评为“领导者”和“表现卓越者”。GigaOm Radar 报告在一系列同心圆上评估 19 家供应商解决方案,越靠近中心者整体价值越高。 阅读报告 SoFi 借助 Cloudflare 成功应对恶意流量 面对持续的网络攻击威胁,SoFi 安全团队于 2018 年开始寻找一种 Web 应用防火墙(WAF)。他们想要一种易用的解决方案,不仅能够阻止恶意流量,还能够智能应对新兴威胁。 通过 Cloudflare WAF,SoFi 的工程师立即就创建并部署了精细的规则集,成功将恶意流量减少 60% 以上,且误报率极低。 “最让我们惊讶的是,Cloudflare WAF 使用起来如此简单和直观。我们的工程师几乎立即就能上手。其他云服务提供商需要数天才能解决的问题,使用 Cloudflare 只要几个小时。现在,我们正更多地使用 Cloudflare 产品套件。集成任何 Cloudflare 解决方案都极其顺畅、轻松。” 得到 35% 的财富 500 强企业信赖 查看所有案例研究 开始使用 Cloudflare 我们的专家将为您的业务选择最佳解决方案。 与专家讨论 预约演示 来源: TechValidate by Survey Monkey, TechValidate 关于 Cloudflare 的研究 Ibid Ibid 开始使用 Free 计划 小型企业计划 企业级服务 获得推荐 请求演示 联系销售 解决方案 全球连通云 应用程序服务 SASE 和工作空间安全 网络服务 开发人员平台 支持 帮助中心 客户支持 社区论坛 开发人员 Discord 无法访问帐户? Cloudflare 状态 合规性 合规资源 信任 GDPR 负责任的 AI 透明度报告 报告滥用行为 公共利益 Project Galileo Athenian Project Cloudflare for Campaigns Project Fairshot 公司 关于 Cloudflare 网络地图 我们的团队 标识与媒体资料包 多样性、公平性与包容性 影响/ESG © 2026 Cloudflare 公司 隐私政策 使用条款 报告安全问题 信任与安全 Cookie 首选项 商标 | 2026-01-13T09:29:31 |
https://cloudflare.com/ja-jp/banking-and-financial-services/ | 銀行業務および金融サービスにおけるデジタルトランスフォーメーション | Cloudflare サインアップ 言語 English English (United Kingdom) Deutsch Español (Latinoamérica) Español (España) Français Italiano 日本語 한국어 Polski Português (Brasil) Русский 繁體中文 简体中文 プラットフォーム コネクティビティクラウド Cloudflareのコネクティビティクラウドは、ネットワーキング、セキュリティ、パフォーマンスのサービスを60以上提供します。 エンタープライズ 大中企業向け スモールビジネス 小規模組織向け パートナー Cloudflareパートナーになる ユースケース アプリケーションモダナイゼーション パフォーマンスを加速 アプリの可用性を確保 Web体験を最適化 セキュリティモダナイゼーション VPNの代替 フィッシング対策 Webア プリとAPIを保護 ネットワークモダナイゼーション コーヒーショップネットワーキング WANモダナイゼーション 企業ネットワークの簡素化 CXOトピック AIを導入 労働力とデジタル体験にAI導入 AIセキュリティ エージェント型AIおよびGenAIアプリケーションのセキュリティ保護 データコンプライアンス コンプライアンスの合理化とリスク最小化 ポスト量子の暗号 データの保護とコンプライアンス基準の充足 業界 ヘルスケア 銀行 小売 ゲーミング 公共機関 リソース 製品ガイド リファレンスアーキテクチャ アナリストレポート 相談 イベント デモ ウェビナー ワークショップ デモを依頼 製品 製品 ワークスペースのセキュリティ ゼロトラストネットワークアクセス セキュアWebゲートウェイ メールセキュリティ クラウドアクセスセキュリティブローカー(CASB) アプリケーションセキュリティ レイヤー7のDDoS攻撃対策 Webアプリケーションファイアウォール APIセキュリティ ボット管理 アプリケーションパフォーマンス CDN DNS スマートルーティング Load balancing ネットワーキングとSASE レイヤー3/4のDDoS攻撃対策 NaaS/SD- WAN Firewall as a Service ネットワークインターコネクト プランと料金 Enterpriseプラン 中小企業向けプラン 個人向けプラン プランを比較する グローバルサービス サポートとサクセスバンドル 最適化されたCloudflare体験 プロフェッショナルサービス 専門家主導の実装 技術アカウント管理 技術管理を重視 セキュリティオペレーションサービス Cloudflareの監視と対応 ドメイン登録 ドメインの購入と管理 1.1.1.1 フリーDNSリゾルバー リソース 製品ガイド リファレンスアーキテクチャ アナリストレポート 製品デモとツアー プラン選択にヘルプが必要 開発者 ドキュメンテーション 開発者ライブラリ ドキュメントとガイド アプリケーションデモ 構築可能なものを見る チュートリアル 段階的な構築チュートリアル リファレンスアーキテクチャ 図とデザインパターン 製品 人工知能 AI Gateway AIアプリの監視と制御 Workers AI 当社のネットワークでMLモデルを実行 コンピューティング Observability ログ、メトリクス、トレース Workers サーバーレスアプリの構築と展開 メディア Images 画像の変換と最適化 Realtime リアルタイムのオーディオおよび動画アプリを構築 ストレージとデータベース D1 サーバーレスSQLデータベースを作成 R2 高額のエグレス料金なしでデータを保存 プランと料金 Workers サーバーレスアプリの構築とデプロイ Workers KV アプリ用のサーバーレスkey-valueストア R2 高額のエグレス料金なしでデータ保存 プロジェクトを詳しく見る お客様事例 30秒でできるAIデモ 始めるためのクイックガイド Workers Playgroundを詳しく見る 構築、テスト、デプロイ Developers Discord コミュニティに参加する 構築を開始する パートナー パートナーネットワーク Cloudflareで成長、革新、顧客ニーズを満たす パートナーポータル リソースの検索と案件登録 パートナーのタイプ PowerUPプログラム 顧客の接続と保護を維持しつつ、ビジネスを成長 テクノロジーパートナー 当社のテクノロジーパートナーとインテグレーターのエコシステムについて グローバルシステムインテグレーター シームレスで大規模なデジタルトランスフォーメーションサポート サービスプロバイダー 本当に価値のあるサービスプロバイダーのネットワーク をご紹介 セルフサーブエージェンシープログラム クライアントのセルフサーブアカウントを管理 ピアツーピア(P2P)ポータル ネットワークのトラフィックインサイト パートナーの検索 PowerUPでビジネスを強化し、Cloudflare Powered+パートナーとつながりましょう。 リソース 相談 デモと製品ツアー オンデマンドの製品デモ 導入事例 Cloudflareで成功を追求 ウェビナー 洞察に満ちたディスカッション ワークショップ バーチャルフォーラム ライブラリ 役立つガイド、ロードマップなど レポート Cloudflareの調査インサイト ブログ 技術的な詳細情報と製品ニュース ラーニングセンター 教育ツールとハウツーコンテンツ 構築 リファレンスアーキテクチャ テクニカルガイド ソリューションおよび製品ガイド 製品ドキュメント ドキュメンテーション 開発者向けドキュメント 探求 theNET デジタルエンタープライズに関する経営管理層向けインサイト Cloudflare TV 革新的なシリーズとイベント Cloudforce One 脅威のリサーチとオペレーション Radar インターネットトラフィックとセキュ リティのトレンド アナリストレポート 業界調査レポート イベント 今後の地域イベント 信頼、プライバシー、コンプライアンス コンプライアンス情報とポリシー サポート 問い合わせる コミュニティフォーラム アカウントにアクセスできなくなりましたか? Developers Discord 支援を申し込む 会社 会社情報 リーダーシップ リーダーの紹介 IR 投資家情報 プレス 最近のニュースを詳しく見る キャリア 求人情報を確認する 信頼、プライバシー、安全性 プライバシー ポリシー、データ、保護 信頼 ポリシー、プロセス、安全性 コンプライアンス 認定および規制 透明性 ポリシーと開示情報 公共の利益 人道支援 プロジェクトGalileo 政府 Athenianプロジェクト 選挙 Cloudflare For Campaigns 健康 Project Fair Shot グローバルネットワーク 世界の場所とステータス ログイン 営業担当者への問い合わせ グローバルバンクにおけるデジタルモダナイゼーションの保護 Cloudflareは、データ主権、規制、回復力の要件を満たしながら、銀行がシームレスでセキュアなデジタルエクスペリエンスを提供し、イノベーションと業務効率を実現できるよう支援します。 デモ申し込み ソリューション概要を入手 拡大した脅威ランドスケープに対する強化されたセキュリティ Cloudflareは、Web、API、ネットワーク脆弱性などの新興する脅威に対し、最新鋭の暗号化およびAI主導の脅威検出・対処機能で堅牢な保護を提供します。 クラウドにおける現代のアプリ開発とイノベーション カスタマーエクスペリエンスのための先進的AIと機械学習を取り込み、クラウドアプリケーションのセキュア開発を実現し、デジタルモダナイゼーションを加速させます。 回復力と大規模なパフォーマンス より優れたカスタマーエクスペリエンスのために、 データ主権要件 を満たしながら、グローバルに展開する高優先度のネットワークの回復力とパフォーマンスを確実にします。 規制コンプライアンスの合理化 PCI、GDPR、DORA、NIS2などのグローバルな規制ニーズに対応し、秘密データの保護と同時に業務効率を確保し、 コンプライアンスを維持します。 安全性、拡張性、コンプライアンスに優れた デジタルソリューションによる銀行業務を変革 新興サイバーセキュリティの脅威から保護 銀行は、新たに登場する脅威ランドスケープとより厳格な規制要求に直面しています。高度な脅威インテリジェンスとリアルタイムの洞察が、銀行はデジタル資産を予防的に保護することができます。グローバルなWebトラフィックの20%にサービスを提供し、分析することで、比類なき可視性を実現しています。これにより、毎日数千億件の脅威のブロックが可能となり、セキュアな環境が実現します。さらに、ランサムウェア、フィッシング、シャドーITをZero Trustセキュリティで阻止し、最先端の暗号化、DDoS、クライアント側の保護でWebアプリケーションやサプライチェーンへの攻撃を阻止し、最も一般的な侵害ベクトルを保護します。 詳細を見る 最新鋭のクラウドアプリ開発でイノベーションを加速 クラウドでのモダンなアプリ開発で、デジタルの未来とイノベーションを加速。AI、機械学習、ビッグデータ分析を、セキュアに運用へ統合し、パーソナライズされたサービスと合理化された処理を加速します。基幹システムをモダナイズし、デジタルウォレットなどの新金融商品を発売し、あらゆるタッチポイントで顧客エンゲージメントを強化します。 詳細を見る 比類なき回復力、パフォーマンス、そしてグローバルな展開 280Tbpsのネットワーク容量と低遅延接続(インターネットユーザーの95%は50ms以下)により、業務の弾力性と高パフォーマンスの維持を保証します。複数のサーバーが同じIPアドレスを共有しながらもすべてのサービスを実行し、リクエストを最も近いサーバーにルーティングするエニーキャストネットワークルーティングで、グローバルな冗長性を実現します。L3ネットワークトラフィック保護のためのマルチベンダーアクティブ/スタンバイにより、デュアルベンダー要件に対応します。このネットワークの強固さが、強度により、トラフィックスパイク時でも一貫した信頼性の高いサービスが保証されるため、顧客は中断することなくサービスをご利用いただけます。 詳細を見る グローバル規制へのコンプライアンス対処 PCI DSS 4.0、GDPR、DORA、NIS2などの重要な規制に準拠。Zero Trustセキュリティアプローチにより、継続的な本人確認と厳格なアクセス制御が保証され、アプリケーションセキュリティ、堅牢な暗号化、データマスキングが秘密情報を保護します。監査への対応、リスクの最小限化、規制へのコンプライアンスを円滑に行えるよう支援します。 詳細を見る Cloudflareのコネクティビティクラウドで リテンション強化、リスク低減、応答時間改善 49% アプリパフォーマンスにより、顧客維持率を最高49%向上 1 50% ポリシーとコンプライアンスに関するリスクを最高50%低減 2 75% DDoS攻撃への対応時間を最大75%短縮 3 アナリストの評価 Cloudflare、SSE部門でGartner®のMagic Quadrant™に認定 この評価は、Cloudflareの「ブランチよりクラウドに重点を置く」アーキテクチャと、グローバルでクラウド志向の企業がネットワークの近代化を加速するのを支援する能力の証であると私たちは考えています。 レポートを読む Cloudflareが『The Forrester Wave™: Edge Development Platforms, Q4 2023』で「リーダー」に Forrester Research, Incが、開発者体験、セキュリティ、料金設定の柔軟性と透明性など33の評価基準に基づいて、エッジ開発プラットフォーム市場の主要ベンダーを評価しています。 レポートを読む Cloudflare、2024年度GigaOm RadarレポートのCDN部門でリーダーに選出 Cloudflareは、2024年度GigaOm RadarレポートのCDN部門で「リーダー」と「アウトパフォーマー」に選出されました。GigaOm Radarレポートでは、ベンダー19社のソリューションを評価して一連の同心円上にプロットしており、位置が円の中心に近いほど総合評価が高いことを示しています。 レポートを読む SoFiがCloudflareで悪意あるトラフィックを克服 サイバー攻撃の脅威に絶えずさらされていたSoFiのセキュリティチームは、2018年、Webアプリケーションファイアウォール(WAF)を検討し始めました。求めていたのは、悪意あるトラフィックをブロックするだけでなく、新たな脅威の出現に応じ、時間の経過とともにインテリジェントを高める、使いやすいソリューションでした。 SoFiのエンジニアは、Cloudflare WAFできめ細やかなルールセットを素早く作成してデプロイすることにより、悪意のあるトラフィックを60%以上削減し、誤検知率をかなり低いレベルに抑えることができました。 「最も驚いたのは、Cloudflare WAFが非常に簡単で直感的に使用できることでした。当社のエンジニアもすぐに慣れました。他のクラウドプロバイダーでは解決に数日かかった問題が、Cloudflareでは数時間しかかかりません。 社内で使用するCloudflare製品の数も増えてきました。Cloudflareのソリューションはどれも、スムーズに苦労なく統合することができます。 フォーチュン・グローバル500の企業の35%から寄せられる信頼 すべての導入事例を読む Cloudflareを始めましょう 当社の専門担当者が、適切なソリューション選びをお手伝いいたします。 お問い合わせ デモ申し込み 出典: TechValidate by Survey Monkey, TechValidate Research on Cloudflare Ibid Ibid 利用開始 Freeプラン 中小企業向けプラン エンタープライズ向け 推奨製品を尋ねる デモを依頼 営業担当者へのお問い合わせ ソリューション コネクティビティクラウド アプリケーションサービス SASEとワークスペースのセキュリティ ネットワークサービス 開発者プラットフォーム サポート ヘルプセンター カスタマーサポート コミュニティフォーラム Developers Discord アカウントにアクセスできなくなりましたか? Cloudflareステータス コンプライアンス コンプライアンスリソース 信頼 GDPR 責任あるAI 透明性レポート 不正利用を報告する 公共の利益 プロジェクトGalileo Athenianプロジェクト Cloudflare for Campaigns Project Fairshot 会社 Cloudflareについて ネットワークマップ Cloudflareのチーム ロゴとプレスキット 多様性、公平性、包摂性 インパクト/ESG © 2026 Cloudflare, Inc. プライバシーポリシー 利用規約 セキュリティの問題を報告 信頼性と安全性 Cookieの設定 商標 | 2026-01-13T09:29:31 |
https://developer.wordpress.com/docs/glance/support/ | Support Options on WordPress.com for Developers Skip to content Search Search Menu Search Search At a glance WordPress and WordPress.com Tech stack Glossary Interface styles Support Get started Step 1: Create a site Step 2: Set up your local environment Step 3: Set up GitHub Step 4: Develop locally Step 5: Deploy to your production or staging site WordPress Studio Studio sites Blueprints Open in WordPress Studio button How to create custom Blueprints Preview Sites Studio Sync Studio Assistant Studio CLI Import & export SSL in Studio Frequently asked questions Changelog Roadmap Beta features MCP MCP tools reference MCP prompt examples Developer tools WP-CLI WP-CLI overview Platform-specific commands Common commands Troubleshooting REST API Getting started with the REST API REST API reference Namespaces & versions OAuth2 authentication WordPress.com Connect Using the REST API from JavaScript & the browser (CORS) Guidelines for responsible use of Automattic’s APIs Site Accelerator API Platform features Site performance Domain management User management Real time backup Storage Sitemaps Jetpack Scan Account security Guides Add HTTP headers Block patterns Manage user, file, and folder permissions Manually restore your site from a Jetpack Backup Symlinked files and folders WordPress.com oEmbed provider Troubleshooting Enabling WP_DEBUG Jetpack Activity Log At a glance WordPress and WordPress.com Tech stack Glossary Interface styles Support Get started Step 1: Create a site Step 2: Set up your local environment Step 3: Set up GitHub Step 4: Develop locally Step 5: Deploy to your production or staging site WordPress Studio Studio sites Blueprints Open in WordPress Studio button How to create custom Blueprints Preview Sites Studio Sync Studio Assistant Studio CLI Import & export SSL in Studio Frequently asked questions Changelog Roadmap Beta features MCP MCP tools reference MCP prompt examples Developer tools WP-CLI WP-CLI overview Platform-specific commands Common commands Troubleshooting REST API Getting started with the REST API REST API reference Namespaces & versions OAuth2 authentication WordPress.com Connect Using the REST API from JavaScript & the browser (CORS) Guidelines for responsible use of Automattic’s APIs Site Accelerator API Platform features Site performance Domain management User management Real time backup Storage Sitemaps Jetpack Scan Account security Guides Add HTTP headers Block patterns Manage user, file, and folder permissions Manually restore your site from a Jetpack Backup Symlinked files and folders WordPress.com oEmbed provider Troubleshooting Enabling WP_DEBUG Jetpack Activity Log Support WordPress.com is a managed hosting platform that runs the open-source WordPress software. As part of our commitment to making development and site management easier, we offer several ways to get support based on your hosting plan and needs. This guide explains the support options available, what’s covered, and how to contact our team. Support options Paid plans: Customers on WordPress.com paid plans have access to fast, expert support—available 24/7. Free plans: Users on the free plan can receive help from the community through the WordPress.com public forums . Scope of support We are more than happy to answer questions related to WordPress.com and provide advice or suggestions for your site. Feel free to ask us anything related to your website’s development, design, customization, coding, and hosting. This can include: Troubleshooting issues with WordPress.com-hosted sites. Help with built-in features like backups, staging, and the block editor. Questions about code (HTML, CSS, or JavaScript) when used within the platform. Questions about WordPress.com developer tools such as WP-CLI, SFTP/SSH, and GitHub Deployments. What’s not covered While we’ll do our best to point you in the right direction, some things fall outside the scope of support, including but not limited to: Support for third-party plugins, themes, and tools not purchased or managed through WordPress.com. Making direct changes inside accounts with other providers (such as domain registrars). Assistance for self-hosted WordPress sites that are not hosted on WordPress.com . Writing or editing large portions of custom code (including HTML and CSS). Providing support for services managed by other teams or platforms. Related support channels Depending on what you’re working with, there are several other support teams available for services like Jetpack, Akismet, Jetpack Mobile, and the REST API: Jetpack : For questions about the Jetpack plugin on self-hosted WordPress sites. Akismet : If comments are being incorrectly marked as spam. WordPress.com REST API : For technical documentation and guidance on using the REST API. Jetpack Mobile or WordPress.com Desktop Apps : For issues related to our mobile and desktop apps. How to get support To get help from the WordPress.com support team: Visit your website’s dashboard. Click the question mark icon in the top right corner to open the Help Center : Use the box to search our help guides, covering all aspects of WordPress.com—it’s possible the answer to your question can be found here. If you can’t find your issue in the list and still want to contact us, click “ Still need help? ” at the bottom of the Help Center: Type your question or issue into the Support Assistant and submit. After a few seconds, our system will provide an automated response to attempt to solve your trouble. If the quick response answers your question, click the X icon to close the Support Assistant. If you are still stuck and would like like to submit your request to our support team, click the link to “ Contact our support team “. When you contact the WordPress.com support team, a confirmation email will be sent to the email address associated with your account. If you don’t see it in your inbox, be sure to check your spam or junk folder in case it was filtered there. Last updated: August 15, 2025 Ready to get started with WordPress.com? Get started Documentation is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License An Automattic Creation Loading Comments... Write a Comment... Email (Required) Name (Required) Website | 2026-01-13T09:29:31 |
https://www.chinadaily.com.cn/a/202512/31/WS69545e9fa310d6866eb314bf.html | Resilient Chinese economy quells volatility - Chinadaily.com.cn Search HOME CHINA WORLD BUSINESS LIFESTYLE CULTURE TRAVEL VIDEO SPORTS OPINION REGIONAL NEWSPAPER MOBILE Global Edition ASIA 中文 双语 Français HOME CHINA WORLD BUSINESS LIFESTYLE CULTURE TRAVEL VIDEO SPORTS OPINION REGIONAL NEWSPAPER China Daily PDF China Daily E-paper MOBILE Business Macro Companies Industries Technology Motoring China Data Finance Top 10 Home / Business / Industries Home Business Industries Resilient Chinese economy quells volatility Experts: Unpredictability of US policy, impact of tariffs pose major challenges By XIN ZHIMING in Beijing, XING YI in London and PRIME SARMIENTO in Hong Kong | CHINA DAILY | Updated: 2025-12-31 07:21 Share Share - WeChat --> CLOSE Container vessels are seen docked at Qianwan Container Terminal in Qingdao, Shandong province, on Dec 8. YU FANGPING/FOR CHINA DAILY The world economy faced strong headwinds in 2025, primarily as a result of escalating trade tensions thanks to the US' "reciprocal tariffs", causing substantial uncertainties in supply chains and the global economy. China, meanwhile, managed to maintain stable economic growth throughout the year, with a high possibility of achieving annual GDP growth of more than 5 percent, contributing about 30 percent of total global economic growth. Starting in February, the United States imposed high tariffs on China and other trade partners, which went against the principle of free trade and dealt a heavy blow to global supply chains. Although China initiated countermeasures to force Washington back to the negotiating table and ultimately lower the tariffs, the damage had already been done, experts said. "2025 was a challenging year for the world economy," said Gerard Lyons, a British economist who holds senior positions in several financial institutions in London. "The unpredictability of US policy and the impact of tariffs were the major events." Apart from trade tensions, the ongoing conflict in Ukraine also affected investor mood across the globe, with the European economy suffering the most. Rising inflation also posed a threat to much of the developed world in 2025. "The global economy has had to withstand a number of extraordinary body blows such as tariffs, continued conflict in Eastern Europe and a much more national interest focus for economies," said Aly-Khan Satchu, a leading investment banker from Kenya. According to the International Monetary Fund, the global economy is adjusting to a landscape reshaped by new policy measures. Although some extremes of higher tariffs caused by US trade measures were tempered, the overall environment remains volatile, and temporary factors that supported activity in the first half of 2025, such as front-loading, are fading. In its October World Economic Outlook report, the IMF forecast the global economy would slow from 3.3 percent in 2024 to 3.2 percent in 2025. "The pattern in the global economy is clear and striking; the traditional economy is ex-growth or in recession while the innovation-driven economy is full steam ahead, and this great divergence explains economic growth across the globe," said Joyce Zhou, CEO of Oakcean Capital, a London-based wealth management company. 1 2 3 4 5 6 Next >>| 1/6 Next --> --> Photo China Eastern launches world's longest flight Hainan winter trade fair promotes tropical agriculture 'A date with China' media tour makes stop at 'Futian Wings' Shenzhen pioneers brain science tech to shape future industries Charting distinctive path for beauty brands China Post strives to ensure package delivery for 'Double Eleven' online shopping festival Most Viewed in 24 Hours --> State Council News Policies concerning expats, foreign enterprises in December 2025 2026 Share your views on traveling in China Top 10 --> Top 10 countries attracting Chinese tourists Business focus Improved roadways lifeblood of economy Nation expands roads to boost flow of goods, visitors China Data A look at China's economic data in November SOEs SOEs post stable revenue, profits in Jan-Nov Fund for SOEs in place to spur innovation Special International Services Shanghai WIC Wuzhen Summit Top BACK TO THE TOP English 中文 HOME CHINA WORLD BUSINESS LIFESTYLE CULTURE TRAVEL VIDEO SPORTS OPINION REGIONAL NEWSPAPER China Daily PDF China Daily E-paper MOBILE Copyright 1994 - . All rights reserved. The content (including but not limited to text, photo, multimedia information, etc) published in this site belongs to China Daily Information Co (CDIC). Without written authorization from CDIC, such content shall not be republished or used in any form. Note: Browsers with 1024*768 or higher resolution are suggested for this site. License for publishing multimedia online 0108263 Registration Number: 130349 About China Daily Advertise on Site Contact Us Job Offer Expat Employment FOLLOW US Copyright 1994 - . All rights reserved. The content (including but not limited to text, photo, multimedia information, etc) published in this site belongs to China Daily Information Co (CDIC). Without written authorization from CDIC, such content shall not be republished or used in any form. --> CLOSE -->   | 2026-01-13T09:29:31 |
https://cloudflare.com/ko-kr/banking-and-financial-services/ | 뱅킹 및 금융 서비스 분야의 디지털 전환 | Cloudflare 가입 언어 English English (United Kingdom) Deutsch Español (Latinoamérica) Español (España) Français Italiano 日本語 한국어 Polski Português (Brasil) Русский 繁體中文 简体中文 플랫폼 클라우드 연결성 Cloudflare의 클라우드 연결성은 60여 가지의 네트워킹, 보안, 성능 서비스를 제공합니다. Enterprise 대규모 및 중간 규모 조직용 중소기업 소규모 조직용 파트너 Cloudflare 파트너 되기 사용 사례 애플리케이션 최신화 성능 가속화 애플리케이션 가용성 보장 웹 경험 최적화 보안 최신화 VPN 교체 피싱 방어 웹 애플리케이션 및 API 보호 네트워크 최신화 커피숍 네트워킹 WAN 최신화 기업 네트워크 간소화 CXO 주제 AI 도입 인력 및 디지털 경험에 AI 도입 AI 보안 에이전틱 AI 및 생성형 AI 애플리케이션 보안 강화 데이터 규제 준수 규제 준수를 간소화하고 위험을 최소화 포스트 퀀텀 암호화 데이터 보호 및 규제 준수 표준 충족 산업 분야 의료 뱅킹 리테일 게임 공공 부문 리소스 제품 가이드 참조 아키텍처 분석 보고서 참여 이벤트 데모 웨비나 워크숍 데모 요청 제품 제품 워크스페이스 보안 Zero Trust 네트워크 액세스 보안 웹 게이트웨이 이메일 보안 클라우드 액세스 보안 브로커 애플리케이션 보안 L7 DDoS 방어 웹 애플리케이션 방화벽 API 보안 봇 관리 애플리케이션 성능 CDN DNS 스마트 라우팅 Load balancing 네트워킹 및 SASE L3/4 DDoS 방어 NaaS / SD-WAN 서비스형 방화벽 네트워크 상호 연결 요금제 및 가격 Enterprise 요금제 중소기업 요금제 개별 요금제 요금제 비교 글로벌 서비스 지원 및 성공 번들 최적화된 Cloudflare 경험 전문 서비스 전문가 주 도 구현 기술 계정 관리 집중적인 기술 관리 보안 운영 서비스 Cloudflare 모니터링 및 대응 도메인 등록 도메인 구매 및 관리 1.1.1.1 무료 DNS 확인자 리소스 제품 가이드 참조 아키텍처 분석 보고서 제품 데모 및 투어 제품 추천받기 개발자 문서 개발자 라이브러리 문서 및 가이드 애플리케이션 데모 무엇을 구축할 수 있는지 알아보세요 튜토리얼 단계별 구축 튜토리얼 참조 아키텍처 다이어그램 및 디자인 패턴 제품 인공 지능 AI Gateway AI 애플리케이션 관찰 및 제어 Workers AI Cloudflare 네트워크에서 ML 모델 실행 컴퓨팅 Observability 로그, 메트릭, 추적 Workers 서버리스 애플리케이션 구축 및 배포 미디어 Images 이미지 변환, 최적화 Realtime 실시간 오디오/비디오 애플리케이션 구축 스토리지 및 데이터베이스 D1 서버리스 SQL 데 이터베이스 생성 R2 값비싼 송신료 없이 데이터 저장 요금제 및 가격 Workers 서버리스 애플리케이션 구축 및 배포 Workers KV 애플리케이션용 서버리스 키-값 저장소 R2 값비싼 송신료 없이 데이터 저장 프로젝트 살펴보기 고객 사례 30초 이내의 AI 데모 시작을 위한 빠른 가이드 Workers Playground 탐색 빌드, 테스트, 배포 개발자 Discord 커뮤니티 가입 구축 시작하기 파트너 파트너 네트워크 Cloudflare로 성장, 혁신, 고객 요구 충족 파트너 포털 리소스 찾기 및 거래 등록 파트너십 유형 PowerUP 프로그램 고객 연결성과 보안을 유지하면서 비즈니스 성장시키기 기술 파트너 Cloudflare의 기술 파트너십과 통합 생태계 살펴보기 글로벌 시스템 통합업체 대규모 디지털 변환을 원활하게 지원 서비스 공급자 Cloudflare의 주요 서비스 공급자 네트워크 알아보기 셀프 서비스 에이전시 프로그램 귀사 고객을 위한 셀프서비스 계정 관리 피어 투 피어 포털 네트워크 트래픽 인사이트 파트너 검색 Cloudflare Powered+ 파트너와 협력하여 비즈니스 역량을 강화하세요. 자료 참여 데모 + 제품 투어 온디맨드 제품 데모 사례 연구 Cloudflare로 성공 추진하기 웨비나 유익한 논의 워크숍 가상 포럼 라이브러리 유용한 가이드, 로드맵 등 보고서 Cloudflare 연구의 인사이트 블로그 기술 심층 탐구 및 제품 뉴스 학습 센터 교육 도구 및 실전 활용 콘텐츠 구축 참조 아키텍처 기술 가이드 솔루션 + 제품 안내서 제품 문서 문서 개발자 문서 탐색 theNet 디지털 기업을 위한 경영진 인사이트 Cloudflare TV 혁신적인 시리즈 및 이벤트 Cloudforce One 위협 연구 및 운영 Radar 인터넷 트래픽 및 보안 동향 분석 보고서 업계 연구 보고서 이벤트 예정된 지역 이벤트 신뢰, 개인정보 보호, 규제 준수 규제 준수 정보 및 정책 지원 문의 커뮤니티 포럼 계정에 접근할 수 없으신가요? 개발자 Discord 지원받기 회사 회사 정보 리더십 Cloudflare 리더 만나보기 투자자 관계 투자자 정보 언론 최근 뉴스 살펴보기 채용 정보 진행 중인 역할 살펴보기 신뢰, 개인정보 보호, 안전 개인정보 보호 정책, 데이터, 보호 신뢰하지 않음 정책, 프로세스, 안전 규정 준수 인증 및 규제 투명성 정책 및 공개 공익 인도주의 Galileo 프로젝트 정부 기관 Athenian 프로젝트 선거 Cloudflare for Campaigns 건강 Project Fair Shot 전역 네트워크 글로벌 위치 및 상태 로그인 영업팀에 문의 글로벌 은행을 위해 디지털 최신화 보호 Cloudflare에서는 은행이 원활하고 안전한 디지털 경험을 제공하면서 데이터 주권, 규제, 복원력 요건을 충족하여 혁신과 운영 효율성을 실현할 수 있게 지원합니다. 데모 등록 솔루션 개요를 확인하세요 넓어진 위협 환경에 걸쳐 향상된 보안 Cloudflare에서는 최첨단 암호화, AI 기반 위협 감지, 응답 기능을 통해 웹, API, 네트워크 취약점을 비롯한 발전하는 위협에 대한 강력한 보호를 제공합니다. 클라우드에서의 최신 애플리케이션 개발 및 혁신 향상된 고객 경험을 위해 고급 AI와 머신 러닝을 통합하여 안전한 클라우드 애플리케이션 개발을 실현해 디지털 최신화를 지원하세요. 복원력 및 대규모 성능 전 세계에 걸쳐 우선순위가 높은 네트워크 복원력과 성능을 보장하는 동시에 더 나은 고객 경험을 위해 데이터 주권 요건 을 충족하세요. 간소화된 규제 준수 중요한 데이터를 보호하고 운영 효율성을 보장하며 규정을 계속 준수하려면 PCI, GDPR, DORA, NIS2 등의 글로벌 규제 요건을 충족하세요. 안전하고, 확장 가능하며, 규제를 준수하는 디지털 솔루션으로 뱅킹 전환 새로 등장하는 사이버 보안 위협으로부터의 보호 은행에서는 진화하는 위협 환경과 더 엄격한 규제를 마주합니다. 고급 위협 인텔리전스와 실시간 인사이트는 은행에서 선제적으로 디지털 자산을 보호하는 것을 돕습니다. Cloudflare에서는 글로벌 웹 트래픽의 20%를 제공하고 분석하여 독보적인 가시성을 보유하고 있습니다. 이를 통해 Cloudflare에서는 매일 수십억 건의 위협을 차단하고 환경을 보호할 수 있습니다. 또한, Cloudflare에서는 Zero Trust 보안을 통해 랜섬웨어, 피싱, 섀도우 IT를 차단하고 최첨단 암호화, DDoS, 클라이언트 측 보호를 통해 웹 애플리케이 션 또는 공급망 공격을 차단하여 가장 흔한 유출 벡터를 보호하는 것을 돕습니다. 자세한 정보 최신 클라우드 애플리케이션 개발을 통해 혁신 주도 디지털 미래와 혁신을 클라우드에서의 최신 애플리케이션 개발로 가속화하세요. 맞춤형 서비스와 간소화된 프로세스를 촉진하기 위해 AI, 머신 러닝, 빅데이터 분석을 운영에 안전하게 통합하세요. 핵심 시스템을 현대화하고 디지털 지갑과 같은 새로운 금융 제품을 출시하여 모든 접점에 걸쳐 고객 참여를 강화하세요. 자세한 정보 독보적인 복원력, 성능, 글로벌 도달 280Tbps의 네트워크 용량과 대기 시간이 짧은 연결(인터넷 사용자의 95%로부터 50ms 이내)로 운영이 복원력과 뛰어난 성능을 유지할 수 있게 하세요. 동일한 IP 주소를 공유하고 가장 가까운 곳으로 요청을 라우팅하는 동안 모든 Cloudflare 서비스를 여러 서버가 실행할 수 있게 하는 Anycast 네트워크 라우팅을 통해 글로벌 이중화를 제공하세요. L3 네트워크 트래픽 보호를 위한 멀티 벤더 활성/대기를 통해 듀얼 벤더 요건을 지원하세요. 이러한 네트워크 성능은 트래픽이 급증하는 동안에도 일관되고 신뢰할 수 있는 서비스를 보장합니다. 따라서 고객은 중단 없는 경험을 즐길 수 있습니다. 자세한 정보 글로벌 규제를 통해 규제 준수 대처 PCI DSS 4.0, GDPR, DORA, NIS2 등의 중요한 규제를 준수합니다. Zero Trust 보안 접근법은 지속적인 ID 확인 및 엄격한 접근 제어를 보장합니다. 반면에 애플리케이션 보안, 강력한 암호화, 데이터 마스킹은 중요한 정보를 보호합니다. Cloudflare에서는 사용자가 감사받을 준비가 되어 있고, 위험을 최소화하며, 원활하게 규제를 준수하도록 돕습니다. 자세한 정보 Cloudflare의 클라우드 연결성을 통해 유지 향상, 위험 감소, 대응 시간 단축 49% 애플리케이션 성능으로 인한 고객 유지 최대 49% 향상 1 50% 정책 및 규제 준수 위험 최대 50% 감소 2 75% DDoS 공격 대응 시간 최대 75% 단축 3 분석가의 인정 Cloudflare, Gartner® Magic Quadrant™ SSE 부문에 선정 Cloudflare가 이번에 선정된 이유는 '가벼운 분기, 견고한 클라우드' 아키텍처와 클라우드를 지향하는 글로벌 기업이 네트워크 최신화를 가속화할 수 있도록 지원하는 능력을 입증 한 결과라고 생각합니다. 보고서 읽기 Cloudflare, 2023년 4분기에 Forrester Wave™: 에지 개발 플랫폼 부문 리더로 선정 Forrester Research, Inc에서 개발자 경험, 보안, 가격 유연성, 투명성 등 33개 범주를 기준으로 에지 개발 플랫폼 시장에서 가장 주목할 만한 벤더를 평가했습니다. 보고서 읽기 Cloudflare, 2024년 GigaOm Radar CDN 부문 리더 Cloudflare가 2024년 GigaOm Radar CDN 부문 보고서에서 리더이자 아웃퍼포머로 인정받았습니다. GigaOm Radar 보고서에서는 19개의 벤더 솔루션을 동심원의 고리 여러 개로 평가하면서, 중앙에 가깝게 배치된 경우 전체적으로 가치가 더 높다고 평가했습니다. 보고서 읽기 SoFi, Cloudflare를 통해 악의적인 트래픽 극복 지속되는 사이버 공격 위협에 직면한 SoFi 보안팀에서는 2018년에 웹 애플리케이션 방화벽(WAF)을 찾기 시작했습니다. 이들은 불법 트래픽을 차단할 뿐만 아니라 시간이 지나며 새로운 위협이 발생함에 따라 지능적으로 대처할 사용하기 쉬운 솔루션을 원했습니다. SoFi의 엔지니어는 Cloudflare WAF를 사용하여 상세한 규칙 집합을 거의 즉시 구축하고 배포했습니다. 또한, 매우 낮은 오탐율을 통해 악의적인 트래픽을 60% 이상 줄일 수 있었습니다. “Cloudflare WAF를 접하고 가장 놀라웠던 점은 정말 쉽고 직관적이었다는 것입니다. 엔지니어들이 거의 즉시 활용할 수 있었죠. 다른 클라우드 공급자가 해결하는 데 며칠이나 걸렸던 문제를 Cloudflare를 이용하면 몇 시간밖에 걸리지 않습니다.” 그래서, Cloudflare의 제품군 사용을 확대했습니다. Cloudflare 솔루션과의 통합은 매우 매끄럽고 간편하게 진행됐습니다.” Fortune 500의 35%가 신뢰하는 제품 모든 사례 연구 보기 Cloudflare로 시작하세요 Cloudflare의 전문가가 비즈니스에 적합한 솔루션을 선택하는 것을 도와드립니다. 전문가 상담 데모 등록 출처: TechValidate by Survey Monkey, TechValidate Research on Cloudflare Ibid Ibid 시작하기 Free 요금제 중소기업 요금제 기업용 추천받기 데모 요청 영업팀에 문의 솔루션 클라우드 연결성 애플리케이션 서비스 SASE 및 워크스페이스 보안 네트워크 서비스 개발자 플랫폼 지원 도움말 센터 고객 지원 커뮤니티 포럼 개발자 Discord 계정에 액세스할 수 없습니까? Cloudflare 상태 규제 준수 규제 준수 관련 자료 신뢰 GDPR 책임감 있는 AI 투명성 보고서 남용 신고하기 공공의 이익 Galileo 프로젝트 아테네 프로젝트 Cloudflare for Campaigns Fairshot 프로젝트 회사 Cloudflare 소개 네트워크 지도 Cloudflare 팀 로고 및 보도 자료 키트 다양성, 공정성, 포용성 영향/ESG © 2026 Cloudflare, Inc. 개인정보처리방침 사용 약관 보안 문제 보고 쿠키 기본 상표 | 2026-01-13T09:29:31 |
https://groovy.apache.org/download.html | The Apache Groovy™ programming language - Download Socialize Discuss on the mailing list Groovy on X Groovy on Bluesky Groovy on Mastodon Groovy on LinkedIn Events and conferences Source code on GitHub Report issues in Jira Stack Overflow questions Slack Community You are using an outdated browser. Please upgrade your browser to improve your experience. Apache Groovy™ Learn Documentation Download Support Contribute Ecosystem Blog posts Socialize Download Groovy™ Distributions OS/package manager install From your build tools System requirements Groovy version scheme Invoke dynamic support Release notes Improve this doc Download Groovy™ Download 5.0.3 Ways to get Apache Groovy™: Download a source or binary distribution . Use a package manager or bundle for your operating system . Refer to the appropriate Apache Groovy jars from your build tools . Grab the latest plugin for your IDE and follow the installation instructions. Find the latest source code in the Git repo (or the GitHub mirror ). If you're using Docker, Groovy is available on Docker Hub . Distributions Distributions are bundles of source or class files needed to build or use Groovy. All Apache projects provide a source zip which lets anyone build the software from scratch. If any doubt arises, you can regard the source zip as the authoritative artifact for each release. We also provide binary, downloadable documentation and SDK (combines src, binary and docs) convenience artifacts. You can also find a link to a non-ASF Windows installer convenience executable (if available). Verification We provide OpenPGP signatures ('.asc') files and checksums ('.sha256') for every release artifact. We recommend that you verify the integrity of downloaded files by generating your own checksums and matching them against ours and checking signatures using the KEYS file which contains the OpenPGP keys of Groovy's Release Managers across all releases. Newer releases have two sets of verification links. The dist labelled links are through the normal Apache distribution mechanism. The perm labelled links are through the Apache archive server. The latter of these won't change but may not be available for a short while (usually less than a day) after a release. Older releases are only available from the archive server. Groovy 5.0 Groovy 5.0 is the latest stable version of Groovy designed for JDK11+. 5.0.3 distributions binary (mirror) dist: asc sha256 perm: asc sha256 source asc sha256 documentation (mirror) dist: asc sha256 perm: asc sha256 SDK bundle (mirror) dist: asc sha256 perm: asc sha256 Windows installer (community artifact) Please consult the change log for details. Groovy 4.0 Groovy 4.0 is the previous stable version of Groovy designed for JDK8+ with much improved JPMS support. 4.0.29 distributions binary (mirror) dist: asc sha256 perm: asc sha256 source asc sha256 documentation (mirror) dist: asc sha256 perm: asc sha256 SDK bundle (mirror) dist: asc sha256 perm: asc sha256 Windows installer (community artifact) Please consult the change log for details. Groovy 3.0 Groovy 3.0 is an earlier version of Groovy still in widespread use and designed for JDK8+ with a new more flexible parser. 3.0.25 distributions binary (mirror) dist: asc sha256 perm: asc sha256 source asc sha256 documentation (mirror) dist: asc sha256 perm: asc sha256 SDK bundle (mirror) dist: asc sha256 perm: asc sha256 Windows installer (community artifact) Please consult the change log for details. Groovy 2.5 Groovy 2.5 is an earlier version of Groovy still in widespread use. We encourage users to upgrade from this version as we no longer support this version actively. 2.5.23 distributions binary (mirror) dist: asc sha256 perm: asc sha256 source asc sha256 documentation (mirror) dist: asc sha256 perm: asc sha256 SDK bundle (mirror) dist: asc sha256 perm: asc sha256 Windows installer (community artifact) Please consult the change log for details. Other versions Downloads for all versions are hosted (and mirrored) in: Apache's release mirrors and archive repository . Groovy's artifactory instance (includes pre-ASF versions). You can also read the changelogs for all versions . Invoke dynamic support Please read the invoke dynamic support information if you would like to enable indy support and are using Groovy on JDK 7+. Operating system/package manager installation Installing Apache Groovy from a distribution zip is not hard but if you don't want the hassle, consider the alternatives listed here. SDKMAN! is a tool for managing parallel versions of multiple Software Development Kits on most Unix-based systems: $ sdk install groovy Windows users: see the SDKMAN install instructions for potential options. Homebrew is "the missing package manager for macOS": $ brew install groovy SnapCraft is "the app store for Linux". Groovy is supported in the store or via the commandline: $ sudo snap install groovy --classic MacPorts is a system for managing tools on macOS: $ sudo port install groovy Scoop is a command-line installer for Windows inspired by Homebrew: > scoop install groovy Chocolatey provides a sane way to manage software on Windows: > choco install groovy Linux/*nix users: you may also find Groovy is available using your preferred operating system package manager, e.g.: apt, dpkg, pacman, etc. Windows users: consider also the Windows installer (see links above under Distributions). From your build tools If you wish to add Groovy as a dependency in your projects, you can refer to the Groovy JARs in the dependency section of your project build file descriptor: Gradle Maven Explanation Groovy versions 1.x to 3.x org.codehaus.groovy:groovy:x.y.z <groupId>org.codehaus.groovy</groupId> <artifactId>groovy</artifactId> <version>x.y.z</version> Just the core of Groovy without the modules*. Also includes jarjar'ed versions of Antlr, ASM, and an internal copy of needed CLI implementation classes. org.codehaus.groovy:groovy-$module:x.y.z <groupId>org.codehaus.groovy</groupId> <artifactId>groovy-$module</artifactId> <version>x.y.z</version> "$module" stands for the different optional groovy modules*. Example: <artifactId>groovy-sql</artifactId> . org.codehaus.groovy:groovy-all:x.y.z <groupId>org.codehaus.groovy</groupId> <artifactId>groovy-all</artifactId> <version>x.y.z</version> <type>pom</type> <!-- required JUST since Groovy 2.5.0 --> Core plus all of the modules (excluding optional modules) according to the version packaging scheme**. Groovy versions 4.0+ As above but use org.apache.groovy instead of org.codehaus.groovy . For groovy-bom when using Gradle 6+ use implementation platform('org.apache.groovy:groovy-bom:x.y.z') instead of implementation 'org.codehaus.groovy:groovy-bom:x.y.z' . * Modules: 2.4.X: "ant", "bsf", "console", "docgenerator", "groovydoc", "groovysh", "jmx", "json", "jsr223", "nio", "servlet", "sql", "swing", "test", "templates", "testng" and "xml" 2.5.0: as above but excluding optional module "bsf" plus "cli-picocli", "datetime", "macro", "test-junit5". Optional modules: "bsf", "dateutil", "cli-commons" 2.5.1+: as above but "groovy-jaxb" is moved to become optional 3.0.0+: as above but "groovy-yaml" is a new optional module 4.0.0+: as above but "groovy-contracts", "groovy-typecheckers" and "groovy-macro-library" are new optional modules, "groovy-jaxb" and "groovy-bsf" are no longer supported, "groovy-yaml" is now included in "groovy-all", and "groovy-testng" is now an optional module ** Packaging Scheme: 2.4.X: The core plus all the modules merged into one "fat jar". Optional dependencies are marked as optional, so you may need to include some of the optional dependencies to use some features of Groovy, e.g. AntBuilder, GroovyMBeans... 2.5+: A "fat pom" groovy-all-x.y.z.pom referring to the core plus all modules (excluding optional ones). In order to cater to the module system of Java 9+, the groovy-all-x.y.z.jar file is no longer available. Indy jars You can access the indy version of the core or a module jar by using the 'indy' classifier. Maven repositories Groovy version(s) Release Jars Groovy versions 1.x to 3.x Maven Central or Groovy artifactory release repository Groovy versions 4.x+ Maven Central or Groovy artifactory release repository Note for the development community: developers needing access to pre-release artifacts to assist with integration testing leading up to an official release should consult the appropriate developer documentation . System requirements Groovy JVM Required (non-indy) JVM Required (indy) * 5.0 (in alpha) N/A 11 4.0 N/A 1.8+ 3.0 1.8+ 1.8+ 2.5 - 2.6 1.7+ 1.7+ 2.3 - 2.4 1.6+ 1.7+ 2.0 - 2.2 1.5+ 1.7+ 1.6 - 1.8 1.5+ N/A 1.5 1.4+ N/A 1.0 1.4-1.7 N/A * If you plan to use invoke dynamic support, please read the support information . Groovy Learn Documentation Download Support Contribute Ecosystem Blog posts About Source code Security Books Thanks Sponsorship FAQ Search Socialize Discuss on the mailing list Groovy on X Groovy on Bluesky Groovy on Mastodon Groovy on LinkedIn Events and conferences Source code on GitHub Report issues in Jira Stack Overflow questions Slack Community The Groovy programming language is supported by the Apache Software Foundation and the Groovy community. Apache, Apache Groovy, Groovy, and the ASF logo are either registered trademarks or trademarks of The Apache Software Foundation. © 2003-2025 the Apache Groovy project — Groovy is Open Source: license , privacy policy . | 2026-01-13T09:29:31 |
http://www.chinadaily.com.cn/a/202601/13/WS6965e6a9a310d6866eb336e3.html | Traditional Chinese opera with a contemporary twist - Chinadaily.com.cn Search HOME CHINA WORLD BUSINESS LIFESTYLE CULTURE TRAVEL VIDEO SPORTS OPINION REGIONAL NEWSPAPER MOBILE Global Edition ASIA 中文 双语 Français HOME CHINA WORLD BUSINESS LIFESTYLE CULTURE TRAVEL VIDEO SPORTS OPINION REGIONAL NEWSPAPER China Daily PDF China Daily E-paper MOBILE Culture Art Music&Theater Film&TV Books Heritage Events&Festivals People Cultural Exchange Video Photo Home / Culture / Music and Theater Home Culture Music and Theater Traditional Chinese opera with a contemporary twist By Chen Nan | chinadaily.com.cn | Updated: 2026-01-13 14:30 Share Share - WeChat --> CLOSE The Black Box Xiqu Performance Season brings contemporary renditions of traditional Chinese opera. [Photo provided to chinadaily.com.cn] The 2025 Black Box Xiqu Performance Season wrapped up on Dec 31, which attracted nearly 10,000 audience members. Twenty-one theatrical productions highlighting traditional Chinese opera were staged in more than 60 shows, covering a variety of these valuable art forms, including Peking Opera, Kunqu Opera and Qinqiang Opera. In its 12th edition, the annual event typically runs for two months and is held at Start Theaters, one of Beijing's most popular small theaters. Since small theaters have become trendy venues for young people in urban areas, this event offers audiences the opportunity to experience traditional Chinese opera with a contemporary twist, with changes across everything from storytelling to music, stage design, and costumes. A series of lectures and workshops was also featured during the festival, giving visitors an immersive experience. The 2025 Black Box Xiqu Performance Season wrapped up on Dec 31 in Beijing. [Photo provided to chinadaily.com.cn] --> --> Related Stories Kunqu comes alive Where nature is shaped by hand Urban travelers seek pastoral peace A dream destination Where two rivers turn gold in a realm of wonder Photo Galloping toward the new Festive atmosphere, immersive cultural experience in North China ancient town Super idol rewrites the script Through the Seasons invites reflection and renewal China releases Year of the Horse stamps amid collector enthusiasm Dishing up dynasties Most Popular Editor's Picks Tracing China's origins Tales & Trails: Gansu Linxia — a vibrant civilization along the Yellow River Photo Gallery Galloping toward the new Festive atmosphere, immersive cultural experience in North China ancient town Super idol rewrites the script Video 2025 captivating Chinese screens Leaping into the dark Tracking Chinese cultural frontline in 2025 Special Coverage Global Mayors Dialogue · Dunhuang World Conference on China Studies Chinaculture.org Golf: China's ancient game? Xinjiang: A living tapestry of intangible cultural heritage Top BACK TO THE TOP English 中文 HOME CHINA WORLD BUSINESS LIFESTYLE CULTURE TRAVEL VIDEO SPORTS OPINION REGIONAL NEWSPAPER China Daily PDF China Daily E-paper MOBILE Copyright 1994 - . All rights reserved. The content (including but not limited to text, photo, multimedia information, etc) published in this site belongs to China Daily Information Co (CDIC). Without written authorization from CDIC, such content shall not be republished or used in any form. Note: Browsers with 1024*768 or higher resolution are suggested for this site. License for publishing multimedia online 0108263 Registration Number: 130349 About China Daily Advertise on Site Contact Us Job Offer Expat Employment FOLLOW US Copyright 1994 - . All rights reserved. The content (including but not limited to text, photo, multimedia information, etc) published in this site belongs to China Daily Information Co (CDIC). Without written authorization from CDIC, such content shall not be republished or used in any form. --> | 2026-01-13T09:29:31 |
https://www.chinadaily.com.cn/a/202504/04/WS67ef210ca3104d9fd381d98a.html | Qingming: Honor the past and welcome the new - Chinadaily.com.cn Search HOME CHINA WORLD BUSINESS LIFESTYLE CULTURE TRAVEL VIDEO SPORTS OPINION REGIONAL NEWSPAPER MOBILE Global Edition ASIA 中文 双语 Français HOME CHINA WORLD BUSINESS LIFESTYLE CULTURE TRAVEL VIDEO SPORTS OPINION REGIONAL NEWSPAPER China Daily PDF China Daily E-paper MOBILE Culture Art Music&Theater Film&TV Books Heritage Events&Festivals People Cultural Exchange Video Photo Home / Culture / 24 Solar Terms Home Culture 24 Solar Terms Qingming: Honor the past and welcome the new chinadaily.com.cn | Updated: 2025-04-04 08:00 Share Share - WeChat --> CLOSE At Qingming, we honor the past and welcome the new. As fine threads of gray kiss the ground with grace, souls in sorrow wander, lost in time's embrace. May the gentleness of Du Mu's poem "Qingming" soothe your heart, and life be as bright as the season's start. #CulturalJourney #24Solar Terms --> --> Related Stories Music project centered on 24 solar terms launched in Beijing Spring Equinox: Day and night aligned Awakening of Insects: All life unfolds Spring Rain: Nature's gentle gift 24 Solar Terms: 9 things you may not know about Start of Spring Photo Teahouse returns in tribute to a legendary director Forum discusses the healing power of fine arts Beijing's 798 district buzzing for first art and technology week Solar terms inspire artist to create a vivid, meditative world Symposium explores photography's role in preserving 20th-century architecture Rhapsody in blue Most Popular Editor's Picks Tales & Trails: Gansu Linxia — a vibrant civilization along the Yellow River The captivating odyssey of a Zhuang brocade artist Photo Gallery Teahouse returns in tribute to a legendary director Forum discusses the healing power of fine arts Beijing's 798 district buzzing for first art and technology week Video The Monkey King world premiere in San Francisco Ancient craft of New Year paintings thrives in Tianjin Currents carry history of capitals Special Coverage Global Mayors Dialogue · Dunhuang World Conference on China Studies Chinaculture.org Golf: China's ancient game? Xinjiang: A living tapestry of intangible cultural heritage Top BACK TO THE TOP English 中文 HOME CHINA WORLD BUSINESS LIFESTYLE CULTURE TRAVEL VIDEO SPORTS OPINION REGIONAL NEWSPAPER China Daily PDF China Daily E-paper MOBILE Copyright 1995 - . All rights reserved. The content (including but not limited to text, photo, multimedia information, etc) published in this site belongs to China Daily Information Co (CDIC). Without written authorization from CDIC, such content shall not be republished or used in any form. Note: Browsers with 1024*768 or higher resolution are suggested for this site. License for publishing multimedia online 0108263 Registration Number: 130349 About China Daily Advertise on Site Contact Us Job Offer Expat Employment FOLLOW US Copyright 1995 - . All rights reserved. The content (including but not limited to text, photo, multimedia information, etc) published in this site belongs to China Daily Information Co (CDIC). Without written authorization from CDIC, such content shall not be republished or used in any form. --> | 2026-01-13T09:29:31 |
https://ace.atlassian.com/blog/bevy-info-page-atlassian-sso-login/ | Login Changes | Atlassian Community Events Skip to main content Toggle Navigation Events Connect Atlassian Community Events Join a Chapter Community-led Conferences Online Community Connect with Orbiit Learn Community-Led Classes Company User Groups Earn an Atlassian Certification Become a Champion ACE Speakers Find an ACE Speaker Log in Login Changes Share on X Share on Facebook Share on LinkedIn Share on Pinterest Share via Email Crystal Pham | 2024-11-12T17:09:07+00:00 What’s Changed? In our continuous endeavor to enhance our processes and move towards unified profiles, we have updated the login procedure for ace.atlassian.com . From November 11, 2024 onwards, the ability to login with non-Atlassian accounts has been removed. Community members already using an Atlassian account to log in are unaffected . What’s the impact? You will not be able to log in and register for events if you are not using an Atlassian account. How do I know if my account is impacted by this/how do I know if I need to take action? If you utilized the bottom method in the image below (boxed in red ) to sign in to ace.atlassian.com , then you are impacted and will need to take action. If you utilized the top method in the image below (boxed in green ) to sign in to ace.atlassian.com , then you are not impacted and will not need to take any further action. I utilized the impacted sign-in method--what do I need to do? Create an Atlassian account (one-time action): Write down the email you utilized to log-in Click here to sign up for an Atlassian Account using the email that you wrote down--this will ensure that account details are merged and will allow for a seamless transition Log in with Atlassian: Once the Atlassian Account is created, you can then start using the new account to log into ace.atlassian.com I log into ace.atlassian.com using multiple accounts (an Atlassian account and a non-Atlassian account). How can I continue to access ace.atlassian.com with multiple Atlassian accounts? We recognize that some users would like to maintain and use separate accounts for ace.atlassian.com . The best way to continue to access ace.atlassian.com with multiple Atlassian accounts is to make use of incognito windows (launching an incognito window, navigating to ace.atlassian.com, and then signing in with whichever account you choose). Note that you will still need to create an Atlassian account for each email that you want to sign in with. We acknowledge that it isn’t the smoothest flow and are looking into the feasibility of implementing a better workflow in the future. About the Author Crystal Pham © 2026 Atlassian Community Events All Rights Reserved ∙ Events ∙ Contact Us ∙ Privacy Policy ∙ Terms and Conditions ∙ Notice at Collection | 2026-01-13T09:29:31 |
https://giantrabbit.com/our-work?client=myshakespeare | Our Work | Giant Rabbit Skip to main content Menu Close Main navigation Our Services Our Work About Us Strategy Design Development CRM Selection & Data Migration Fundraising & User Analytics Drupal 7 Upgrades to Backdrop CMS Project Rescues Managed Hosting Support & Maintenance Security  All Arts & Culture Education Environment Health Human Rights Social Justice Technology & Privacy  About Giant Rabbit The Team Jobs Contact Us  Our Work Our clients are fighting for public health, access to abortion, and LGBTQ+ rights. They're going to court on behalf of asylum-seekers and promoting human rights around the world. We support organizations that fight climate change, work for environmental conservation, and warn people about the risks of avalanches. Our clients are also working theaters, performing arts organizations, museums, and cultural institutions. Defending human rights at home and abroad. Partner Since 2018 Center for Gender and Refugee Studies Partner Since 2022 Family Violence Appellate Project Partner Since 2013 Front Line Defenders Partner Since 2022 Human Rights First Partner Since 2022 Justice Action Center Partner Since 2016 National Network of Abortion Funds (NNAF) Partner Since 2020 Observatory for the Protection of Human Rights Defenders Partner Since 2022 Youth Law Center Working toward a healthier future. Partner Since 2019 American Academy of Pediatrics California Chapter 1 Partner Since 2022 Advancing New Standards in Reproductive Health (ANSIRH) Partner Since 2023 Beyond the Pill Partner Since 2015 Cutaneous Lymphoma Foundation Partner Since 2020 Farmers Market Coalition Partner Since 2021 HealthRIGHT 360 Partner Since 2019 Ibis Reproductive Health Services Partner Since 2020 Mandela Partners Protecting the environment and fighting climate change. Partner From 2022 To 2023 Audubon Canyon Ranch Partner Since 2017 Ecology Center Partner Since 2014 Edible Schoolyard Project Partner Since 2007 eLock Technologies Partner Since 2022 Environmental Grantmakers Association Partner Since 2019 Highstead Partner Since 2020 John Muir Land Trust Partner Since 2022 Just Zero Partner Since 2014 Leave No Trace Partner Since 2020 Northwest Avalanche Center (NWAC) Partner Since 2023 One Tree Planted Partner Since 2021 Payette Avalanche Center Partner Since 2022 Sempervirens Partner Since 2019 Sierra Avalanche Center Partner Since 2014 The Trust For Public Land Partner Since 2022 Utah Avalanche Center Working for social and economic justice for all. Partner Since 2021 A New Way of Life Partner Since 2022 Center for Constitutional Rights Partner Since 2021 Center for WorkLife Law Partner Since 2021 Common Cause Partner Since 2010 CompassPoint Partner Since 2021 Equality Action Center Partner Since 2018 Keshet Partner Since 2024 Labor Notes Partner Since 2022 Legal Link Partner Since 2022 Mirror Memoirs Partner Since 2013 Unbound Philanthropy Partner Since 2018 Migrant Justice Building connection through arts, culture, and food. Partner Since 2013 18 Reasons Partner Since 2021 Artists Communities Alliance Partner Since 2019 Authors Alliance Partner Since 2018 Company One Theatre Partner Since 2017 Howlround Theatre Commons Partner Since 2023 Lighthouse Writers Workshop Partner Since 2023 Museo de las Americas Partner Since 2013 Sacred Lands Film Project Improving the quality and accessibility of education. Partner Since 2022 Academy College Prep Partner From 2017 To 2022 Bellwether Education Partner Since 2020 California Community Colleges Transfer Guarantee Pathway to Historically Black Colleges and Universities Partner From 2019 To 2020 The College of Business at Oregon State University Partner Since 2011 Ignited Partner From 2018 To 2022 Maker Ed Partner Since 2014 myShakespeare Partner Since 2019 Umoja Community Education Foundation Using technology for good and defending digital rights and privacy. Partner Since 2014 Electronic Frontier Foundation Partner Since 2019 FreeBSD Foundation Partner From 2015 To 2016 Internet Archive Partner Since 2012 Society of Motion Picture & Television Engineers (SMPTE) Partner From 2013 To 2021 The TOR Project Partner Since 2014 USENIX Partner Since 2020 Women's Audio Mission Partner From 2013 To 2015 Wikimedia Foundation Non-profit Sectors Human Rights Health Environment Social Justice Arts & Culture Education Technology & Privacy ❮ How can we help? Get in touch Giant Rabbit LLC 415.355.4211 info@giantrabbit.com Copyright © 2018-2025 by Giant Rabbit LLC. Artwork by RBlack . | Read our privacy policy . | 2026-01-13T09:29:31 |
http://www.chinadaily.com.cn/a/202601/08/WS695ecde1a310d6866eb3289b.html | Super idol rewrites the script - Chinadaily.com.cn Search HOME CHINA WORLD BUSINESS LIFESTYLE CULTURE TRAVEL WATCHTHIS SPORTS OPINION REGIONAL FORUM NEWSPAPER MOBILE Home Culture Film and TV Home / Culture / Film and TV Super idol rewrites the script Seeking better work-life balance, multi-talented celebrity with nearly 42 million Weibo followers broadcasts his relationship with nature and climbing, Xing Wen reports. By Xing Wen | China Daily | Updated: 2026-01-08 05:19 Share Share - WeChat --> CLOSE Popular idol Wang Yibo has found a sense of work-life balance by immersing himself in mountains and on rocky terrain, starring in documentary Exploring the Unknown with Wang Yibo . [Photo provided to China Daily] For China's 28-year-old super idol, Wang Yibo, the rhythm of life has long been set to the relentless beat of the entertainment industry — counted in takes, tracks, and flashbulbs. "I worked so much that I had almost no life of my own," he reflects. Born in Luoyang, Henan province, Wang began learning street dancing at a very young age, which later led him to become a member of a popular boy group. Over the past decade, he has taken on various roles: TV variety show host, dance mentor on talent shows, actor, singer, and professional motorcycle racer, all of which have cemented his status as one of the country's most sought-after idols, with nearly 42 million followers on Sina Weibo. But in recent years, he decided to rewrite the script. --> 1 2 3 4 5 6 7 8 Next >>| --> 1/8 Next Photo What Chinese modernization means for the world Eyeing China's high-tech vision Polished inbound tourism sector sparkles brightly again Colombian commentator: US the real pirates of the Caribbean Residents rebuild lives a year after Xizang quake New Year holiday sees strong growth in travel, consumption --> Related Stories China's cultural creativity code High stakes in short takes: Micro-drama industry levels up iQIYI LAND Yangzhou set to open on Feb 8 Celebrating New Year in the cinemas New thriller continues Sam Quah's crime franchise --> Top BACK TO THE TOP English 中文 HOME CHINA WORLD BUSINESS LIFESTYLE CULTURE TRAVEL VIDEO SPORTS OPINION REGIONAL NEWSPAPER China Daily PDF China Daily E-paper MOBILE Copyright 1994 - . All rights reserved. The content (including but not limited to text, photo, multimedia information, etc) published in this site belongs to China Daily Information Co (CDIC). Without written authorization from CDIC, such content shall not be republished or used in any form. Note: Browsers with 1024*768 or higher resolution are suggested for this site. License for publishing multimedia online 0108263 Registration Number: 130349 About China Daily Advertise on Site Contact Us Job Offer Expat Employment FOLLOW US Copyright 1994 - . All rights reserved. The content (including but not limited to text, photo, multimedia information, etc) published in this site belongs to China Daily Information Co (CDIC). Without written authorization from CDIC, such content shall not be republished or used in any form. --> | 2026-01-13T09:29:31 |
https://giantrabbit.com/our-work?client=utah-avalanche-center | Our Work | Giant Rabbit Skip to main content Menu Close Main navigation Our Services Our Work About Us Strategy Design Development CRM Selection & Data Migration Fundraising & User Analytics Drupal 7 Upgrades to Backdrop CMS Project Rescues Managed Hosting Support & Maintenance Security  All Arts & Culture Education Environment Health Human Rights Social Justice Technology & Privacy  About Giant Rabbit The Team Jobs Contact Us  Our Work Our clients are fighting for public health, access to abortion, and LGBTQ+ rights. They're going to court on behalf of asylum-seekers and promoting human rights around the world. We support organizations that fight climate change, work for environmental conservation, and warn people about the risks of avalanches. Our clients are also working theaters, performing arts organizations, museums, and cultural institutions. Defending human rights at home and abroad. Partner Since 2018 Center for Gender and Refugee Studies Partner Since 2022 Family Violence Appellate Project Partner Since 2013 Front Line Defenders Partner Since 2022 Human Rights First Partner Since 2022 Justice Action Center Partner Since 2016 National Network of Abortion Funds (NNAF) Partner Since 2020 Observatory for the Protection of Human Rights Defenders Partner Since 2022 Youth Law Center Working toward a healthier future. Partner Since 2019 American Academy of Pediatrics California Chapter 1 Partner Since 2022 Advancing New Standards in Reproductive Health (ANSIRH) Partner Since 2023 Beyond the Pill Partner Since 2015 Cutaneous Lymphoma Foundation Partner Since 2020 Farmers Market Coalition Partner Since 2021 HealthRIGHT 360 Partner Since 2019 Ibis Reproductive Health Services Partner Since 2020 Mandela Partners Protecting the environment and fighting climate change. Partner From 2022 To 2023 Audubon Canyon Ranch Partner Since 2017 Ecology Center Partner Since 2014 Edible Schoolyard Project Partner Since 2007 eLock Technologies Partner Since 2022 Environmental Grantmakers Association Partner Since 2019 Highstead Partner Since 2020 John Muir Land Trust Partner Since 2022 Just Zero Partner Since 2014 Leave No Trace Partner Since 2020 Northwest Avalanche Center (NWAC) Partner Since 2023 One Tree Planted Partner Since 2021 Payette Avalanche Center Partner Since 2022 Sempervirens Partner Since 2019 Sierra Avalanche Center Partner Since 2014 The Trust For Public Land Partner Since 2022 Utah Avalanche Center Working for social and economic justice for all. Partner Since 2021 A New Way of Life Partner Since 2022 Center for Constitutional Rights Partner Since 2021 Center for WorkLife Law Partner Since 2021 Common Cause Partner Since 2010 CompassPoint Partner Since 2021 Equality Action Center Partner Since 2018 Keshet Partner Since 2024 Labor Notes Partner Since 2022 Legal Link Partner Since 2022 Mirror Memoirs Partner Since 2013 Unbound Philanthropy Partner Since 2018 Migrant Justice Building connection through arts, culture, and food. Partner Since 2013 18 Reasons Partner Since 2021 Artists Communities Alliance Partner Since 2019 Authors Alliance Partner Since 2018 Company One Theatre Partner Since 2017 Howlround Theatre Commons Partner Since 2023 Lighthouse Writers Workshop Partner Since 2023 Museo de las Americas Partner Since 2013 Sacred Lands Film Project Improving the quality and accessibility of education. Partner Since 2022 Academy College Prep Partner From 2017 To 2022 Bellwether Education Partner Since 2020 California Community Colleges Transfer Guarantee Pathway to Historically Black Colleges and Universities Partner From 2019 To 2020 The College of Business at Oregon State University Partner Since 2011 Ignited Partner From 2018 To 2022 Maker Ed Partner Since 2014 myShakespeare Partner Since 2019 Umoja Community Education Foundation Using technology for good and defending digital rights and privacy. Partner Since 2014 Electronic Frontier Foundation Partner Since 2019 FreeBSD Foundation Partner From 2015 To 2016 Internet Archive Partner Since 2012 Society of Motion Picture & Television Engineers (SMPTE) Partner From 2013 To 2021 The TOR Project Partner Since 2014 USENIX Partner Since 2020 Women's Audio Mission Partner From 2013 To 2015 Wikimedia Foundation Non-profit Sectors Human Rights Health Environment Social Justice Arts & Culture Education Technology & Privacy ❮ How can we help? Get in touch Giant Rabbit LLC 415.355.4211 info@giantrabbit.com Copyright © 2018-2025 by Giant Rabbit LLC. Artwork by RBlack . | Read our privacy policy . | 2026-01-13T09:29:31 |
https://docs.aws.amazon.com/fr_fr/cost-management/latest/userguide/ce-advanced-cost-analysis.html | Exploration de données supplémentaires pour une analyse avancée des coûts - AWS Gestion des coûts Exploration de données supplémentaires pour une analyse avancée des coûts - AWS Gestion des coûts Documentation AWS Billing and Cost Management Guide de l’utilisateur Les traductions sont fournies par des outils de traduction automatique. En cas de conflit entre le contenu d'une traduction et celui de la version originale en anglais, la version anglaise prévaudra. Exploration de données supplémentaires pour une analyse avancée des coûts Cost Explorer fournit des données sur les AWS coûts et l'utilisation pour le mois en cours et pour les 13 mois précédents, selon une granularité quotidienne et mensuelle. Vous pouvez interroger ces données dans la console ou à l'aide de l'API Cost Explorer. Vous pouvez activer les données pluriannuelles (avec une granularité mensuelle) et des données plus détaillées (avec une granularité horaire et quotidienne) pour les 14 jours précédents. Une fois activée, vous pouvez utiliser ces données dans la console ou à l'aide de l'API Cost Explorer. Rubriques Données pluriannuelles avec granularité mensuelle Données granulaires Comprendre le résumé de votre consommation mensuelle estimée Configuration de données pluriannuelles et granulaires JavaScript est désactivé ou n'est pas disponible dans votre navigateur. Pour que vous puissiez utiliser la documentation AWS, Javascript doit être activé. Vous trouverez des instructions sur les pages d'aide de votre navigateur. Conventions de rédaction Réalisation d'une comparaison des coûts Données pluriannuelles avec granularité mensuelle Cette page vous a-t-elle été utile ? - Oui Merci de nous avoir fait part de votre satisfaction. Si vous avez quelques minutes à nous consacrer, merci de nous indiquer ce qui vous a plu afin que nous puissions nous améliorer davantage. Cette page vous a-t-elle été utile ? - Non Merci de nous avoir avertis que cette page avait besoin d'être retravaillée. Nous sommes désolés de ne pas avoir répondu à vos attentes. Si vous avez quelques minutes à nous consacrer, merci de nous indiquer comment nous pourrions améliorer cette documentation. | 2026-01-13T09:29:31 |
https://l.facebook.com/l.php?u=https%3A%2F%2Fwww.instagram.com%2F&h=AT3WKgsdhqL0lr5L-Nnc8P1Nxk_o6U845c_QB5N5wK1lNBCiJE3WsP5ZVFe0Wx_dnxDRxHtiDQgsUFyc3mPc93Q6dYbacIjrXgEOzXveszc5CTu2gasSez-_l_PnkKaxzXvrvWpGP6iZOz7G | Facebook Facebook 이메일 또는 휴대폰 비밀번호 계정을 잊으셨나요? 새 계정 만들기 일시적으로 차단됨 일시적으로 차단됨 회원님의 이 기능 사용 속도가 너무 빠른 것 같습니다. 이 기능 사용에서 일시적으로 차단되었습니다. Back 한국어 English (US) Tiếng Việt Bahasa Indonesia ภาษาไทย Español 中文(简体) 日本語 Português (Brasil) Français (France) Deutsch 가입하기 로그인 Messenger Facebook Lite 동영상 Meta Pay Meta 스토어 Meta Quest Ray-Ban Meta Meta AI Meta AI 콘텐츠 더 보기 Instagram Threads 투표 정보 센터 개인정보처리방침 개인정보 보호 센터 정보 광고 만들기 페이지 만들기 개발자 채용 정보 쿠키 AdChoices 이용 약관 고객 센터 연락처 업로드 및 비사용자 설정 활동 로그 Meta © 2026 | 2026-01-13T09:29:31 |
https://www.chinadaily.com.cn/culture/editorspick | Editor's Picks - Chinadaily.com.cn Search HOME CHINA WORLD BUSINESS LIFESTYLE CULTURE TRAVEL VIDEO SPORTS OPINION REGIONAL NEWSPAPER MOBILE Global Edition ASIA 中文 双语 Français HOME CHINA WORLD BUSINESS LIFESTYLE CULTURE TRAVEL VIDEO SPORTS OPINION REGIONAL NEWSPAPER China Daily PDF China Daily E-paper MOBILE Culture Art Music&Theater Film&TV Books Heritage Events&Festivals People Cultural Exchange Video Photo Home Culture Editor's Picks Home / Culture / Editor's Picks Record year propels China's animated film industry onto global stage 2025-12-30 07:56 Tracing China's origins 2025-12-25 07:30 A cultural code - The Digital Reach of Sanxingdui 2025-12-17 10:47 'New Youth' legacy: A bridge for global dialogue 2025-11-26 15:02 Tales & Trails: Gansu Linxia — a vibrant civilization along the Yellow River 2025-11-25 17:04 The captivating odyssey of a Zhuang brocade artist 2025-11-20 15:36 When modern fashion embraces Chinese aesthetics 2025-11-05 09:16 Elegance and aroma: Festive costume in Ming Dynasty style 2025-10-31 09:14 Tales and Trails: A fusion of many facets in Fuzhou 2025-10-30 08:50 Liu Cixin on a decade of The Three-Body Problem's journey overseas 2025-09-29 09:49 Tales & Trails: Discover Hainan's tropical diversity 2025-09-25 09:21 Weaving a decorative history 2025-09-22 10:14 Cai Zhisong gallery bridges cultures in Shanghai 2025-09-16 15:37 Tales & Trails: Ulaanqab's timeless symphony of volcanoes and grasslands 2025-07-30 16:31 Tales & Trails: Hohhot — where urban life meets grassland melodies 2025-07-30 15:52 Tracking the past, present and future 2025-07-30 11:49 Chinese tea culture: Harmony in diversity 2025-07-04 11:16 Tales & Trails: Discover Yichang, gateway to the Three Gorges 2025-06-25 17:02 Watch it again: Adventures on Dragon Boat Festival 2025 2025-05-30 10:20 Dragon Boat Festival: Why do people eat 'zongzi'? 2025-05-28 10:00 1 2 3 4 5 6 7 8 9 10 Next >>| 1/19 Next Most Popular Editor's Picks Tracing China's origins Tales & Trails: Gansu Linxia — a vibrant civilization along the Yellow River Photo Gallery Exhibition highlights artists' vivid devotion to colors Galloping toward the new Festive atmosphere, immersive cultural experience in North China ancient town Video 2025 captivating Chinese screens Leaping into the dark Tracking Chinese cultural frontline in 2025 Special Coverage Global Mayors Dialogue · Dunhuang World Conference on China Studies Chinaculture.org Golf: China's ancient game? Xinjiang: A living tapestry of intangible cultural heritage Top BACK TO THE TOP English 中文 HOME CHINA WORLD BUSINESS LIFESTYLE CULTURE TRAVEL VIDEO SPORTS OPINION REGIONAL NEWSPAPER China Daily PDF China Daily E-paper MOBILE Copyright 1994 - . All rights reserved. The content (including but not limited to text, photo, multimedia information, etc) published in this site belongs to China Daily Information Co (CDIC). Without written authorization from CDIC, such content shall not be republished or used in any form. Note: Browsers with 1024*768 or higher resolution are suggested for this site. License for publishing multimedia online 0108263 Registration Number: 130349 About China Daily Advertise on Site Contact Us Job Offer Expat Employment FOLLOW US Copyright 1994 - . All rights reserved. The content (including but not limited to text, photo, multimedia information, etc) published in this site belongs to China Daily Information Co (CDIC). Without written authorization from CDIC, such content shall not be republished or used in any form. -->   | 2026-01-13T09:29:31 |
https://ace.atlassian.com/events/ | Events | Atlassian Community Events Skip to main content Toggle Navigation Events Connect Atlassian Community Events Join a Chapter Community-led Conferences Online Community Connect with Orbiit Learn Community-Led Classes Company User Groups Earn an Atlassian Certification Become a Champion ACE Speakers Find an ACE Speaker Log in Upcoming events See the list below to register for an Atlassian community event! © 2026 Atlassian Community Events All Rights Reserved ∙ Events ∙ Contact Us ∙ Privacy Policy ∙ Terms and Conditions ∙ Notice at Collection | 2026-01-13T09:29:31 |
https://ace.atlassian.com/search | Search Results | Atlassian Community Events Skip to main content Toggle Navigation Events Connect Atlassian Community Events Join a Chapter Community-led Conferences Online Community Connect with Orbiit Learn Community-Led Classes Company User Groups Earn an Atlassian Certification Become a Champion ACE Speakers Find an ACE Speaker Log in © 2026 Atlassian Community Events All Rights Reserved ∙ Events ∙ Contact Us ∙ Privacy Policy ∙ Terms and Conditions ∙ Notice at Collection | 2026-01-13T09:29:31 |
https://docs.aws.amazon.com/fr_fr/cost-management/latest/userguide/ce-enable.html | Activation de Cost Explorer - AWS Gestion des coûts Activation de Cost Explorer - AWS Gestion des coûts Documentation AWS Billing and Cost Management Guide de l’utilisateur Les traductions sont fournies par des outils de traduction automatique. En cas de conflit entre le contenu d'une traduction et celui de la version originale en anglais, la version anglaise prévaudra. Activation de Cost Explorer Vous pouvez activer Cost Explorer pour votre compte en ouvrant Cost Explorer pour la première fois dans la console AWS Cost Management. Vous ne pouvez pas activer Cost Explorer à l'aide de l'API. Après avoir activé Cost Explorer, AWS prépare les données relatives à vos coûts pour le mois en cours et les 13 mois précédents, puis calcule les prévisions pour les 12 prochains mois. Vous pourrez consulter les données du mois en cours sous 24 heures environ. Quelques jours supplémentaires sont nécessaires pour les autres données. Cost Explorer met à jour vos données de coût au moins une fois toutes les 24 heures. Dans le cadre du processus d'activation de Cost Explorer, configure AWS automatiquement la détection des anomalies de coûts pour votre compte. La détection des anomalies de coûts est une fonctionnalité de gestion des AWS coûts. Cette fonctionnalité utilise des modèles d'apprentissage automatique pour détecter et signaler les modèles de dépenses anormaux dans votre déploiement Services AWS. Pour commencer à utiliser la détection des anomalies de coûts, AWS configurez un Services AWS moniteur et un abonnement aux alertes récapitulatives quotidiennes. Vous êtes alerté de toute dépense anormale dépassant 100$ et 40 % des dépenses prévues sur la majorité de vos Services AWS comptes. Pour plus d'informations, consultez les sections Limitations et Détection des dépenses inhabituelles grâce à la détection des anomalies de AWS coût . Note Vous pouvez désactiver la détection des anomalies de coûts à tout moment. Pour plus d'informations, consultez la section Désactivation de la détection des anomalies de coûts . Vous pouvez lancer Cost Explorer si votre compte est un compte membre d'une organisation où le compte de gestion a activé Cost Explorer. Sachez que le compte de gestion de votre organisation peut également refuser l'accès à votre compte. Pour plus d’informations, consultez Facturation consolidée dans le AWS Organizations . Note Le statut d'un compte au sein d'une organisation détermine les données de coût et d'utilisation visibles : Un compte autonome rejoint une organisation. Ensuite, le compte ne peut plus accéder aux données de coûts et d'utilisation lorsqu'il était un compte autonome. Un compte membre quitte une organisation pour devenir un compte autonome. Ensuite, le compte ne peut plus accéder aux données relatives aux coûts et à l'utilisation lorsqu'il était membre de l'organisation. Le compte ne peut accéder qu'aux données générées en tant que compte autonome. Un compte membre quitte l'organisation A pour rejoindre l'organisation B. Ensuite, le compte ne peut plus accéder aux données relatives aux coûts et à l'utilisation lorsqu'il était membre de l'organisation A. Le compte ne peut accéder qu'aux données générées en tant que membre de l'organisation B. Un compte rejoint une organisation à laquelle il appartenait auparavant. Ensuite, le compte a de nouveau accès à ses données historiques de coût et d'utilisation. L'inscription pour recevoir les rapports sur les AWS coûts et l'utilisation ou le rapport de facturation détaillé n'active pas automatiquement Cost Explorer. Pour ce faire, suivez cette procédure. Pour s'inscrire à Cost Explorer Ouvrez la console Billing and Cost Management à l'adresse https://console.aws.amazon.com/costmanagement/ . Dans le panneau de navigation, choisissez Cost Explorer . Sur la page Bienvenue dans Cost Explorer , sélectionnez Launch Cost Explorer (Lancer Cost Explorer). Pour en savoir plus sur le contrôle de l'accès à Cost Explorer, consultez Contrôle de l'accès à Cost Explorer . JavaScript est désactivé ou n'est pas disponible dans votre navigateur. Pour que vous puissiez utiliser la documentation AWS, Javascript doit être activé. Vous trouverez des instructions sur les pages d'aide de votre navigateur. Conventions de rédaction Analyse de vos coûts et de votre utilisation avec AWS Cost Explorer Contrôle de l'accès à Cost Explorer Cette page vous a-t-elle été utile ? - Oui Merci de nous avoir fait part de votre satisfaction. Si vous avez quelques minutes à nous consacrer, merci de nous indiquer ce qui vous a plu afin que nous puissions nous améliorer davantage. Cette page vous a-t-elle été utile ? - Non Merci de nous avoir avertis que cette page avait besoin d'être retravaillée. Nous sommes désolés de ne pas avoir répondu à vos attentes. Si vous avez quelques minutes à nous consacrer, merci de nous indiquer comment nous pourrions améliorer cette documentation. | 2026-01-13T09:29:31 |
https://docs.aws.amazon.com/fr_fr/cost-management/latest/userguide/ce-api.html | Utilisation de l'API AWS Cost Explorer - AWS Gestion des coûts Utilisation de l'API AWS Cost Explorer - AWS Gestion des coûts Documentation AWS Billing and Cost Management Guide de l’utilisateur Point de terminaison de service Octroi d'autorisations IAM pour utiliser l'API AWS Cost Explorer Les traductions sont fournies par des outils de traduction automatique. En cas de conflit entre le contenu d'une traduction et celui de la version originale en anglais, la version anglaise prévaudra. Utilisation de l'API AWS Cost Explorer L'API Cost Explorer vous permet d'interroger par programmation vos données de coût et d'utilisation. Vous pouvez interroger des données regroupées, comme les coûts mensuels totaux ou l'utilisation quotidienne totale. Vous pouvez également interroger des données granulaires, comme le nombre d'opérations d'écriture quotidiennes pour les tables de base de données DynamoDB dans votre environnement de production. Si vous utilisez un langage de programmation qui AWS fournit un SDK pour, nous vous recommandons d'utiliser le SDK. Tous ces AWS SDKs outils simplifient considérablement le processus de signature des demandes et vous font gagner un temps considérable par rapport à l'utilisation de l'API AWS Cost Explorer. En outre, ils SDKs s'intègrent facilement à votre environnement de développement et fournissent un accès facile aux commandes associées. Pour plus d'informations sur les options disponibles SDKs, consultez la section Outils pour Amazon Web Services . Pour plus d'informations sur l'API AWS Cost Explorer, consultez la référence de l'AWS Billing and Cost Management API . Point de terminaison de service L'API Cost Explorer fournit le point de terminaison suivant : https://ce.us-east-1.amazonaws.com Octroi d'autorisations IAM pour utiliser l'API AWS Cost Explorer Un utilisateur doit disposer d'une autorisation explicite pour interroger l'API AWS Cost Explorer. Pour connaître la politique qui accorde les autorisations nécessaires à un utilisateur, consultez Affichage des coûts et de l'utilisation . JavaScript est désactivé ou n'est pas disponible dans votre navigateur. Pour que vous puissiez utiliser la documentation AWS, Javascript doit être activé. Vous trouverez des instructions sur les pages d'aide de votre navigateur. Conventions de rédaction Contrôle de l'accès à l'aide d'IAM Bonnes pratiques pour l'API AWS Cost Explorer Cette page vous a-t-elle été utile ? - Oui Merci de nous avoir fait part de votre satisfaction. Si vous avez quelques minutes à nous consacrer, merci de nous indiquer ce qui vous a plu afin que nous puissions nous améliorer davantage. Cette page vous a-t-elle été utile ? - Non Merci de nous avoir avertis que cette page avait besoin d'être retravaillée. Nous sommes désolés de ne pas avoir répondu à vos attentes. Si vous avez quelques minutes à nous consacrer, merci de nous indiquer comment nous pourrions améliorer cette documentation. | 2026-01-13T09:29:31 |
https://www.atlassian.com/fr/teams/nonprofits | Work management and collaboration tools for nonprofits | Atlassian Close Afficher cette page dans votre langue ? Toutes les langues Sélectionner votre langue 中文 Deutsch English Español Français Italiano 한국어 Nederlands 日本語 Português Pусский Polski Associations à but non lucratif Éligibilité et tarifs Programmes de support Ressources Plus + Moins - Back Les start-ups éligibles peuvent accéder à l'édition Premium de nos produits pour 0 dollars pendant 12 mois, pour un maximum de 50 utilisateurs. Les Conditions générales s'appliquent . En savoir plus ATLASSIAN FOR NONPROFITS Achieve greater impact together Get deep discounts on Atlassian apps and free support for your nonprofit and social enterprise team. Apply now Get 75% off Atlassian’s teamwork tools We support nonprofit organizations that are non-governmental, non-commercial in nature, and non-political with 75% off Atlassian Cloud products. See eligibility Apply now Fan-favorite tools for nonprofits Jira Confluence Trello Jira Confluence Trello Manage, deliver, and report work your way Jira Manage complex projects across your entire organization — programs, operations, fundraising, and service delivery – to achieve impactful, cross-functional initiatives. Use quick-start Jira templates to: Manage grant funding Plan nonprofit programs Try Jira Manage, deliver, and report work your way Jira Manage complex projects across your entire organization — programs, operations, fundraising, and service delivery – to achieve impactful, cross-functional initiatives. Use quick-start Jira templates to: Manage grant funding Plan nonprofit programs Try Jira Manage, deliver, and report work your way Confluence Build clear, collaborative pages and whiteboards to keep progress moving forward even as teams and collaborators change. Pages are easy to find and secure to share with external volunteers, and partners. Use quick-start Confluence templates to: Develop, launch, and manage your programs Develop your strategy Try Confluence Manage, deliver, and report work your way Confluence Build clear, collaborative pages and whiteboards to keep progress moving forward even as teams and collaborators change. Pages are easy to find and secure to share with external volunteers, and partners. Use quick-start Confluence templates to: Develop, launch, and manage your programs Develop your strategy Try Confluence Manage, deliver, and report work your way Loom Record videos to bring clarity and context to your work that docs, emails, and messages alone often miss — the benefits of human sharing without requiring mandatory meetings. Watch a demo: Loom for Nonprofits Try Trello Manage, deliver, and report work your way Loom Record videos to bring clarity and context to your work that docs, emails, and messages alone often miss — the benefits of human sharing without requiring mandatory meetings. Watch a demo: Loom for Nonprofits Try Trello 50 licences pour 0 $ Maximize your nonprofit Community License and get a discount on multiple apps. Jira Service Management Create service desks, manage requests, and automate support. Jira Product Discovery Capture and prioritize ideas and align everyone with product roadmaps. Bitbucket Ship quality code and automate deployments with built-in CI/CD. Rovo Act on organizational knowledge with human-AI collaboration. Trello Boost personal productivity by keeping your individual tasks organized. Integrate with tools you already love Supercharge collaboration and bring Atlassian into how your team works with best-in-class integrations and apps. Explore integrations The most successful nonprofit teams innovate how they work 6.5x Nonprofit teams that are in control of their workdays are 6.5x more likely to be adaptable to change 8.7x When nonprofit teams have processes to identify top work priorities , they are 8.7x more likely to be adaptable to change Join the 13,000+ nonprofits and social enterprises using Atlassian tools to achieve impact that’s impossible alone 1/3 “Atlassian has been a game changer because it allows us to focus our time and effort on furthering our mission rather than searching for information.” Kiva 2/3 “We can’t waste time sending things over email and later trying to find those emails or tasks when it comes to life-saving, life-impacting information for communities. Atlassian helps our conversations and execution be seamless and efficient.” UNICEF 3/3 “We do not make a profit from the work that we do. Without Atlassian, our team would not be able to grow to the size we are today and serve over 1,000,000 smallholder farmers every year.” One Acre Fund ← → Atlassian Foundation The Atlassian Foundation's mission is to unleash the potential of social impact teams - particularly teams changing lives through education. Atlassian contributes 1% of its equity, profit, employee time and products to the Atlassian Foundation to do good on a global scale and in our own backyards. Learn more Entreprise Carrières Événements Blogs Relations avec les investisseurs Atlassian Foundation Kit pour la presse Nous contacter Index de l'égalité professionnelle produits Rovo Jira Jira Align Jira Service Management Confluence Loom Trello Bitbucket Voir tous les produits Ressources Support technique Achats et licences Communauté Atlassian Base de connaissances Marketplace Mon compte Créer un ticket de support Apprendre Partenaires Formation et certification Documentation Ressources développeurs Services Enterprise Découvrir toutes les ressources Copyright © 2025 Atlassian Politique de confidentialité Conditions Mentions légales Choisir la langue Deutsch English Español Français Italiano 한국어 Nederlands 日本語 Polski Português русский 中文 | 2026-01-13T09:29:31 |
https://giantrabbit.com/our-work?client=lighthouse-writers-workshop | Our Work | Giant Rabbit Skip to main content Menu Close Main navigation Our Services Our Work About Us Strategy Design Development CRM Selection & Data Migration Fundraising & User Analytics Drupal 7 Upgrades to Backdrop CMS Project Rescues Managed Hosting Support & Maintenance Security  All Arts & Culture Education Environment Health Human Rights Social Justice Technology & Privacy  About Giant Rabbit The Team Jobs Contact Us  Our Work Our clients are fighting for public health, access to abortion, and LGBTQ+ rights. They're going to court on behalf of asylum-seekers and promoting human rights around the world. We support organizations that fight climate change, work for environmental conservation, and warn people about the risks of avalanches. Our clients are also working theaters, performing arts organizations, museums, and cultural institutions. Defending human rights at home and abroad. Partner Since 2018 Center for Gender and Refugee Studies Partner Since 2022 Family Violence Appellate Project Partner Since 2013 Front Line Defenders Partner Since 2022 Human Rights First Partner Since 2022 Justice Action Center Partner Since 2016 National Network of Abortion Funds (NNAF) Partner Since 2020 Observatory for the Protection of Human Rights Defenders Partner Since 2022 Youth Law Center Working toward a healthier future. Partner Since 2019 American Academy of Pediatrics California Chapter 1 Partner Since 2022 Advancing New Standards in Reproductive Health (ANSIRH) Partner Since 2023 Beyond the Pill Partner Since 2015 Cutaneous Lymphoma Foundation Partner Since 2020 Farmers Market Coalition Partner Since 2021 HealthRIGHT 360 Partner Since 2019 Ibis Reproductive Health Services Partner Since 2020 Mandela Partners Protecting the environment and fighting climate change. Partner From 2022 To 2023 Audubon Canyon Ranch Partner Since 2017 Ecology Center Partner Since 2014 Edible Schoolyard Project Partner Since 2007 eLock Technologies Partner Since 2022 Environmental Grantmakers Association Partner Since 2019 Highstead Partner Since 2020 John Muir Land Trust Partner Since 2022 Just Zero Partner Since 2014 Leave No Trace Partner Since 2020 Northwest Avalanche Center (NWAC) Partner Since 2023 One Tree Planted Partner Since 2021 Payette Avalanche Center Partner Since 2022 Sempervirens Partner Since 2019 Sierra Avalanche Center Partner Since 2014 The Trust For Public Land Partner Since 2022 Utah Avalanche Center Working for social and economic justice for all. Partner Since 2021 A New Way of Life Partner Since 2022 Center for Constitutional Rights Partner Since 2021 Center for WorkLife Law Partner Since 2021 Common Cause Partner Since 2010 CompassPoint Partner Since 2021 Equality Action Center Partner Since 2018 Keshet Partner Since 2024 Labor Notes Partner Since 2022 Legal Link Partner Since 2022 Mirror Memoirs Partner Since 2013 Unbound Philanthropy Partner Since 2018 Migrant Justice Building connection through arts, culture, and food. Partner Since 2013 18 Reasons Partner Since 2021 Artists Communities Alliance Partner Since 2019 Authors Alliance Partner Since 2018 Company One Theatre Partner Since 2017 Howlround Theatre Commons Partner Since 2023 Lighthouse Writers Workshop Partner Since 2023 Museo de las Americas Partner Since 2013 Sacred Lands Film Project Improving the quality and accessibility of education. Partner Since 2022 Academy College Prep Partner From 2017 To 2022 Bellwether Education Partner Since 2020 California Community Colleges Transfer Guarantee Pathway to Historically Black Colleges and Universities Partner From 2019 To 2020 The College of Business at Oregon State University Partner Since 2011 Ignited Partner From 2018 To 2022 Maker Ed Partner Since 2014 myShakespeare Partner Since 2019 Umoja Community Education Foundation Using technology for good and defending digital rights and privacy. Partner Since 2014 Electronic Frontier Foundation Partner Since 2019 FreeBSD Foundation Partner From 2015 To 2016 Internet Archive Partner Since 2012 Society of Motion Picture & Television Engineers (SMPTE) Partner From 2013 To 2021 The TOR Project Partner Since 2014 USENIX Partner Since 2020 Women's Audio Mission Partner From 2013 To 2015 Wikimedia Foundation Non-profit Sectors Human Rights Health Environment Social Justice Arts & Culture Education Technology & Privacy ❮ How can we help? Get in touch Giant Rabbit LLC 415.355.4211 info@giantrabbit.com Copyright © 2018-2025 by Giant Rabbit LLC. Artwork by RBlack . | Read our privacy policy . | 2026-01-13T09:29:31 |
https://docs.aws.amazon.com/zh_cn/cost-management/latest/userguide/add-tags-to-dashboards.html | 向控制面板添加标签 - AWS 成本管理 向控制面板添加标签 - AWS 成本管理 文档 AWS Billing and Cost Management 用户指南 本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。 向控制面板添加标签 利用标签,您可以通过添加描述性标签来识别、组织和管理控制面板。您可以为控制面板添加标签来识别创建部门,按项目或计划跟踪它们,标记其用途,或者将其标记为不同的环境。例如,您可以使用诸如“部门 = 营销”或“项目 = 2025 年成本优化”之类的标签对控制面板进行分类。 当您的组织内有许多控制面板时,标签就变得特别有价值。它们允许您筛选和搜索特定控制面板,通过 IAM 策略基于标签值控制访问权限,并跟踪不同团队中服务于类似目的的控制面板。如果您使用 AWS CLI 或 SDK,标签还有助于您将相关控制面板作为一个组进行管理。 向控制面板添加标签 打开 账单与成本管理控制台,网址为 https://console.aws.amazon.com/costmanagement/ 。 在导航窗格中,选择 控制面板 。 选择要添加标签的控制面板。 选择 操作 ,然后从下拉列表中选择 管理标签 。 选择 添加新标签 。 输入标签的键和值(可选)。 要添加其他标签,请选择 添加新标签 。您最多可以添加 50 个标签。 选择 保存更改 。 保存更改后,标签将应用于您的控制面板,并且可用于筛选和访问控制。 Javascript 在您的浏览器中被禁用或不可用。 要使用 Amazon Web Services 文档,必须启用 Javascript。请参阅浏览器的帮助页面以了解相关说明。 文档惯例 复制控制面板 使用 Cost Explorer 分析您的 AWS 成本和使用情况 此页面对您有帮助吗?- 是 感谢您对我们工作的肯定! 如果不耽误您的时间,请告诉我们做得好的地方,让我们做得更好。 此页面对您有帮助吗?- 否 感谢您告诉我们本页内容还需要完善。很抱歉让您失望了。 如果不耽误您的时间,请告诉我们如何改进文档。 | 2026-01-13T09:29:31 |
https://www.atlassian.com/software/jira/templates/finance | Finance Templates | Jira Template Library | Atlassian Close View this page in your language ? All languages Choose your language 中文 Deutsch English Español Français Italiano 한국어 Nederlands 日本語 Português Pусский Polski Get it free Features All Features Rovo in Jira Back Solutions Teams Use cases Company size Teams Marketing Engineering Design Operations IT Use cases Getting started Planning Campaign Management Agile Project Management Program Management Company size Enterprise Back Product guide Templates Templates All Templates Software Development Marketing Design Sales Operations Service Management HR Legal IT Operations Finance Jira Service Management templates Back Pricing More + Less - Get it free Back Get it free Jira Templates Open and close the navigation menu Categories Software development Marketing Design Sales Operations Service management HR Legal IT Operations Finance Project Management Templates Categories Software development Marketing Design Sales Operations Service management HR Legal IT Operations Finance Project Management Templates Finance templates Keep finances in order with Jira. With pre-built, customizable templates for finance teams, it’s easy to get started. Procurement Track all purchases from request to receipt. Budget creation Align teams during the budget creation process. RFP process Select the right vendor and improve the RFP process. Finance service management Manage and track budget, spend, and other finance requests. Month-end close Simplify the messy month-end close process. Finance resources Jira for finance teams Balance and plan your company’s finances. Learn more about how Jira helps streamline your work. Learn more Put your projects on autopilot Focus on what matters and automate the rest. Create your team's custom rules or get started quickly with pre-made automations. Explore automations Plug in to your favorite tools Leverage 500+ integrations to work seamlessly, and 3000+ other extensions to craft your team’s perfect process. Explore app marketplace Company Careers Events Blogs Investor Relations Atlassian Foundation Press kit Contact us products Rovo Jira Jira Align Jira Service Management Confluence Loom Trello Bitbucket See all products Resources Technical support Purchasing & licensing Atlassian Community Knowledge base Marketplace My account Create support ticket Learn Partners Training & certification Documentation Developer resources Enterprise services See all resources Copyright © 2025 Atlassian Privacy Policy Terms Impressum Choose language Deutsch English Español Français Italiano 한국어 Nederlands 日本語 Polski Português русский 中文 | 2026-01-13T09:29:31 |
https://developer.wordpress.com/docs/api/ | REST API - Build Apps with WordPress.com Data Skip to content Search Search Menu Search Search At a glance WordPress and WordPress.com Tech stack Glossary Interface styles Support Get started Step 1: Create a site Step 2: Set up your local environment Step 3: Set up GitHub Step 4: Develop locally Step 5: Deploy to your production or staging site WordPress Studio Studio sites Blueprints Open in WordPress Studio button How to create custom Blueprints Preview Sites Studio Sync Studio Assistant Studio CLI Import & export SSL in Studio Frequently asked questions Changelog Roadmap Beta features MCP MCP tools reference MCP prompt examples Developer tools WP-CLI WP-CLI overview Platform-specific commands Common commands Troubleshooting REST API Getting started with the REST API REST API reference Namespaces & versions OAuth2 authentication WordPress.com Connect Using the REST API from JavaScript & the browser (CORS) Guidelines for responsible use of Automattic’s APIs Site Accelerator API Platform features Site performance Domain management User management Real time backup Storage Sitemaps Jetpack Scan Account security Guides Add HTTP headers Block patterns Manage user, file, and folder permissions Manually restore your site from a Jetpack Backup Symlinked files and folders WordPress.com oEmbed provider Troubleshooting Enabling WP_DEBUG Jetpack Activity Log At a glance WordPress and WordPress.com Tech stack Glossary Interface styles Support Get started Step 1: Create a site Step 2: Set up your local environment Step 3: Set up GitHub Step 4: Develop locally Step 5: Deploy to your production or staging site WordPress Studio Studio sites Blueprints Open in WordPress Studio button How to create custom Blueprints Preview Sites Studio Sync Studio Assistant Studio CLI Import & export SSL in Studio Frequently asked questions Changelog Roadmap Beta features MCP MCP tools reference MCP prompt examples Developer tools WP-CLI WP-CLI overview Platform-specific commands Common commands Troubleshooting REST API Getting started with the REST API REST API reference Namespaces & versions OAuth2 authentication WordPress.com Connect Using the REST API from JavaScript & the browser (CORS) Guidelines for responsible use of Automattic’s APIs Site Accelerator API Platform features Site performance Domain management User management Real time backup Storage Sitemaps Jetpack Scan Account security Guides Add HTTP headers Block patterns Manage user, file, and folder permissions Manually restore your site from a Jetpack Backup Symlinked files and folders WordPress.com oEmbed provider Troubleshooting Enabling WP_DEBUG Jetpack Activity Log REST API Welcome to the WordPress.com REST API documentation. You can find a list of available endpoints in the REST API Reference . To explore and test them interactively, head over to the Developer Console . If you’re not sure how to make calls to the API check the following links to locate the topic you’re interested in. If you have never worked with the WordPress.com REST API before, consider reading through the following resources in the order listed: Getting Started : Check this guide to learn what the WordPress.com REST API is it and how to use it. Reference : Browse a comprehensive catalog of available REST API endpoints organized by functionality. Each endpoint includes links to detailed documentation with input parameters, output formats, and example requests in both curl and PHP. Categories include Users, Sites, Posts, Comments, Taxonomy, Media, Stats, and more. Namespaces : A guide to the three WordPress.com REST API namespaces — /rest/ , /wp/ , and /wpcom/ — as shown in the Developer Console , to help developers pick the right endpoints for their compatibility and feature needs. OAuth2 Authentication : Learn more about how WordPress.com and Jetpack leverage OAuth2 to enable secure application access to their APIs without storing sensitive credentials, while giving users control over their connections. WordPress.com connect : Implement the “Login with WordPress.com” functionality for user authentication. This specialized OAuth2 implementation allows millions of WordPress.com users to securely sign in to your application using their existing credentials, providing access to basic profile information while maintaining user privacy and control. Using the REST API from JS and the Browser : Learn how to make REST API calls directly from JavaScript in web browsers. This guide covers both authenticated and unauthenticated requests using the Fetch API, explains CORS configuration requirements, and shows how to whitelist your domains to prevent cross-origin errors when building client-side applications. Before using the WordPress.com REST API in your applications, please review our guidelines for responsible use: Guidelines for Responsible Use of Automattic’s APIs : Understand the terms of use, best practices, and ethical guidelines for using WordPress.com REST APIs. This resource covers user privacy requirements, data refresh policies, rate limiting guidelines, and the complete API Terms of Use to ensure your application meets Automattic’s standards for integrity, performance, and user protection. If you’re looking for the WordPress REST API that shipped as part of WordPress core in version 4.7, see its documentation . Note that this API is also enabled on WordPress.com, but the URL structure on WordPress.com is slightly different than for self-hosted sites. See this post for more details. Last updated: October 07, 2025 Ready to get started with WordPress.com? Get started Documentation is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License An Automattic Creation | 2026-01-13T09:29:31 |
https://www.chinadaily.com.cn/regional/ | Regional - China Local News, Headlines &#38; Regional Economy - Chinadaily.com.cn Search HOME CHINA WORLD BUSINESS LIFESTYLE CULTURE TRAVEL VIDEO SPORTS OPINION REGIONAL NEWSPAPER MOBILE Global Edition ASIA 中文 双语 Français HOME CHINA WORLD BUSINESS LIFESTYLE CULTURE TRAVEL VIDEO SPORTS OPINION REGIONAL NEWSPAPER China Daily PDF China Daily E-paper MOBILE Regional Home > Regional Advertorial Cold front coats Guizhou mountains in rime China-Austria winter carnival kicks off in Shanxi Freight train brings Gansu seeds to Europe Shanghai retains world's busiest container port title for 16th year 1 2 3 4 Cold front coats Guizhou mountains in rime China-Austria winter carnival kicks off in Shanxi Freight train brings Gansu seeds to Europe Shanghai retains world's busiest container port title for 16th year Zodiac Longquan celadon gains popularity as Year of the Horse nears Transportation leap propels Jinan toward national hub A taste of Chile brightens Changchun's winter Provinces, Municipalities and Autonomous Regions Cities and Districts Business --> Institutes Events Culture and Tourism Special + Advertorial --> Intl investment and innovation highlighted by Weichai Group Xiaogan ICH XianHitechZone2025 130th Anniversary of Tianjin University Hangzhou Ningbo Wenzhou Huzhou Jiaxing Shaoxing Jinhua Quzhou Zhoushan Taizhou Lishui Latest + --> Advertorial Shandong enterprises thrive in global supply chains with RCEP Guiyang selected as City of the Year Xizang reports strong cultural and tourism growth Liangjiang accelerates NEV exports UK Garden takes root in Wenzhou Winter comes alive at Chagan Lake festival Qingdao airport sets new records in 2025 with enhanced global connectivity Florence welcomes cultural showcase from Ningbo Xizang's South Asia freight service sees strong growth in 2025 Guest from Indonesian business school visits Nantong Vocational University Top BACK TO THE TOP English 中文 HOME CHINA WORLD BUSINESS LIFESTYLE CULTURE TRAVEL VIDEO SPORTS OPINION REGIONAL NEWSPAPER China Daily PDF China Daily E-paper MOBILE Copyright 1994 - . All rights reserved. The content (including but not limited to text, photo, multimedia information, etc) published in this site belongs to China Daily Information Co (CDIC). Without written authorization from CDIC, such content shall not be republished or used in any form. Note: Browsers with 1024*768 or higher resolution are suggested for this site. License for publishing multimedia online 0108263 Registration Number: 130349 About China Daily Advertise on Site Contact Us Job Offer Expat Employment FOLLOW US Copyright 1994 - . All rights reserved. The content (including but not limited to text, photo, multimedia information, etc) published in this site belongs to China Daily Information Co (CDIC). Without written authorization from CDIC, such content shall not be republished or used in any form. --> | 2026-01-13T09:29:31 |
https://docs.aws.amazon.com/fr_fr/cost-management/latest/userguide/add-tags-to-dashboards.html | Ajouter des balises aux tableaux de bord - AWS Gestion des coûts Ajouter des balises aux tableaux de bord - AWS Gestion des coûts Documentation AWS Billing and Cost Management Guide de l’utilisateur Les traductions sont fournies par des outils de traduction automatique. En cas de conflit entre le contenu d'une traduction et celui de la version originale en anglais, la version anglaise prévaudra. Ajouter des balises aux tableaux de bord Les balises vous aident à identifier, à organiser et à gérer vos tableaux de bord en ajoutant des étiquettes descriptives. Vous pouvez étiqueter vos tableaux de bord pour identifier le service qui les a créés, les suivre par projet ou initiative, étiqueter leur objectif ou les marquer pour différents environnements. Par exemple, vous pouvez utiliser des balises telles que Department = Marketing ou Project = Cost-Optimization-2025 pour classer vos tableaux de bord. Lorsque vous disposez de nombreux tableaux de bord au sein de votre organisation, les balises deviennent particulièrement utiles. Ils vous permettent de filtrer et de rechercher des tableaux de bord spécifiques, de contrôler l'accès par le biais de politiques IAM basées sur les valeurs des balises et de suivre les tableaux de bord ayant des objectifs similaires au sein de différentes équipes. Si vous utilisez la AWS CLI ou le SDK, les balises vous aident également à gérer les tableaux de bord associés en tant que groupe. Pour ajouter des balises à un tableau de bord Ouvrez la console Billing and Cost Management à l'adresse https://console.aws.amazon.com/costmanagement/ . Dans le panneau de navigation, choisissez Dashboards (Tableaux de bord). Sélectionnez le tableau de bord que vous souhaitez étiqueter. Choisissez Actions , puis sélectionnez Gérer les balises dans la liste déroulante. Sélectionnez Ajouter une nouvelle balise . Entrez la clé et la valeur (facultatif) du tag. Choisissez Ajouter un nouveau tag pour ajouter des tags supplémentaires. Le nombre maximum de balises que vous pouvez ajouter est de 50 Sélectionnez Enregistrer les modifications . Une fois les modifications enregistrées, les balises sont appliquées à votre tableau de bord et peuvent être utilisées pour le filtrage et le contrôle d'accès. JavaScript est désactivé ou n'est pas disponible dans votre navigateur. Pour que vous puissiez utiliser la documentation AWS, Javascript doit être activé. Vous trouverez des instructions sur les pages d'aide de votre navigateur. Conventions de rédaction Duplication de tableaux de bord Analyse de vos coûts et de votre utilisation avec AWS Cost Explorer Cette page vous a-t-elle été utile ? - Oui Merci de nous avoir fait part de votre satisfaction. Si vous avez quelques minutes à nous consacrer, merci de nous indiquer ce qui vous a plu afin que nous puissions nous améliorer davantage. Cette page vous a-t-elle été utile ? - Non Merci de nous avoir avertis que cette page avait besoin d'être retravaillée. Nous sommes désolés de ne pas avoir répondu à vos attentes. Si vous avez quelques minutes à nous consacrer, merci de nous indiquer comment nous pourrions améliorer cette documentation. | 2026-01-13T09:29:31 |
https://docs.aws.amazon.com/ja_jp/cost-management/latest/userguide/add-tags-to-dashboards.html | ダッシュボードにタグを追加する - AWS コスト管理 ダッシュボードにタグを追加する - AWS コスト管理 ドキュメント AWS Billing and Cost Management ユーザーガイド 翻訳は機械翻訳により提供されています。提供された翻訳内容と英語版の間で齟齬、不一致または矛盾がある場合、英語版が優先します。 ダッシュボードにタグを追加する タグを使用すると、ダッシュボードに説明的なラベルを付けて識別、整理、管理できるようになります。作成元の部門を識別したり、プロジェクトや取り組みごとに追跡したり、用途を示したり、異なる環境向けに分類したりするためにタグを付けることができます。例えば、部門 = マーケティングやプロジェクト = コスト最適化-2025 のようなタグを使用して、ダッシュボードを分類できます。 組織内に多数のダッシュボードがある場合、タグは特に有用です。タグを使用すると、特定のダッシュボードをフィルタリングして検索したり、タグの値に基づいて IAM ポリシーでアクセスを制御したり、異なるチームで類似の目的を持つダッシュボードを追跡したりできます。また、AWS CLI や SDK を使用する場合、タグは関連するダッシュボードをグループとして管理する際にも役立ちます。 ダッシュボードにタグを追加するには https://console.aws.amazon.com/costmanagement/ で Billing and Cost Management コンソールを開きます ナビゲーションペインで、[ ダッシュボード ] を選択します。 タグ付けするダッシュボードを選択します。 [ アクション ] を選択し、ドロップダウンリストから [ タグを管理 ] を選択します。 [ 新しいタグを追加 ] をクリックします。 タグのキーと、オプションで値を入力します。 タグを追加するには、[ 新しいタグを追加 ] を選択します。追加できるタグの最大数は 50 です。 [Save changes] (変更の保存) をクリックします。 変更を保存すると、タグがダッシュボードに適用され、フィルタリングやアクセス制御に利用できるようになります。 ブラウザで JavaScript が無効になっているか、使用できません。 AWS ドキュメントを使用するには、JavaScript を有効にする必要があります。手順については、使用するブラウザのヘルプページを参照してください。 ドキュメントの表記規則 ダッシュボードの複製 AWS Cost Explorer を使用してコストと使用状況を分析する このページは役に立ちましたか? - はい ページが役に立ったことをお知らせいただき、ありがとうございます。 お時間がある場合は、何が良かったかお知らせください。今後の参考にさせていただきます。 このページは役に立ちましたか? - いいえ このページは修正が必要なことをお知らせいただき、ありがとうございます。ご期待に沿うことができず申し訳ありません。 お時間がある場合は、ドキュメントを改善する方法についてお知らせください。 | 2026-01-13T09:29:31 |
https://docs.aws.amazon.com/es_es/cost-management/latest/userguide/add-tags-to-dashboards.html | Agregación de etiquetas al panel - AWS Gestión de costes Agregación de etiquetas al panel - AWS Gestión de costes Documentación AWS Billing and Cost Management Guía del usuario de Las traducciones son generadas a través de traducción automática. En caso de conflicto entre la traducción y la version original de inglés, prevalecerá la version en inglés. Agregación de etiquetas al panel Las etiquetas lo ayudan a identificar, organizar y administrar los paneles al agregar etiquetas descriptivas. Puede etiquetar sus paneles para identificar qué departamento los creó, realizar un seguimiento de ellos por proyecto o iniciativa, etiquetar su propósito o marcarlos para diferentes entornos. Por ejemplo, puede usar etiquetas como Departamento = Marketing o Proyecto = Optimización de costos 2025 para categorizar sus paneles. Cuando tiene muchos paneles en su organización, las etiquetas se vuelven especialmente valiosas. Le permiten filtrar y buscar paneles específicos, controlar el acceso mediante políticas de IAM en función de los valores de las etiquetas y realizar un seguimiento de los paneles que cumplen propósitos similares en diferentes equipos. Si usa la AWS CLI o SDK, las etiquetas también lo ayudan a administrar los paneles relacionados como un grupo. Agregación de etiquetas a un panel Abra la consola de Administración de facturación y costos de en https://console.aws.amazon.com/costmanagement/ . En el panel de navegación, seleccione Paneles . Seleccione el panel que desea etiquetar. Elija Acciones y, a continuación, elija Administrar etiquetas en la lista desplegable. Elija Añadir nueva etiqueta . Ingrese la clave y un valor (opcional) para la etiqueta. Para agregar otras etiquetas, elija Agregar nueva etiqueta . El número máximo de etiquetas que puede agregar es 50. Seleccione Save changes (Guardar cambios) . Después de guardar los cambios, las etiquetas se aplican al panel de control y se pueden usar para filtrar y controlar el acceso. JavaScript está desactivado o no está disponible en su navegador. Para utilizar la documentación de AWS, debe estar habilitado JavaScript. Para obtener más información, consulte las páginas de ayuda de su navegador. Convenciones del documento Duplicación de paneles Análisis de los costes y el uso con AWS Cost Explorer ¿Le ha servido de ayuda esta página? - Sí Gracias por hacernos saber que estamos haciendo un buen trabajo. Si tiene un momento, díganos qué es lo que le ha gustado para que podamos seguir trabajando en esa línea. ¿Le ha servido de ayuda esta página? - No Gracias por informarnos de que debemos trabajar en esta página. Lamentamos haberle defraudado. Si tiene un momento, díganos cómo podemos mejorar la documentación. | 2026-01-13T09:29:31 |
https://docs.aws.amazon.com/de_de/cost-management/latest/userguide/add-tags-to-dashboards.html | Hinzufügen von Tags zu Dashboards - AWS Kostenmanagement Hinzufügen von Tags zu Dashboards - AWS Kostenmanagement Dokumentation AWS Billing and Cost Management Benutzer-Leitfaden Die vorliegende Übersetzung wurde maschinell erstellt. Im Falle eines Konflikts oder eines Widerspruchs zwischen dieser übersetzten Fassung und der englischen Fassung (einschließlich infolge von Verzögerungen bei der Übersetzung) ist die englische Fassung maßgeblich. Hinzufügen von Tags zu Dashboards Mithilfe von Tags können Sie Ihre Dashboards identifizieren, organisieren und verwalten, indem sie beschreibende Beschriftungen hinzufügen. Sie können Ihre Dashboards taggen, um zu identifizieren, welche Abteilung sie erstellt hat, sie nach Projekt oder Initiative verfolgen, ihren Zweck kennzeichnen oder sie für verschiedene Umgebungen kennzeichnen. Sie könnten beispielsweise Tags wie Abteilung = Marketing oder Projekt = Kostenoptimierung-2025 verwenden, um Ihre Dashboards zu kategorisieren. Wenn Sie in Ihrem Unternehmen über viele Dashboards verfügen, werden Tags besonders wertvoll. Sie ermöglichen es Ihnen, bestimmte Dashboards zu filtern und nach ihnen zu suchen, den Zugriff mithilfe von IAM-Richtlinien auf der Grundlage von Tag-Werten zu steuern und Dashboards zu verfolgen, die in verschiedenen Teams ähnlichen Zwecken dienen. Wenn Sie die AWS CLI oder das SDK verwenden, helfen Ihnen Tags auch dabei, verwandte Dashboards als Gruppe zu verwalten. Um Tags zu einem Dashboard hinzuzufügen Öffnen Sie die Fakturierungs- und Kostenverwaltungskonsole unter https://console.aws.amazon.com/costmanagement/ . Wählen Sie im Navigationsbereich Dashboards aus. Wählen Sie das Dashboard aus, das Sie taggen möchten. Wählen Sie Aktionen und dann in der Drop-down-Liste Tags verwalten aus. Wählen Sie Neues Tag hinzufügen aus. Geben Sie den Schlüssel und den Wert (optional) für das Tag ein. Wählen Sie Neues Tag hinzufügen, um weitere Tags hinzuzufügen. Die maximale Anzahl von Tags, die Sie hinzufügen können, ist 50 Wählen Sie Änderungen speichern aus. Nachdem Sie die Änderungen gespeichert haben, werden die Tags auf Ihr Dashboard angewendet und können zum Filtern und zur Zugriffskontrolle verwendet werden. JavaScript ist in Ihrem Browser nicht verfügbar oder deaktiviert. Zur Nutzung der AWS-Dokumentation muss JavaScript aktiviert sein. Weitere Informationen finden auf den Hilfe-Seiten Ihres Browsers. Dokumentkonventionen Dashboards duplizieren Analysieren Sie Ihre Kosten und Nutzung mit dem AWS Cost Explorer Hat Ihnen diese Seite geholfen? – Ja Vielen Dank, dass Sie uns mitgeteilt haben, dass wir gute Arbeit geleistet haben! Würden Sie sich einen Moment Zeit nehmen, um uns mitzuteilen, was wir richtig gemacht haben, damit wir noch besser werden? Hat Ihnen diese Seite geholfen? – Nein Vielen Dank, dass Sie uns mitgeteilt haben, dass diese Seite überarbeitet werden muss. Es tut uns Leid, dass wir Ihnen nicht weiterhelfen konnten. Würden Sie sich einen Moment Zeit nehmen, um uns mitzuteilen, wie wir die Dokumentation verbessern können? | 2026-01-13T09:29:31 |
https://docs.aws.amazon.com/id_id/cost-management/latest/userguide/ce-cost-comparison.html | Membandingkan biaya Anda antara periode waktu - AWS Manajemen Biaya Membandingkan biaya Anda antara periode waktu - AWS Manajemen Biaya Dokumentasi AWS Billing and Cost Management Panduan Pengguna Izin Mengakses konsol tersebut Terjemahan disediakan oleh mesin penerjemah. Jika konten terjemahan yang diberikan bertentangan dengan versi bahasa Inggris aslinya, utamakan versi bahasa Inggris. Membandingkan biaya Anda antara periode waktu Perbandingan Biaya adalah fitur di Cost Explorer yang membantu Anda mengidentifikasi dan memahami perubahan AWS pengeluaran dengan cepat. Ini secara otomatis menganalisis variasi biaya antara dua bulan yang dipilih, menyoroti pendorong biaya terbesar dan menjelaskan alasan di balik perubahan ini. Fitur ini menyediakan akses konsol dan API untuk membantu Anda menganalisis perubahan biaya di seluruh AWS pengeluaran Anda. Manfaat utama: Dengan cepat mengidentifikasi perubahan biaya teratas di seluruh layanan, akun, dan Wilayah. Menyediakan rincian rincian driver biaya, termasuk penggunaan dan perubahan discount. Mengurangi waktu analisis biaya manual dari jam ke detik. Tersedia di Cost Explorer tanpa biaya tambahan. Izin Untuk mengakses data di fitur Perbandingan Biaya, Anda memerlukan izin IAM berikut: ce:GetCostAndUsageComparisons ce:GetCostComparisonDrivers Izin ini memungkinkan Anda untuk mengambil perbandingan biaya dan penggunaan serta driver biaya. Mengakses konsol tersebut Untuk menganalisis perubahan biaya di konsol, Anda dapat menggunakan widget Tren teratas atau Cost Explorer. Untuk mengakses konsol Buka Konsol Manajemen Penagihan dan Biaya di https://console.aws.amazon.com/costmanagement/ . Lakukan salah satu dari langkah berikut: Di halaman beranda konsol, lihat widget Tren teratas , yang menunjukkan 10 variasi biaya teratas antara dua bulan sebelumnya. Di panel navigasi, pilih Cost Explorer , lalu pilih Bandingkan di panel parameter Laporan . Tinjau widget Top Trends secara teratur untuk mengidentifikasi perubahan biaya yang signifikan lebih awal. Untuk informasi selengkapnya tentang widget ini, lihat Tren teratas . Javascript dinonaktifkan atau tidak tersedia di browser Anda. Untuk menggunakan Dokumentasi AWS, Javascript harus diaktifkan. Lihat halaman Bantuan browser Anda untuk petunjuk. Konvensi Dokumen Prakiraan Memahami cara kerja perbandingan biaya Apakah halaman ini membantu Anda? - Ya Terima kasih telah memberitahukan bahwa hasil pekerjaan kami sudah baik. Jika Anda memiliki waktu luang, beri tahu kami aspek apa saja yang sudah bagus, agar kami dapat menerapkannya secara lebih luas. Apakah halaman ini membantu Anda? - Tidak Terima kasih telah memberi tahu kami bahwa halaman ini perlu ditingkatkan. Maaf karena telah mengecewakan Anda. Jika Anda memiliki waktu luang, beri tahu kami bagaimana dokumentasi ini dapat ditingkatkan. | 2026-01-13T09:29:31 |
https://docs.aws.amazon.com/fr_fr/cost-management/latest/userguide/ce-getting-started.html | Démarrage avec Cost Explorer - AWS Gestion des coûts Démarrage avec Cost Explorer - AWS Gestion des coûts Documentation AWS Billing and Cost Management Guide de l’utilisateur Les traductions sont fournies par des outils de traduction automatique. En cas de conflit entre le contenu d'une traduction et celui de la version originale en anglais, la version anglaise prévaudra. Démarrage avec Cost Explorer Après avoir activé Cost Explorer, vous pouvez le lancer depuis la console AWS Cost Management. Pour ouvrir Cost Explorer Ouvrez la console Billing and Cost Management à l'adresse https://console.aws.amazon.com/costmanagement/ . Cela ouvre le tableau de bord des coûts qui affiche les informations suivantes : Vos coûts estimés pour le mois à ce jour Vos coûts prévisionnels pour le mois Un graphique de vos dépenses quotidiennes Vos cinq principales tendances en matière de coûts Liste des rapports que vous avez récemment consultés JavaScript est désactivé ou n'est pas disponible dans votre navigateur. Pour que vous puissiez utiliser la documentation AWS, Javascript doit être activé. Vous trouverez des instructions sur les pages d'aide de votre navigateur. Conventions de rédaction Contrôle de l'accès à Cost Explorer Exploration de vos données à l'aide de Cost Explorer Cette page vous a-t-elle été utile ? - Oui Merci de nous avoir fait part de votre satisfaction. Si vous avez quelques minutes à nous consacrer, merci de nous indiquer ce qui vous a plu afin que nous puissions nous améliorer davantage. Cette page vous a-t-elle été utile ? - Non Merci de nous avoir avertis que cette page avait besoin d'être retravaillée. Nous sommes désolés de ne pas avoir répondu à vos attentes. Si vous avez quelques minutes à nous consacrer, merci de nous indiquer comment nous pourrions améliorer cette documentation. | 2026-01-13T09:29:31 |
https://docs.aws.amazon.com/ko_kr/cost-management/latest/userguide/add-tags-to-dashboards.html | 대시보드에 태그 추가 - AWS 비용 관리 대시보드에 태그 추가 - AWS 비용 관리 설명서 AWS Billing and Cost Management 사용 설명서 기계 번역으로 제공되는 번역입니다. 제공된 번역과 원본 영어의 내용이 상충하는 경우에는 영어 버전이 우선합니다. 대시보드에 태그 추가 태그를 사용하면 설명이 포함된 레이블을 추가하여 대시보드를 식별, 구성, 관리할 수 있습니다. 대시보드에 태그를 지정하여 대시보드를 생성한 부서를 식별하거나, 프로젝트 또는 이니셔티브별로 대시보드를 추적하거나, 용도를 레이블로 지정하거나, 다양한 환경에 적합하게 표시할 수 있습니다. 예를 들어 Department = Marketing 또는 Project = Cost-Optimization-2025와 같은 태그를 사용하여 대시보드를 분류할 수 있습니다. 조직 전체에 대시보드가 많으면 태그가 특히 유용합니다. 이를 통해 특정 대시보드를 필터하여 검색하고, 태그 값을 기반으로 IAM 정책을 통해 액세스를 제어하고, 여러 팀에서 유사한 목적으로 사용되는 대시보드를 추적할 수 있습니다. AWS CLI 또는 SDK를 사용하는 경우 태그는 관련 대시보드를 그룹으로 관리하는 데도 도움이 됩니다. 대시보드에 태그를 추가하려면 에서 과금 정보 및 비용 관리 콘솔을 엽니다 https://console.aws.amazon.com/costmanagement/ 탐색 창에서 대시보드 를 선택합니다. 태그를 지정할 대시보드를 선택합니다. 작업 을 선택한 다음 드롭다운 목록에서 태그 관리 를 선택합니다. 새로운 태그 추가 를 선택합니다. 태그에 키와 값(선택 사항)을 입력합니다. 태그를 추가하려면 새 태그 추가 를 선택합니다. 추가할 수 있는 최대 태그 수는 50개입니다. 변경 사항 저장 을 선택합니다. 변경 사항을 저장하면 태그가 대시보드에 적용되고 필터링 및 액세스 제어에 사용할 수 있습니다. javascript가 브라우저에서 비활성화되거나 사용이 불가합니다. AWS 설명서를 사용하려면 Javascript가 활성화되어야 합니다. 지침을 보려면 브라우저의 도움말 페이지를 참조하십시오. 문서 규칙 대시보드 복제 AWS Cost Explorer를 사용하여 비용 및 사용량 분석 이 페이지의 내용이 도움이 되었습니까? - 예 칭찬해 주셔서 감사합니다! 잠깐 시간을 내어 좋았던 부분을 알려 주시면 더 열심히 만들어 보겠습니다. 이 페이지의 내용이 도움이 되었습니까? - 아니요 이 페이지에 작업이 필요하다는 점을 알려 주셔서 감사합니다. 실망시켜 드려 죄송합니다. 잠깐 시간을 내어 설명서를 향상시킬 수 있는 방법에 대해 말씀해 주십시오. | 2026-01-13T09:29:31 |
https://docs.aws.amazon.com/es_es/cost-management/latest/userguide/add-tags-to-dashboards.html | Agregación de etiquetas al panel - AWS Gestión de costes Agregación de etiquetas al panel - AWS Gestión de costes Documentación AWS Billing and Cost Management Guía del usuario de Las traducciones son generadas a través de traducción automática. En caso de conflicto entre la traducción y la version original de inglés, prevalecerá la version en inglés. Agregación de etiquetas al panel Las etiquetas lo ayudan a identificar, organizar y administrar los paneles al agregar etiquetas descriptivas. Puede etiquetar sus paneles para identificar qué departamento los creó, realizar un seguimiento de ellos por proyecto o iniciativa, etiquetar su propósito o marcarlos para diferentes entornos. Por ejemplo, puede usar etiquetas como Departamento = Marketing o Proyecto = Optimización de costos 2025 para categorizar sus paneles. Cuando tiene muchos paneles en su organización, las etiquetas se vuelven especialmente valiosas. Le permiten filtrar y buscar paneles específicos, controlar el acceso mediante políticas de IAM en función de los valores de las etiquetas y realizar un seguimiento de los paneles que cumplen propósitos similares en diferentes equipos. Si usa la AWS CLI o SDK, las etiquetas también lo ayudan a administrar los paneles relacionados como un grupo. Agregación de etiquetas a un panel Abra la consola de Administración de facturación y costos de en https://console.aws.amazon.com/costmanagement/ . En el panel de navegación, seleccione Paneles . Seleccione el panel que desea etiquetar. Elija Acciones y, a continuación, elija Administrar etiquetas en la lista desplegable. Elija Añadir nueva etiqueta . Ingrese la clave y un valor (opcional) para la etiqueta. Para agregar otras etiquetas, elija Agregar nueva etiqueta . El número máximo de etiquetas que puede agregar es 50. Seleccione Save changes (Guardar cambios) . Después de guardar los cambios, las etiquetas se aplican al panel de control y se pueden usar para filtrar y controlar el acceso. JavaScript está desactivado o no está disponible en su navegador. Para utilizar la documentación de AWS, debe estar habilitado JavaScript. Para obtener más información, consulte las páginas de ayuda de su navegador. Convenciones del documento Duplicación de paneles Análisis de los costes y el uso con AWS Cost Explorer ¿Le ha servido de ayuda esta página? - Sí Gracias por hacernos saber que estamos haciendo un buen trabajo. Si tiene un momento, díganos qué es lo que le ha gustado para que podamos seguir trabajando en esa línea. ¿Le ha servido de ayuda esta página? - No Gracias por informarnos de que debemos trabajar en esta página. Lamentamos haberle defraudado. Si tiene un momento, díganos cómo podemos mejorar la documentación. | 2026-01-13T09:29:31 |
https://docs.aws.amazon.com/it_it/cost-management/latest/userguide/ce-advanced-cost-analysis.html | Esplorazione di più dati per un’analisi avanzata dei costi - AWS Gestione dei costi Esplorazione di più dati per un’analisi avanzata dei costi - AWS Gestione dei costi Documentazione AWS Billing and Cost Management Guida per l’utente Le traduzioni sono generate tramite traduzione automatica. In caso di conflitto tra il contenuto di una traduzione e la versione originale in Inglese, quest'ultima prevarrà. Esplorazione di più dati per un’analisi avanzata dei costi Cost Explorer fornisce dati su AWS costi e utilizzo per il mese corrente e fino ai 13 mesi precedenti con granularità giornaliera e mensile. Puoi interrogare questi dati nella console o utilizzando l'API Cost Explorer. Puoi abilitare dati pluriennali (con granularità mensile) e dati più granulari (con granularità oraria e giornaliera) per i 14 giorni precedenti. Una volta abilitati, puoi utilizzare questi dati nella console o utilizzando l'API Cost Explorer. Argomenti Dati pluriennali con granularità mensile Dati granulari Comprendere il riepilogo dell'utilizzo mensile stimato Configurazione di dati pluriennali e granulari JavaScript è disabilitato o non è disponibile nel tuo browser. Per usare la documentazione AWS, JavaScript deve essere abilitato. Consulta le pagine della guida del browser per le istruzioni. Convenzioni dei documenti Esecuzione di un confronto dei costi Dati pluriennali con granularità mensile Questa pagina ti è stata utile? - Sì Grazie per averci comunicato che stiamo facendo un buon lavoro! Se hai un momento, ti invitiamo a dirci che cosa abbiamo fatto che ti è piaciuto così possiamo offrirti altri contenuti simili. Questa pagina ti è stata utile? - No Grazie per averci comunicato che questa pagina ha bisogno di essere modificata. Siamo spiacenti di non aver soddisfatto le tue esigenze. Se hai un momento, ti invitiamo a dirci come possiamo migliorare la documentazione. | 2026-01-13T09:29:31 |
https://docs.aws.amazon.com/it_it/cost-management/latest/userguide/add-tags-to-dashboards.html | Aggiungere tag alle dashboard - AWS Gestione dei costi Aggiungere tag alle dashboard - AWS Gestione dei costi Documentazione AWS Billing and Cost Management Guida per l’utente Le traduzioni sono generate tramite traduzione automatica. In caso di conflitto tra il contenuto di una traduzione e la versione originale in Inglese, quest'ultima prevarrà. Aggiungere tag alle dashboard I tag ti aiutano a identificare, organizzare e gestire le dashboard aggiungendo etichette descrittive. Puoi etichettare le dashboard per identificare il reparto che le ha create, monitorarle per progetto o iniziativa, etichettarne lo scopo o contrassegnarle per ambienti diversi. Ad esempio, puoi utilizzare tag come Department = Marketing o Project = Cost-Optimization-2025 per classificare le tue dashboard. Quando l'organizzazione dispone di molte dashboard, i tag diventano particolarmente utili. Ti consentono di filtrare e cercare dashboard specifici, controllare l'accesso tramite policy IAM basate sui valori dei tag e tenere traccia delle dashboard che hanno scopi simili tra team diversi. Se utilizzi la AWS CLI o l'SDK, i tag ti aiutano anche a gestire i dashboard correlati come gruppo. Per aggiungere tag a una dashboard Apri la console di Fatturazione e Gestione dei costi all'indirizzo https://console.aws.amazon.com/costmanagement/ . Nel pannello di navigazione seleziona Dashboards (Pannelli di controllo). Seleziona la dashboard a cui desideri taggare. Scegli Azioni , quindi scegli Gestisci tag dall'elenco a discesa. Scegli Aggiungi nuovo tag . Inserisci la chiave e il valore (opzionale) per il tag. Scegli Aggiungi nuovo tag per aggiungere altri tag. Il numero massimo di tag che puoi aggiungere è 50 Scegli Save changes (Salva modifiche). Dopo aver salvato le modifiche, i tag vengono applicati alla dashboard e possono essere utilizzati per il filtraggio e il controllo degli accessi. JavaScript è disabilitato o non è disponibile nel tuo browser. Per usare la documentazione AWS, JavaScript deve essere abilitato. Consulta le pagine della guida del browser per le istruzioni. Convenzioni dei documenti Dashboard duplicati Analisi dei costi e dell'utilizzo con AWS Cost Explorer Questa pagina ti è stata utile? - Sì Grazie per averci comunicato che stiamo facendo un buon lavoro! Se hai un momento, ti invitiamo a dirci che cosa abbiamo fatto che ti è piaciuto così possiamo offrirti altri contenuti simili. Questa pagina ti è stata utile? - No Grazie per averci comunicato che questa pagina ha bisogno di essere modificata. Siamo spiacenti di non aver soddisfatto le tue esigenze. Se hai un momento, ti invitiamo a dirci come possiamo migliorare la documentazione. | 2026-01-13T09:29:31 |
https://pix.webm.ink/site/kb/getting-started#collapse6 | Pixelfed Help Center minkpix Help Center — Getting Started Getting Started Sharing Media Profile Hashtags Discover Timelines Instagram Import Community Guidelines Safety Tips Getting Started Welcome to Pixelfed! How do I create a Pixelfed account? To create an account using a web browser: Go to https://pix.webm.ink . Click on the register link at the top of the page. Enter your name, email address, username and password. How to I update profile info like name, bio, email? You can update your account by visiting the account settings page. What can I do if a username I want is taken but seems inactive? If your desired username is taken you can add underscores, dashes, or numbers to make it unique. Why can't I change my username? Pixelfed is a federated application, changing your username is not supported in every federated software so we cannot allow username changes. Your best option is to create a new account with your desired username. I received an email that I created an account, but I never signed up for one. Someone may have registered your email by mistake. If you would like your email to be removed from the account please contact an admin of this instance. I can't create a new account because an account with this email already exists. You might have registered before, or someone may have used your email by mistake. Please contact an admin of this instance. About Help Terms Privacy Language © 2026 pix.webm.ink · Powered by Pixelfed · v0.12.6 | 2026-01-13T09:29:31 |
https://docs.aws.amazon.com/zh_cn/cost-management/latest/userguide/ce-exploring-data.html | 使用 Cost Explorer 探索您的数据 - AWS 成本管理 使用 Cost Explorer 探索您的数据 - AWS 成本管理 文档 AWS Billing and Cost Management 用户指南 导航 Cost Explorer 您的 Cost Explorer 成本 您的 Cost Explorer 趋势 您的每日未混合成本 您的月度未混合成本 您的净未混合成本 您最近的 Cost Explorer 报告 您的摊销成本 您的摊销成本 本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。 使用 Cost Explorer 探索您的数据 在 Cost Explorer 控制面板上,Cost Explorer 显示您的当月至今估计成本、您当月的预测成本、每日成本图表、五个最高成本趋势以及您最近查看的报告的列表。 所有成本均反映了您直到前一天的使用情况。例如,如果今天是 12 月 2 日,则数据包括您在 12 月 1 日之前的使用情况。 注意 在当前账单周期内,该数据取决于您的账单应用程序的上游数据,有些数据可能会在 24 小时后更新。 您的 Cost Explorer 成本 您的 Cost Explorer 趋势 您的每日未混合成本 您的月度未混合成本 您的净未混合成本 您最近的 Cost Explorer 报告 您的摊销成本 您的摊销成本 导航 Cost Explorer 您可以使用左窗格中的图标执行以下操作: 转到 Cost Explorer 主控制面板 查看默认 Cost Explorer 报告的列表 查看已保存报告的列表 查看有关您的预留的信息 查看您的预留建议 您的 Cost Explorer 成本 Cost Explorer 页面顶部是 Month-to-date costs(当月至今成本) 和 Forecasted month end costs(月底预测成本) 。 Month-to-date costs 显示本月到目前为止您估计已经发生了多少费用,并将其与上个月的这个时间进行比较。 Forecasted month end costs(月底预测成本) 显示您在月末应付的 Cost Explorer 估算,并将您的估算成本与上个月的实际成本进行比较。 Month-to-date costs 和 Forecasted month end costs 都不包括退款。 Cost Explorer 的成本仅以美元显示。 您的 Cost Explorer 趋势 在 this month trends(本月趋势) 部分中,Cost Explorer 显示前几个成本趋势。例如,与特定服务相关的成本上升或者特定类型的 RI 的成本上升。要查看所有成本趋势,请在趋势部分的右上角选择 View all trends (查看所有趋势) 。 要更深入地了解趋势,请选择此选项。您将转到一个 Cost Explorer 图表页面,显示计算该趋势所需的成本。 您的每日未混合成本 在 Cost Explorer 控制面板的中心,Cost Explorer 显示当前未混合每日成本的图表。您可以通过选择右上角的 Explore costs (探索成本) 来访问用于创建图表的筛选条件和参数。这会将您带到 Cost Explorer 报告页面,使您可以访问默认 Cost Explorer 报告和修改用于创建图表的参数。该 Cost Explorer 报告提供额外功能,例如将数据作为 CSV 文件下载以及将特定参数保存为报告。有关更多信息,请参阅 使用 Cost Explorer 报告了解成本 。您的每日非混合成本不包括退款。 您的月度未混合成本 月粒度 您可以按月粒度查看未混合成本,并查看应用于月度账单的折扣。在预测成本时,默认情况下会包括折扣。要查看未混合成本,请打开 Cost Explorer 页面并从导航窗格中选择 Cost Explorer 来查看您的未混合成本。折扣在图表中显示为 RI Volume Discount 。折扣金额与您的 Billing and Cost Management 控制台中显示的折扣金额一致。 在 Billing and Cost Management 控制台中查看详细信息 打开 账单与成本管理控制台,网址为 https://console.aws.amazon.com/costmanagement/ 。 在导航窗格上,选择 账单 。 要显示该折扣,请选择 Credits, Total Discounts and Tax Invoices(服务抵扣、总折扣和税务发票) 下 Total Discounts(总折扣) 旁边的箭头。 月度总费用 您可以通过排除显示 RI Volume Discount 来查看月度总费用。 要在月度视图中排除 RI 批量折扣。 打开 账单与成本管理控制台,网址为 https://console.aws.amazon.com/costmanagement/ 。 在左侧窗格中,选择 Cost Explorer 。 选择 Cost & Usage 。 在 Filters 窗格中,选择 Charge Type 。 选择 RI Volume Discount 。 要打开下拉菜单,请选择 Include only 和 Exclude only 。 选择 Apply filters 。 您的净未混合成本 您可以在计算出所有适用折扣后查看您的净成本。作为最佳实践,您仍应排除所有手动调整,如退款和服务抵扣金额。 RI Volume Discounts 不再可见,因为这些是折扣后的金额。 您最近的 Cost Explorer 报告 在 Cost Explorer 控制面板的底部是您最近访问过的报告的列表、您访问它们的时间以及返回到报告的链接。这使您可以在报告之间切换或记住您认为最有用的报告。 有关 Cost Explorer 报告的更多信息,请参阅 使用 Cost Explorer 报告了解成本 。 您的摊销成本 这使您能够查看您的 AWS 承诺成本(例如 Amazon EC2 预留实例或节省计划)在选择期内的使用情况。AWS 通过合并未混合的预付费用和周期性预留费用来估算摊销成本,并计算预付费用或周期性预留费用适用期间的有效费率。在每日视图中,Cost Explorer 将在月初或购买日显示您的预留费用的未使用部分。 您的摊销成本 这使您能够在折扣后查看 AWS 承诺成本,例如 Amazon EC2 预留实例或节省计划,并通过额外的逻辑显示实际成本随时间的变化。由于节省计划和预留实例通常有与之相关的预付或周期性月费,因此净摊销成本数据集通过显示折扣后费用在预付费用或周期性费用适用期间的摊销情况来揭示真实成本。 Javascript 在您的浏览器中被禁用或不可用。 要使用 Amazon Web Services 文档,必须启用 Javascript。请参阅浏览器的帮助页面以了解相关说明。 文档惯例 开始使用 Cost Explorer 使用 Cost Explorer 图表 此页面对您有帮助吗?- 是 感谢您对我们工作的肯定! 如果不耽误您的时间,请告诉我们做得好的地方,让我们做得更好。 此页面对您有帮助吗?- 否 感谢您告诉我们本页内容还需要完善。很抱歉让您失望了。 如果不耽误您的时间,请告诉我们如何改进文档。 | 2026-01-13T09:29:31 |
https://www.chinadaily.com.cn/a/202512/15/WS69400570a310d6866eb2ebdd.html | Hengshan Mountain glistens with iconic winter rime scenery - Chinadaily.com.cn Search HOME CHINA WORLD BUSINESS LIFESTYLE CULTURE TRAVEL WATCHTHIS SPORTS OPINION REGIONAL FORUM NEWSPAPER MOBILE Home China Society Home / China / Society Hengshan Mountain glistens with iconic winter rime scenery By LI MUYUN and ZHU YOUFANG in Changsha | chinadaily.com.cn | Updated: 2025-12-15 20:56 Share Share - WeChat --> CLOSE Hengshan Mountain in Hunan province transformed into a glistening winter paradise this past weekend, with spectacular rime scenery drawing visitors after a recent snowfall. [Photo by Lin Xiyang/for chinadaily.com.cn] Hengshan Mountain in Hunan province transformed into a glistening winter paradise this past weekend, with spectacular rime scenery drawing visitors after a recent snowfall. This renowned mountain, also known as Nanyue, frequently showcases trees adorned with crystal ice formations created by the combination of low temperatures and high humidity. Known as the "Nanyue rime", this phenomenon typically occurs between November and March, gracing the landscape for an average of 63 days each winter season. This winter spectacle has inspired many poets and artists throughout history. --> 1 2 3 4 5 6 7 8 Next >>| --> 1/8 Next Photo Symphony of life in Yellow River Delta Workers build giant snowman in Heilongjiang Watch it again: SCIO briefing on national economic performance of November Breathing new life into lakes Zhejiang banks bet big on high-tech drivers Thrills designed for 'wimps' make giant leap in tourism --> Related Stories Hengshan Mountain in Hunan shimmers with first rime of winter Modern agriculture making harvests more fruitful Photographer documents final days of centenarian war heroes Chinese villagers busy with farm work Provinces work to protect crops amid drought --> Top BACK TO THE TOP English 中文 HOME CHINA WORLD BUSINESS LIFESTYLE CULTURE TRAVEL VIDEO SPORTS OPINION REGIONAL NEWSPAPER China Daily PDF China Daily E-paper MOBILE Copyright 1994 - . All rights reserved. The content (including but not limited to text, photo, multimedia information, etc) published in this site belongs to China Daily Information Co (CDIC). Without written authorization from CDIC, such content shall not be republished or used in any form. Note: Browsers with 1024*768 or higher resolution are suggested for this site. License for publishing multimedia online 0108263 Registration Number: 130349 About China Daily Advertise on Site Contact Us Job Offer Expat Employment FOLLOW US Copyright 1994 - . All rights reserved. The content (including but not limited to text, photo, multimedia information, etc) published in this site belongs to China Daily Information Co (CDIC). Without written authorization from CDIC, such content shall not be republished or used in any form. --> | 2026-01-13T09:29:31 |
https://docs.aws.amazon.com/it_it/cost-management/latest/userguide/add-tags-to-dashboards.html | Aggiungere tag alle dashboard - AWS Gestione dei costi Aggiungere tag alle dashboard - AWS Gestione dei costi Documentazione AWS Billing and Cost Management Guida per l’utente Le traduzioni sono generate tramite traduzione automatica. In caso di conflitto tra il contenuto di una traduzione e la versione originale in Inglese, quest'ultima prevarrà. Aggiungere tag alle dashboard I tag ti aiutano a identificare, organizzare e gestire le dashboard aggiungendo etichette descrittive. Puoi etichettare le dashboard per identificare il reparto che le ha create, monitorarle per progetto o iniziativa, etichettarne lo scopo o contrassegnarle per ambienti diversi. Ad esempio, puoi utilizzare tag come Department = Marketing o Project = Cost-Optimization-2025 per classificare le tue dashboard. Quando l'organizzazione dispone di molte dashboard, i tag diventano particolarmente utili. Ti consentono di filtrare e cercare dashboard specifici, controllare l'accesso tramite policy IAM basate sui valori dei tag e tenere traccia delle dashboard che hanno scopi simili tra team diversi. Se utilizzi la AWS CLI o l'SDK, i tag ti aiutano anche a gestire i dashboard correlati come gruppo. Per aggiungere tag a una dashboard Apri la console di Fatturazione e Gestione dei costi all'indirizzo https://console.aws.amazon.com/costmanagement/ . Nel pannello di navigazione seleziona Dashboards (Pannelli di controllo). Seleziona la dashboard a cui desideri taggare. Scegli Azioni , quindi scegli Gestisci tag dall'elenco a discesa. Scegli Aggiungi nuovo tag . Inserisci la chiave e il valore (opzionale) per il tag. Scegli Aggiungi nuovo tag per aggiungere altri tag. Il numero massimo di tag che puoi aggiungere è 50 Scegli Save changes (Salva modifiche). Dopo aver salvato le modifiche, i tag vengono applicati alla dashboard e possono essere utilizzati per il filtraggio e il controllo degli accessi. JavaScript è disabilitato o non è disponibile nel tuo browser. Per usare la documentazione AWS, JavaScript deve essere abilitato. Consulta le pagine della guida del browser per le istruzioni. Convenzioni dei documenti Dashboard duplicati Analisi dei costi e dell'utilizzo con AWS Cost Explorer Questa pagina ti è stata utile? - Sì Grazie per averci comunicato che stiamo facendo un buon lavoro! Se hai un momento, ti invitiamo a dirci che cosa abbiamo fatto che ti è piaciuto così possiamo offrirti altri contenuti simili. Questa pagina ti è stata utile? - No Grazie per averci comunicato che questa pagina ha bisogno di essere modificata. Siamo spiacenti di non aver soddisfatto le tue esigenze. Se hai un momento, ti invitiamo a dirci come possiamo migliorare la documentazione. | 2026-01-13T09:29:32 |
http://groovy-lang.org/syntax.html#all-strings | The Apache Groovy programming language - Syntax Socialize Discuss on the mailing-list Groovy on X Groovy on Bluesky Groovy on Mastodon Groovy on LinkedIn Events and conferences Source code on GitHub Report issues in Jira Stack Overflow questions Slack Community You are using an outdated browser. Please upgrade your browser to improve your experience. Apache Groovy™ Learn Documentation Download Support Contribute Ecosystem Blog posts Socialize Table of contents 1. Comments 1.1. Single-line comment 1.2. Multiline comment 1.3. Groovydoc comment 1.4. Shebang line 2. Keywords 3. Identifiers 3.1. Normal identifiers 3.2. Quoted identifiers 4. Strings 4.1. Single-quoted string 4.2. String concatenation 4.3. Triple-single-quoted string 4.3.1. Escaping special characters 4.3.2. Unicode escape sequence 4.4. Double-quoted string 4.4.1. String interpolation 4.4.2. Special case of interpolating closure expressions 4.4.3. Interoperability with Java 4.4.4. GString and String hashCodes 4.5. Triple-double-quoted string 4.6. Slashy string 4.6.1. Special cases 4.7. Dollar slashy string 4.8. String summary table 4.9. Characters 5. Numbers 5.1. Integral literals 5.1.1. Alternative non-base 10 representations Binary literal Octal literal Hexadecimal literal 5.2. Decimal literals 5.3. Underscore in literals 5.4. Number type suffixes 5.5. Math operations 5.5.1. The case of the division operator 5.5.2. The case of the power operator 6. Booleans 7. Lists 8. Arrays 8.1. Java-style array initialization 9. Maps Syntax This chapter covers the syntax of the Groovy programming language. The grammar of the language derives from the Java grammar, but enhances it with specific constructs for Groovy, and allows certain simplifications. 1. Comments 1.1. Single-line comment Single-line comments start with // and can be found at any position in the line. The characters following // , until the end of the line, are considered part of the comment. // a standalone single line comment println "hello" // a comment till the end of the line 1.2. Multiline comment A multiline comment starts with /* and can be found at any position in the line. The characters following /* will be considered part of the comment, including new line characters, up to the first */ closing the comment. Multiline comments can thus be put at the end of a statement, or even inside a statement. /* a standalone multiline comment spanning two lines */ println "hello" /* a multiline comment starting at the end of a statement */ println 1 /* one */ + 2 /* two */ 1.3. Groovydoc comment Similarly to multiline comments, Groovydoc comments are multiline, but start with /** and end with */ . Lines following the first Groovydoc comment line can optionally start with a star * . Those comments are associated with: type definitions (classes, interfaces, enums, annotations), fields and properties definitions methods definitions Although the compiler will not complain about Groovydoc comments not being associated with the above language elements, you should prepend those constructs with the comment right before it. /** * A Class description */ class Person { /** the name of the person */ String name /** * Creates a greeting method for a certain person. * * @param otherPerson the person to greet * @return a greeting message */ String greet(String otherPerson) { "Hello ${otherPerson}" } } Groovydoc follows the same conventions as Java’s own Javadoc. So you’ll be able to use the same tags as with Javadoc. In addition, Groovy supports Runtime Groovydoc since 3.0.0, i.e. Groovydoc can be retained at runtime. Runtime Groovydoc is disabled by default. It can be enabled by adding JVM option -Dgroovy.attach.runtime.groovydoc=true The Runtime Groovydoc starts with /**@ and ends with */ , for example: /**@ * Some class groovydoc for Foo */ class Foo { /**@ * Some method groovydoc for bar */ void bar() { } } assert Foo.class.groovydoc.content.contains('Some class groovydoc for Foo') (1) assert Foo.class.getMethod('bar', new Class[0]).groovydoc.content.contains('Some method groovydoc for bar') (2) 1 Get the runtime groovydoc for class Foo 2 Get the runtime groovydoc for method bar 1.4. Shebang line Beside the single-line comment, there is a special line comment, often called the shebang line understood by UNIX systems which allows scripts to be run directly from the command-line, provided you have installed the Groovy distribution and the groovy command is available on the PATH . #!/usr/bin/env groovy println "Hello from the shebang line" The # character must be the first character of the file. Any indentation would yield a compilation error. 2. Keywords Groovy has the following reserved keywords: Table 1. Reserved Keywords abstract assert break case catch class const continue def default do else enum extends final finally for goto if implements import instanceof interface native new null non-sealed package public protected private return static strictfp super switch synchronized this threadsafe throw throws transient try while Of these, const , goto , strictfp , and threadsafe are not currently in use. The reserved keywords can’t in general be used for variable, field and method names. A trick allows methods to be defined having the same name as a keyword by surrounding the name in quotes as shown in the following example: // reserved keywords can be used for method names if quoted def "abstract"() { true } // when calling such methods, the name must be qualified using "this." this.abstract() Using such names might be confusing and is often best to avoid. The trick is primarily intended to enable certain Java integration scenarios and certain DSL scenarios where having "verbs" and "nouns" with the same name as keywords may be desirable. In addition, Groovy has the following contextual keywords: Table 2. Contextual Keywords as in permits record sealed trait var yields These words are only keywords in certain contexts and can be more freely used in some places, in particular for variables, fields and method names. This extra lenience allows using method or variable names that were not keywords in earlier versions of Groovy or are not keywords in Java. Examples are shown here: // contextual keywords can be used for field and variable names def as = true assert as // contextual keywords can be used for method names def in() { true } // when calling such methods, the name only needs to be qualified using "this." in scenarios which would be ambiguous this.in() Groovy programmers familiar with these contextual keywords may still wish to avoid using those names unless there is a good reason to use such a name. The restrictions on reserved keywords also apply for the primitive types, the boolean literals and the null literal (all of which are discussed later): Table 3. Other reserved words null true false boolean char byte short int long float double While not recommended, the same trick as for reserved keywords can be used: def "null"() { true } // not recommended; potentially confusing assert this.null() // must be qualified Using such words as method names is potentially confusing and is often best to avoid, however, it might be useful for certain kinds of DSLs . 3. Identifiers 3.1. Normal identifiers Identifiers start with a letter, a dollar or an underscore. They cannot start with a number. A letter can be in the following ranges: 'a' to 'z' (lowercase ascii letter) 'A' to 'Z' (uppercase ascii letter) '\u00C0' to '\u00D6' '\u00D8' to '\u00F6' '\u00F8' to '\u00FF' '\u0100' to '\uFFFE' Then following characters can contain letters and numbers. Here are a few examples of valid identifiers (here, variable names): def name def item3 def with_underscore def $dollarStart But the following ones are invalid identifiers: def 3tier def a+b def a#b All keywords are also valid identifiers when following a dot: foo.as foo.assert foo.break foo.case foo.catch 3.2. Quoted identifiers Quoted identifiers appear after the dot of a dotted expression. For instance, the name part of the person.name expression can be quoted with person."name" or person.'name' . This is particularly interesting when certain identifiers contain illegal characters that are forbidden by the Java Language Specification, but which are allowed by Groovy when quoted. For example, characters like a dash, a space, an exclamation mark, etc. def map = [:] map."an identifier with a space and double quotes" = "ALLOWED" map.'with-dash-signs-and-single-quotes' = "ALLOWED" assert map."an identifier with a space and double quotes" == "ALLOWED" assert map.'with-dash-signs-and-single-quotes' == "ALLOWED" As we shall see in the following section on strings , Groovy provides different string literals. All kind of strings are actually allowed after the dot: map.'single quote' map."double quote" map.'''triple single quote''' map."""triple double quote""" map./slashy string/ map.$/dollar slashy string/$ There’s a difference between plain character strings and Groovy’s GStrings (interpolated strings), as in that the latter case, the interpolated values are inserted in the final string for evaluating the whole identifier: def firstname = "Homer" map."Simpson-${firstname}" = "Homer Simpson" assert map.'Simpson-Homer' == "Homer Simpson" 4. Strings Text literals are represented in the form of chain of characters called strings. Groovy lets you instantiate java.lang.String objects, as well as GStrings ( groovy.lang.GString ) which are also called interpolated strings in other programming languages. 4.1. Single-quoted string Single-quoted strings are a series of characters surrounded by single quotes: 'a single-quoted string' Single-quoted strings are plain java.lang.String and don’t support interpolation. 4.2. String concatenation All the Groovy strings can be concatenated with the + operator: assert 'ab' == 'a' + 'b' 4.3. Triple-single-quoted string Triple-single-quoted strings are a series of characters surrounded by triplets of single quotes: '''a triple-single-quoted string''' Triple-single-quoted strings are plain java.lang.String and don’t support interpolation. Triple-single-quoted strings may span multiple lines. The content of the string can cross line boundaries without the need to split the string in several pieces and without concatenation or newline escape characters: def aMultilineString = '''line one line two line three''' If your code is indented, for example in the body of the method of a class, your string will contain the whitespace of the indentation. The Groovy Development Kit contains methods for stripping out the indentation with the String#stripIndent() method, and with the String#stripMargin() method that takes a delimiter character to identify the text to remove from the beginning of a string. When creating a string as follows: def startingAndEndingWithANewline = ''' line one line two line three ''' You will notice that the resulting string contains a newline character as first character. It is possible to strip that character by escaping the newline with a backslash: def strippedFirstNewline = '''\ line one line two line three ''' assert !strippedFirstNewline.startsWith('\n') 4.3.1. Escaping special characters You can escape single quotes with the backslash character to avoid terminating the string literal: 'an escaped single quote: \' needs a backslash' And you can escape the escape character itself with a double backslash: 'an escaped escape character: \\ needs a double backslash' Some special characters also use the backslash as escape character: Escape sequence Character \b backspace \f formfeed \n newline \r carriage return \s single space \t tabulation \\ backslash \' single quote within a single-quoted string (and optional for triple-single-quoted and double-quoted strings) \" double quote within a double-quoted string (and optional for triple-double-quoted and single-quoted strings) We’ll see some more escaping details when it comes to other types of strings discussed later. 4.3.2. Unicode escape sequence For characters that are not present on your keyboard, you can use unicode escape sequences: a backslash, followed by 'u', then 4 hexadecimal digits. For example, the Euro currency symbol can be represented with: 'The Euro currency symbol: \u20AC' 4.4. Double-quoted string Double-quoted strings are a series of characters surrounded by double quotes: "a double-quoted string" Double-quoted strings are plain java.lang.String if there’s no interpolated expression, but are groovy.lang.GString instances if interpolation is present. To escape a double quote, you can use the backslash character: "A double quote: \"". 4.4.1. String interpolation Any Groovy expression can be interpolated in all string literals, apart from single and triple-single-quoted strings. Interpolation is the act of replacing a placeholder in the string with its value upon evaluation of the string. The placeholder expressions are surrounded by ${} . The curly braces may be omitted for unambiguous dotted expressions, i.e. we can use just a $ prefix in those cases. If the GString is ever passed to a method taking a String, the expression value inside the placeholder is evaluated to its string representation (by calling toString() on that expression) and the resulting String is passed to the method. Here, we have a string with a placeholder referencing a local variable: def name = 'Guillaume' // a plain string def greeting = "Hello ${name}" assert greeting.toString() == 'Hello Guillaume' Any Groovy expression is valid, as we can see in this example with an arithmetic expression: def sum = "The sum of 2 and 3 equals ${2 + 3}" assert sum.toString() == 'The sum of 2 and 3 equals 5' Not only are expressions allowed in between the ${} placeholder, but so are statements. However, a statement’s value is just null . So if several statements are inserted in that placeholder, the last one should somehow return a meaningful value to be inserted. For instance, "The sum of 1 and 2 is equal to ${def a = 1; def b = 2; a + b}" is supported and works as expected but a good practice is usually to stick to simple expressions inside GString placeholders. In addition to ${} placeholders, we can also use a lone $ sign prefixing a dotted expression: def person = [name: 'Guillaume', age: 36] assert "$person.name is $person.age years old" == 'Guillaume is 36 years old' But only dotted expressions of the form a.b , a.b.c , etc, are valid. Expressions containing parentheses like method calls, curly braces for closures, dots which aren’t part of a property expression or arithmetic operators would be invalid. Given the following variable definition of a number: def number = 3.14 The following statement will throw a groovy.lang.MissingPropertyException because Groovy believes you’re trying to access the toString property of that number, which doesn’t exist: shouldFail(MissingPropertyException) { println "$number.toString()" } You can think of "$number.toString()" as being interpreted by the parser as "${number.toString}()" . Similarly, if the expression is ambiguous, you need to keep the curly braces: String thing = 'treasure' assert 'The x-coordinate of the treasure is represented by treasure.x' == "The x-coordinate of the $thing is represented by $thing.x" // <= Not allowed: ambiguous!! assert 'The x-coordinate of the treasure is represented by treasure.x' == "The x-coordinate of the $thing is represented by ${thing}.x" // <= Curly braces required If you need to escape the $ or ${} placeholders in a GString so they appear as is without interpolation, you just need to use a \ backslash character to escape the dollar sign: assert '$5' == "\$5" assert '${name}' == "\${name}" 4.4.2. Special case of interpolating closure expressions So far, we’ve seen we could interpolate arbitrary expressions inside the ${} placeholder, but there is a special case and notation for closure expressions. When the placeholder contains an arrow, ${→} , the expression is actually a closure expression — you can think of it as a closure with a dollar prepended in front of it: def sParameterLessClosure = "1 + 2 == ${-> 3}" (1) assert sParameterLessClosure == '1 + 2 == 3' def sOneParamClosure = "1 + 2 == ${ w -> w << 3}" (2) assert sOneParamClosure == '1 + 2 == 3' 1 The closure is a parameterless closure which doesn’t take arguments. 2 Here, the closure takes a single java.io.StringWriter argument, to which you can append content with the << leftShift operator. In either case, both placeholders are embedded closures. In appearance, it looks like a more verbose way of defining expressions to be interpolated, but closures have an interesting advantage over mere expressions: lazy evaluation. Let’s consider the following sample: def number = 1 (1) def eagerGString = "value == ${number}" def lazyGString = "value == ${ -> number }" assert eagerGString == "value == 1" (2) assert lazyGString == "value == 1" (3) number = 2 (4) assert eagerGString == "value == 1" (5) assert lazyGString == "value == 2" (6) 1 We define a number variable containing 1 that we then interpolate within two GStrings, as an expression in eagerGString and as a closure in lazyGString . 2 We expect the resulting string to contain the same string value of 1 for eagerGString . 3 Similarly for lazyGString 4 Then we change the value of the variable to a new number 5 With a plain interpolated expression, the value was actually bound at the time of creation of the GString. 6 But with a closure expression, the closure is called upon each coercion of the GString into String, resulting in an updated string containing the new number value. An embedded closure expression taking more than one parameter will generate an exception at runtime. Only closures with zero or one parameter are allowed. 4.4.3. Interoperability with Java When a method (whether implemented in Java or Groovy) expects a java.lang.String , but we pass a groovy.lang.GString instance, the toString() method of the GString is automatically and transparently called. String takeString(String message) { (4) assert message instanceof String (5) return message } def message = "The message is ${'hello'}" (1) assert message instanceof GString (2) def result = takeString(message) (3) assert result instanceof String assert result == 'The message is hello' 1 We create a GString variable 2 We double-check it’s an instance of the GString 3 We then pass that GString to a method taking a String as parameter 4 The signature of the takeString() method explicitly says its sole parameter is a String 5 We also verify that the parameter is indeed a String and not a GString. 4.4.4. GString and String hashCodes Although interpolated strings can be used in lieu of plain Java strings, they differ with strings in a particular way: their hashCodes are different. Plain Java strings are immutable, whereas the resulting String representation of a GString can vary, depending on its interpolated values. Even for the same resulting string, GStrings and Strings don’t have the same hashCode. assert "one: ${1}".hashCode() != "one: 1".hashCode() GString and Strings having different hashCode values, using GString as Map keys should be avoided, especially if we try to retrieve an associated value with a String instead of a GString. def key = "a" def m = ["${key}": "letter ${key}"] (1) assert m["a"] == null (2) 1 The map is created with an initial pair whose key is a GString 2 When we try to fetch the value with a String key, we will not find it, as Strings and GString have different hashCode values 4.5. Triple-double-quoted string Triple-double-quoted strings behave like double-quoted strings, with the addition that they are multiline, like the triple-single-quoted strings. def name = 'Groovy' def template = """ Dear Mr ${name}, You're the winner of the lottery! Yours sincerly, Dave """ assert template.toString().contains('Groovy') Neither double quotes nor single quotes need be escaped in triple-double-quoted strings. 4.6. Slashy string Beyond the usual quoted strings, Groovy offers slashy strings, which use / as the opening and closing delimiter. Slashy strings are particularly useful for defining regular expressions and patterns, as there is no need to escape backslashes. Example of a slashy string: def fooPattern = /.*foo.*/ assert fooPattern == '.*foo.*' Only forward slashes need to be escaped with a backslash: def escapeSlash = /The character \/ is a forward slash/ assert escapeSlash == 'The character / is a forward slash' Slashy strings are multiline: def multilineSlashy = /one two three/ assert multilineSlashy.contains('\n') Slashy strings can be thought of as just another way to define a GString but with different escaping rules. They hence support interpolation: def color = 'blue' def interpolatedSlashy = /a ${color} car/ assert interpolatedSlashy == 'a blue car' 4.6.1. Special cases An empty slashy string cannot be represented with a double forward slash, as it’s understood by the Groovy parser as a line comment. That’s why the following assert would actually not compile as it would look like a non-terminated statement: assert '' == // As slashy strings were mostly designed to make regexp easier so a few things that are errors in GStrings like $() or $5 will work with slashy strings. Remember that escaping backslashes is not required. An alternative way of thinking of this is that in fact escaping is not supported. The slashy string /\t/ won’t contain a tab but instead a backslash followed by the character 't'. Escaping is only allowed for the slash character, i.e. /\/folder/ will be a slashy string containing '/folder' . A consequence of slash escaping is that a slashy string can’t end with a backslash. Otherwise that will escape the slashy string terminator. You can instead use a special trick, /ends with slash ${'\\'}/ . But best just avoid using a slashy string in such a case. 4.7. Dollar slashy string Dollar slashy strings are multiline GStrings delimited with an opening $/ and a closing /$ . The escaping character is the dollar sign, and it can escape another dollar, or a forward slash. Escaping for the dollar and forward slash characters is only needed where conflicts arise with the special use of those characters. The characters $foo would normally indicate a GString placeholder, so those four characters can be entered into a dollar slashy string by escaping the dollar, i.e. $$foo . Similarly, you will need to escape a dollar slashy closing delimiter if you want it to appear in your string. Here are a few examples: def name = "Guillaume" def date = "April, 1st" def dollarSlashy = $/ Hello $name, today we're ${date}. $ dollar sign $$ escaped dollar sign \ backslash / forward slash $/ escaped forward slash $$$/ escaped opening dollar slashy $/$$ escaped closing dollar slashy /$ assert [ 'Guillaume', 'April, 1st', '$ dollar sign', '$ escaped dollar sign', '\\ backslash', '/ forward slash', '/ escaped forward slash', '$/ escaped opening dollar slashy', '/$ escaped closing dollar slashy' ].every { dollarSlashy.contains(it) } It was created to overcome some of the limitations of the slashy string escaping rules. Use it when its escaping rules suit your string contents (typically if it has some slashes you don’t want to escape). 4.8. String summary table String name String syntax Interpolated Multiline Escape character Single-quoted '…​' \ Triple-single-quoted '''…​''' \ Double-quoted "…​" \ Triple-double-quoted """…​""" \ Slashy /…​/ \ Dollar slashy $/…​/$ $ 4.9. Characters Unlike Java, Groovy doesn’t have an explicit character literal. However, you can be explicit about making a Groovy string an actual character, by three different means: char c1 = 'A' (1) assert c1 instanceof Character def c2 = 'B' as char (2) assert c2 instanceof Character def c3 = (char)'C' (3) assert c3 instanceof Character 1 by being explicit when declaring a variable holding the character by specifying the char type 2 by using type coercion with the as operator 3 by using a cast to char operation The first option 1 is interesting when the character is held in a variable, while the other two ( 2 and 3 ) are more interesting when a char value must be passed as argument of a method call. 5. Numbers Groovy supports different kinds of integral literals and decimal literals, backed by the usual Number types of Java. 5.1. Integral literals The integral literal types are the same as in Java: byte char short int long java.math.BigInteger You can create integral numbers of those types with the following declarations: // primitive types byte b = 1 char c = 2 short s = 3 int i = 4 long l = 5 // infinite precision BigInteger bi = 6 If you use optional typing by using the def keyword, the type of the integral number will vary: it’ll adapt to the capacity of the type that can hold that number. For positive numbers: def a = 1 assert a instanceof Integer // Integer.MAX_VALUE def b = 2147483647 assert b instanceof Integer // Integer.MAX_VALUE + 1 def c = 2147483648 assert c instanceof Long // Long.MAX_VALUE def d = 9223372036854775807 assert d instanceof Long // Long.MAX_VALUE + 1 def e = 9223372036854775808 assert e instanceof BigInteger As well as for negative numbers: def na = -1 assert na instanceof Integer // Integer.MIN_VALUE def nb = -2147483648 assert nb instanceof Integer // Integer.MIN_VALUE - 1 def nc = -2147483649 assert nc instanceof Long // Long.MIN_VALUE def nd = -9223372036854775808 assert nd instanceof Long // Long.MIN_VALUE - 1 def ne = -9223372036854775809 assert ne instanceof BigInteger 5.1.1. Alternative non-base 10 representations Numbers can also be represented in binary, octal, hexadecimal and decimal bases. Binary literal Binary numbers start with a 0b prefix: int xInt = 0b10101111 assert xInt == 175 short xShort = 0b11001001 assert xShort == 201 as short byte xByte = 0b11 assert xByte == 3 as byte long xLong = 0b101101101101 assert xLong == 2925l BigInteger xBigInteger = 0b111100100001 assert xBigInteger == 3873g int xNegativeInt = -0b10101111 assert xNegativeInt == -175 Octal literal Octal numbers are specified in the typical format of 0 followed by octal digits. int xInt = 077 assert xInt == 63 short xShort = 011 assert xShort == 9 as short byte xByte = 032 assert xByte == 26 as byte long xLong = 0246 assert xLong == 166l BigInteger xBigInteger = 01111 assert xBigInteger == 585g int xNegativeInt = -077 assert xNegativeInt == -63 Hexadecimal literal Hexadecimal numbers are specified in the typical format of 0x followed by hex digits. int xInt = 0x77 assert xInt == 119 short xShort = 0xaa assert xShort == 170 as short byte xByte = 0x3a assert xByte == 58 as byte long xLong = 0xffff assert xLong == 65535l BigInteger xBigInteger = 0xaaaa assert xBigInteger == 43690g Double xDouble = new Double('0x1.0p0') assert xDouble == 1.0d int xNegativeInt = -0x77 assert xNegativeInt == -119 5.2. Decimal literals The decimal literal types are the same as in Java: float double java.math.BigDecimal You can create decimal numbers of those types with the following declarations: // primitive types float f = 1.234 double d = 2.345 // infinite precision BigDecimal bd = 3.456 Decimals can use exponents, with the e or E exponent letter, followed by an optional sign, and an integral number representing the exponent: assert 1e3 == 1_000.0 assert 2E4 == 20_000.0 assert 3e+1 == 30.0 assert 4E-2 == 0.04 assert 5e-1 == 0.5 Conveniently for exact decimal number calculations, Groovy chooses java.math.BigDecimal as its decimal number type. In addition, both float and double are supported, but require an explicit type declaration, type coercion or suffix. Even if BigDecimal is the default for decimal numbers, such literals are accepted in methods or closures taking float or double as parameter types. Decimal numbers can’t be represented using a binary, octal or hexadecimal representation. 5.3. Underscore in literals When writing long literal numbers, it’s harder on the eye to figure out how some numbers are grouped together, for example with groups of thousands, of words, etc. By allowing you to place underscore in number literals, it’s easier to spot those groups: long creditCardNumber = 1234_5678_9012_3456L long socialSecurityNumbers = 999_99_9999L double monetaryAmount = 12_345_132.12 long hexBytes = 0xFF_EC_DE_5E long hexWords = 0xFFEC_DE5E long maxLong = 0x7fff_ffff_ffff_ffffL long alsoMaxLong = 9_223_372_036_854_775_807L long bytes = 0b11010010_01101001_10010100_10010010 5.4. Number type suffixes We can force a number (including binary, octals and hexadecimals) to have a specific type by giving a suffix (see table below), either uppercase or lowercase. Type Suffix BigInteger G or g Long L or l Integer I or i BigDecimal G or g Double D or d Float F or f Examples: assert 42I == Integer.valueOf('42') assert 42i == Integer.valueOf('42') // lowercase i more readable assert 123L == Long.valueOf("123") // uppercase L more readable assert 2147483648 == Long.valueOf('2147483648') // Long type used, value too large for an Integer assert 456G == new BigInteger('456') assert 456g == new BigInteger('456') assert 123.45 == new BigDecimal('123.45') // default BigDecimal type used assert .321 == new BigDecimal('.321') assert 1.200065D == Double.valueOf('1.200065') assert 1.234F == Float.valueOf('1.234') assert 1.23E23D == Double.valueOf('1.23E23') assert 0b1111L.class == Long // binary assert 0xFFi.class == Integer // hexadecimal assert 034G.class == BigInteger // octal 5.5. Math operations Although operators are covered in more detail elsewhere, it’s important to discuss the behavior of math operations and what their resulting types are. Division and power binary operations aside (covered below), binary operations between byte , char , short and int result in int binary operations involving long with byte , char , short and int result in long binary operations involving BigInteger and any other integral type result in BigInteger binary operations involving BigDecimal with byte , char , short , int and BigInteger result in BigDecimal binary operations between float , double and BigDecimal result in double binary operations between two BigDecimal result in BigDecimal The following table summarizes those rules: byte char short int long BigInteger float double BigDecimal byte int int int int long BigInteger double double BigDecimal char int int int long BigInteger double double BigDecimal short int int long BigInteger double double BigDecimal int int long BigInteger double double BigDecimal long long BigInteger double double BigDecimal BigInteger BigInteger double double BigDecimal float double double double double double double BigDecimal BigDecimal Thanks to Groovy’s operator overloading, the usual arithmetic operators work as well with BigInteger and BigDecimal , unlike in Java where you have to use explicit methods for operating on those numbers. 5.5.1. The case of the division operator The division operators / (and /= for division and assignment) produce a double result if either operand is a float or double , and a BigDecimal result otherwise (when both operands are any combination of an integral type short , char , byte , int , long , BigInteger or BigDecimal ). BigDecimal division is performed with the divide() method if the division is exact (i.e. yielding a result that can be represented within the bounds of the same precision and scale), or using a MathContext with a precision of the maximum of the two operands' precision plus an extra precision of 10, and a scale of the maximum of 10 and the maximum of the operands' scale. For integer division like in Java, you should use the intdiv() method, as Groovy doesn’t provide a dedicated integer division operator symbol. 5.5.2. The case of the power operator The power operation is represented by the ** operator, with two parameters: the base and the exponent. The result of the power operation depends on its operands, and the result of the operation (in particular if the result can be represented as an integral value). The following rules are used by Groovy’s power operation to determine the resulting type: If the exponent is a decimal value if the result can be represented as an Integer , then return an Integer else if the result can be represented as a Long , then return a Long otherwise return a Double If the exponent is an integral value if the exponent is strictly negative, then return an Integer , Long or Double if the result value fits in that type if the exponent is positive or zero if the base is a BigDecimal , then return a BigDecimal result value if the base is a BigInteger , then return a BigInteger result value if the base is an Integer , then return an Integer if the result value fits in it, otherwise a BigInteger if the base is a Long , then return a Long if the result value fits in it, otherwise a BigInteger We can illustrate those rules with a few examples: // base and exponent are ints and the result can be represented by an Integer assert 2 ** 3 instanceof Integer // 8 assert 10 ** 9 instanceof Integer // 1_000_000_000 // the base is a long, so fit the result in a Long // (although it could have fit in an Integer) assert 5L ** 2 instanceof Long // 25 // the result can't be represented as an Integer or Long, so return a BigInteger assert 100 ** 10 instanceof BigInteger // 10e20 assert 1234 ** 123 instanceof BigInteger // 170515806212727042875... // the base is a BigDecimal and the exponent a negative int // but the result can be represented as an Integer assert 0.5 ** -2 instanceof Integer // 4 // the base is an int, and the exponent a negative float // but again, the result can be represented as an Integer assert 1 ** -0.3f instanceof Integer // 1 // the base is an int, and the exponent a negative int // but the result will be calculated as a Double // (both base and exponent are actually converted to doubles) assert 10 ** -1 instanceof Double // 0.1 // the base is a BigDecimal, and the exponent is an int, so return a BigDecimal assert 1.2 ** 10 instanceof BigDecimal // 6.1917364224 // the base is a float or double, and the exponent is an int // but the result can only be represented as a Double value assert 3.4f ** 5 instanceof Double // 454.35430372146965 assert 5.6d ** 2 instanceof Double // 31.359999999999996 // the exponent is a decimal value // and the result can only be represented as a Double value assert 7.8 ** 1.9 instanceof Double // 49.542708423868476 assert 2 ** 0.1f instanceof Double // 1.0717734636432956 6. Booleans Boolean is a special data type that is used to represent truth values: true and false . Use this data type for simple flags that track true/false conditions . Boolean values can be stored in variables, assigned into fields, just like any other data type: def myBooleanVariable = true boolean untypedBooleanVar = false booleanField = true true and false are the only two primitive boolean values. But more complex boolean expressions can be represented using logical operators . In addition, Groovy has special rules (often referred to as Groovy Truth ) for coercing non-boolean objects to a boolean value. 7. Lists Groovy uses a comma-separated list of values, surrounded by square brackets, to denote lists. Groovy lists are plain JDK java.util.List , as Groovy doesn’t define its own collection classes. The concrete list implementation used when defining list literals are java.util.ArrayList by default, unless you decide to specify otherwise, as we shall see later on. def numbers = [1, 2, 3] (1) assert numbers instanceof List (2) assert numbers.size() == 3 (3) 1 We define a list numbers delimited by commas and surrounded by square brackets, and we assign that list into a variable 2 The list is an instance of Java’s java.util.List interface 3 The size of the list can be queried with the size() method, and shows our list contains 3 elements In the above example, we used a homogeneous list, but you can also create lists containing values of heterogeneous types: def heterogeneous = [1, "a", true] (1) 1 Our list here contains a number, a string and a boolean value We mentioned that by default, list literals are actually instances of java.util.ArrayList , but it is possible to use a different backing type for our lists, thanks to using type coercion with the as operator, or with explicit type declaration for your variables: def arrayList = [1, 2, 3] assert arrayList instanceof java.util.ArrayList def linkedList = [2, 3, 4] as LinkedList (1) assert linkedList instanceof java.util.LinkedList LinkedList otherLinked = [3, 4, 5] (2) assert otherLinked instanceof java.util.LinkedList 1 We use coercion with the as operator to explicitly request a java.util.LinkedList implementation 2 We can say that the variable holding the list literal is of type java.util.LinkedList You can access elements of the list with the [] subscript operator (both for reading and setting values) with positive indices or negative indices to access elements from the end of the list, as well as with ranges, and use the << leftShift operator to append elements to a list: def letters = ['a', 'b', 'c', 'd'] assert letters[0] == 'a' (1) assert letters[1] == 'b' assert letters[-1] == 'd' (2) assert letters[-2] == 'c' letters[2] = 'C' (3) assert letters[2] == 'C' letters << 'e' (4) assert letters[ 4] == 'e' assert letters[-1] == 'e' assert letters[1, 3] == ['b', 'd'] (5) assert letters[2..4] == ['C', 'd', 'e'] (6) 1 Access the first element of the list (zero-based counting) 2 Access the last element of the list with a negative index: -1 is the first element from the end of the list 3 Use an assignment to set a new value for the third element of the list 4 Use the << leftShift operator to append an element at the end of the list 5 Access two elements at once, returning a new list containing those two elements 6 Use a range to access a range of values from the list, from a start to an end element position As lists can be heterogeneous in nature, lists can also contain other lists to create multidimensional lists: def multi = [[0, 1], [2, 3]] (1) assert multi[1][0] == 2 (2) 1 Define a list of numbers 2 Access the second element of the top-most list, and the first element of the inner list 8. Arrays Groovy reuses the list notation for arrays, but to make such literals arrays, you need to explicitly define the type of the array through coercion or type declaration. String[] arrStr = ['Ananas', 'Banana', 'Kiwi'] (1) assert arrStr instanceof String[] (2) assert !(arrStr instanceof List) def numArr = [1, 2, 3] as int[] (3) assert numArr instanceof int[] (4) assert numArr.size() == 3 1 Define an array of strings using explicit variable type declaration 2 Assert that we created an array of strings 3 Create an array of ints with the as operator 4 Assert that we created an array of primitive ints You can also create multi-dimensional arrays: def matrix3 = new Integer[3][3] (1) assert matrix3.size() == 3 Integer[][] matrix2 (2) matrix2 = [[1, 2], [3, 4]] assert matrix2 instanceof Integer[][] 1 You can define the bounds of a new array 2 Or declare an array without specifying its bounds Access to elements of an array follows the same notation as for lists: String[] names = ['Cédric', 'Guillaume', 'Jochen', 'Paul'] assert names[0] == 'Cédric' (1) names[2] = 'Blackdrag' (2) assert names[2] == 'Blackdrag' 1 Retrieve the first element of the array 2 Set the value of the third element of the array to a new value 8.1. Java-style array initialization Groovy has always supported literal list/array definitions using square brackets and has avoided Java-style curly braces so as not to conflict with closure definitions. In the case where the curly braces come immediately after an array type declaration however, there is no ambiguity with closure definitions, so Groovy 3 and above support that variant of the Java array initialization expression. Examples: def primes = new int[] {2, 3, 5, 7, 11} assert primes.size() == 5 && primes.sum() == 28 assert primes.class.name == '[I' def pets = new String[] {'cat', 'dog'} assert pets.size() == 2 && pets.sum() == 'catdog' assert pets.class.name == '[Ljava.lang.String;' // traditional Groovy alternative still supported String[] groovyBooks = [ 'Groovy in Action', 'Making Java Groovy' ] assert groovyBooks.every{ it.contains('Groovy') } 9. Maps Sometimes called dictionaries or associative arrays in other languages, Groovy features maps. Maps associate keys to values, separating keys and values with colons, and each key/value pairs with commas, and the whole keys and values surrounded by square brackets. def colors = [red: '#FF0000', green: '#00FF00', blue: '#0000FF'] (1) assert colors['red'] == '#FF0000' (2) assert colors.green == '#00FF00' (3) colors['pink'] = '#FF00FF' (4) colors.yellow = '#FFFF00' (5) assert colors.pink == '#FF00FF' assert colors['yellow'] == '#FFFF00' assert colors instanceof java.util.LinkedHashMap 1 We define a map of string color names, associated with their hexadecimal-coded html colors 2 We use the subscript notation to check the content associated with the red key 3 We can also use the property notation to assert the color green’s hexadecimal representation 4 Similarly, we can use the subscript notation to add a new key/value pair 5 Or the property notation, to add the yellow color When using names for the keys, we actually define string keys in the map. Groovy creates maps that are actually instances of java.util.LinkedHashMap . If you try to access a key which is not present in the map: assert colors.unknown == null def emptyMap = [:] assert emptyMap.anyKey == null You will retrieve a null result. In the examples above, we used string keys, but you can also use values of other types as keys: def numbers = [1: 'one', 2: 'two'] assert numbers[1] == 'one' Here, we used numbers as keys, as numbers can unambiguously be recognized as numbers, so Groovy will not create a string key like in our previous examples. But consider the case you want to pass a variable in lieu of the key, to have the value of that variable become the key: def key = 'name' def person = [key: 'Guillaume'] (1) assert !person.containsKey('name') (2) assert person.containsKey('key') (3) 1 The key associated with the 'Guillaume' name will actually be the "key" string, not the value associated with the key variable 2 The map doesn’t contain the 'name' key 3 Instead, the map contains a 'key' key You can also pass quoted strings as well as keys: ["name": "Guillaume"]. This is mandatory if your key string isn’t a valid identifier, for example if you wanted to create a string key containing a dash like in: ["street-name": "Main street"]. When you need to pass variable values as keys in your map definitions, you must surround the variable or expression with parentheses: person = [(key): 'Guillaume'] (1) assert person.containsKey('name') (2) assert !person.containsKey('key') (3) 1 This time, we surround the key variable with parentheses, to instruct the parser we are passing a variable rather than defining a string key 2 The map does contain the name key 3 But the map doesn’t contain the key key as before Groovy Learn Documentation Download Support Contribute Ecosystem Blog posts About Source code Security Books Thanks Sponsorship FAQ Search Socialize Discuss on the mailing-list Groovy on X Groovy on Bluesky Groovy on Mastodon Groovy on LinkedIn Events and conferences Source code on GitHub Report issues in Jira Stack Overflow questions Slack Community The Groovy programming language is supported by the Apache Software Foundation and the Groovy community. Apache, Apache Groovy, Groovy, and the ASF logo are either registered trademarks or trademarks of The Apache Software Foundation. © 2003-2025 the Apache Groovy project — Groovy is Open Source: license , privacy policy . | 2026-01-13T09:29:32 |
https://docs.aws.amazon.com/zh_cn/cost-management/latest/userguide/ce-getting-started.html | 开始使用 Cost Explorer - AWS 成本管理 开始使用 Cost Explorer - AWS 成本管理 文档 AWS Billing and Cost Management 用户指南 本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。 开始使用 Cost Explorer 启用 Cost Explorer 后,您可以从 AWS 成本管理控制台启动它。 打开 Cost Explorer 打开 账单与成本管理控制台,网址为 https://console.aws.amazon.com/costmanagement/ 。 这将打开成本面板,其中显示以下内容: 您本月至今的预估费用 您当月的预测成本 您的每日费用图表 您的五大成本趋势 您最近查看的报告列表 Javascript 在您的浏览器中被禁用或不可用。 要使用 Amazon Web Services 文档,必须启用 Javascript。请参阅浏览器的帮助页面以了解相关说明。 文档惯例 控制 Cost Explorer 访问权限 使用 Cost Explorer 探索您的数据 此页面对您有帮助吗?- 是 感谢您对我们工作的肯定! 如果不耽误您的时间,请告诉我们做得好的地方,让我们做得更好。 此页面对您有帮助吗?- 否 感谢您告诉我们本页内容还需要完善。很抱歉让您失望了。 如果不耽误您的时间,请告诉我们如何改进文档。 | 2026-01-13T09:29:32 |
https://docs.aws.amazon.com/zh_cn/cost-management/latest/userguide/ce-advanced-cost-analysis.html | 探索更多数据以进行高级成本分析 - AWS 成本管理 探索更多数据以进行高级成本分析 - AWS 成本管理 文档 AWS Billing and Cost Management 用户指南 本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。 探索更多数据以进行高级成本分析 Cost Explorer 以每日和每月粒度提供当前月份及前 13 个月的 AWS 成本和使用情况数据。您可以在控制台中或使用 Cost Explorer API 查询此数据。 您可以启用多年数据(按月粒度)以及过去 14 天的更精细数据(按小时和天粒度)。启用后,您可以在控制台中或通过 Cost Explorer API 使用此数据。 主题 月粒度的多年数据 精细数据 了解估计每月使用量摘要 配置多年和精细数据 Javascript 在您的浏览器中被禁用或不可用。 要使用 Amazon Web Services 文档,必须启用 Javascript。请参阅浏览器的帮助页面以了解相关说明。 文档惯例 执行成本比较 月粒度的多年数据 此页面对您有帮助吗?- 是 感谢您对我们工作的肯定! 如果不耽误您的时间,请告诉我们做得好的地方,让我们做得更好。 此页面对您有帮助吗?- 否 感谢您告诉我们本页内容还需要完善。很抱歉让您失望了。 如果不耽误您的时间,请告诉我们如何改进文档。 | 2026-01-13T09:29:32 |
http://groovy-lang.org/syntax.html#_hexadecimal_literal | The Apache Groovy programming language - Syntax Socialize Discuss on the mailing-list Groovy on X Groovy on Bluesky Groovy on Mastodon Groovy on LinkedIn Events and conferences Source code on GitHub Report issues in Jira Stack Overflow questions Slack Community You are using an outdated browser. Please upgrade your browser to improve your experience. Apache Groovy™ Learn Documentation Download Support Contribute Ecosystem Blog posts Socialize Table of contents 1. Comments 1.1. Single-line comment 1.2. Multiline comment 1.3. Groovydoc comment 1.4. Shebang line 2. Keywords 3. Identifiers 3.1. Normal identifiers 3.2. Quoted identifiers 4. Strings 4.1. Single-quoted string 4.2. String concatenation 4.3. Triple-single-quoted string 4.3.1. Escaping special characters 4.3.2. Unicode escape sequence 4.4. Double-quoted string 4.4.1. String interpolation 4.4.2. Special case of interpolating closure expressions 4.4.3. Interoperability with Java 4.4.4. GString and String hashCodes 4.5. Triple-double-quoted string 4.6. Slashy string 4.6.1. Special cases 4.7. Dollar slashy string 4.8. String summary table 4.9. Characters 5. Numbers 5.1. Integral literals 5.1.1. Alternative non-base 10 representations Binary literal Octal literal Hexadecimal literal 5.2. Decimal literals 5.3. Underscore in literals 5.4. Number type suffixes 5.5. Math operations 5.5.1. The case of the division operator 5.5.2. The case of the power operator 6. Booleans 7. Lists 8. Arrays 8.1. Java-style array initialization 9. Maps Syntax This chapter covers the syntax of the Groovy programming language. The grammar of the language derives from the Java grammar, but enhances it with specific constructs for Groovy, and allows certain simplifications. 1. Comments 1.1. Single-line comment Single-line comments start with // and can be found at any position in the line. The characters following // , until the end of the line, are considered part of the comment. // a standalone single line comment println "hello" // a comment till the end of the line 1.2. Multiline comment A multiline comment starts with /* and can be found at any position in the line. The characters following /* will be considered part of the comment, including new line characters, up to the first */ closing the comment. Multiline comments can thus be put at the end of a statement, or even inside a statement. /* a standalone multiline comment spanning two lines */ println "hello" /* a multiline comment starting at the end of a statement */ println 1 /* one */ + 2 /* two */ 1.3. Groovydoc comment Similarly to multiline comments, Groovydoc comments are multiline, but start with /** and end with */ . Lines following the first Groovydoc comment line can optionally start with a star * . Those comments are associated with: type definitions (classes, interfaces, enums, annotations), fields and properties definitions methods definitions Although the compiler will not complain about Groovydoc comments not being associated with the above language elements, you should prepend those constructs with the comment right before it. /** * A Class description */ class Person { /** the name of the person */ String name /** * Creates a greeting method for a certain person. * * @param otherPerson the person to greet * @return a greeting message */ String greet(String otherPerson) { "Hello ${otherPerson}" } } Groovydoc follows the same conventions as Java’s own Javadoc. So you’ll be able to use the same tags as with Javadoc. In addition, Groovy supports Runtime Groovydoc since 3.0.0, i.e. Groovydoc can be retained at runtime. Runtime Groovydoc is disabled by default. It can be enabled by adding JVM option -Dgroovy.attach.runtime.groovydoc=true The Runtime Groovydoc starts with /**@ and ends with */ , for example: /**@ * Some class groovydoc for Foo */ class Foo { /**@ * Some method groovydoc for bar */ void bar() { } } assert Foo.class.groovydoc.content.contains('Some class groovydoc for Foo') (1) assert Foo.class.getMethod('bar', new Class[0]).groovydoc.content.contains('Some method groovydoc for bar') (2) 1 Get the runtime groovydoc for class Foo 2 Get the runtime groovydoc for method bar 1.4. Shebang line Beside the single-line comment, there is a special line comment, often called the shebang line understood by UNIX systems which allows scripts to be run directly from the command-line, provided you have installed the Groovy distribution and the groovy command is available on the PATH . #!/usr/bin/env groovy println "Hello from the shebang line" The # character must be the first character of the file. Any indentation would yield a compilation error. 2. Keywords Groovy has the following reserved keywords: Table 1. Reserved Keywords abstract assert break case catch class const continue def default do else enum extends final finally for goto if implements import instanceof interface native new null non-sealed package public protected private return static strictfp super switch synchronized this threadsafe throw throws transient try while Of these, const , goto , strictfp , and threadsafe are not currently in use. The reserved keywords can’t in general be used for variable, field and method names. A trick allows methods to be defined having the same name as a keyword by surrounding the name in quotes as shown in the following example: // reserved keywords can be used for method names if quoted def "abstract"() { true } // when calling such methods, the name must be qualified using "this." this.abstract() Using such names might be confusing and is often best to avoid. The trick is primarily intended to enable certain Java integration scenarios and certain DSL scenarios where having "verbs" and "nouns" with the same name as keywords may be desirable. In addition, Groovy has the following contextual keywords: Table 2. Contextual Keywords as in permits record sealed trait var yields These words are only keywords in certain contexts and can be more freely used in some places, in particular for variables, fields and method names. This extra lenience allows using method or variable names that were not keywords in earlier versions of Groovy or are not keywords in Java. Examples are shown here: // contextual keywords can be used for field and variable names def as = true assert as // contextual keywords can be used for method names def in() { true } // when calling such methods, the name only needs to be qualified using "this." in scenarios which would be ambiguous this.in() Groovy programmers familiar with these contextual keywords may still wish to avoid using those names unless there is a good reason to use such a name. The restrictions on reserved keywords also apply for the primitive types, the boolean literals and the null literal (all of which are discussed later): Table 3. Other reserved words null true false boolean char byte short int long float double While not recommended, the same trick as for reserved keywords can be used: def "null"() { true } // not recommended; potentially confusing assert this.null() // must be qualified Using such words as method names is potentially confusing and is often best to avoid, however, it might be useful for certain kinds of DSLs . 3. Identifiers 3.1. Normal identifiers Identifiers start with a letter, a dollar or an underscore. They cannot start with a number. A letter can be in the following ranges: 'a' to 'z' (lowercase ascii letter) 'A' to 'Z' (uppercase ascii letter) '\u00C0' to '\u00D6' '\u00D8' to '\u00F6' '\u00F8' to '\u00FF' '\u0100' to '\uFFFE' Then following characters can contain letters and numbers. Here are a few examples of valid identifiers (here, variable names): def name def item3 def with_underscore def $dollarStart But the following ones are invalid identifiers: def 3tier def a+b def a#b All keywords are also valid identifiers when following a dot: foo.as foo.assert foo.break foo.case foo.catch 3.2. Quoted identifiers Quoted identifiers appear after the dot of a dotted expression. For instance, the name part of the person.name expression can be quoted with person."name" or person.'name' . This is particularly interesting when certain identifiers contain illegal characters that are forbidden by the Java Language Specification, but which are allowed by Groovy when quoted. For example, characters like a dash, a space, an exclamation mark, etc. def map = [:] map."an identifier with a space and double quotes" = "ALLOWED" map.'with-dash-signs-and-single-quotes' = "ALLOWED" assert map."an identifier with a space and double quotes" == "ALLOWED" assert map.'with-dash-signs-and-single-quotes' == "ALLOWED" As we shall see in the following section on strings , Groovy provides different string literals. All kind of strings are actually allowed after the dot: map.'single quote' map."double quote" map.'''triple single quote''' map."""triple double quote""" map./slashy string/ map.$/dollar slashy string/$ There’s a difference between plain character strings and Groovy’s GStrings (interpolated strings), as in that the latter case, the interpolated values are inserted in the final string for evaluating the whole identifier: def firstname = "Homer" map."Simpson-${firstname}" = "Homer Simpson" assert map.'Simpson-Homer' == "Homer Simpson" 4. Strings Text literals are represented in the form of chain of characters called strings. Groovy lets you instantiate java.lang.String objects, as well as GStrings ( groovy.lang.GString ) which are also called interpolated strings in other programming languages. 4.1. Single-quoted string Single-quoted strings are a series of characters surrounded by single quotes: 'a single-quoted string' Single-quoted strings are plain java.lang.String and don’t support interpolation. 4.2. String concatenation All the Groovy strings can be concatenated with the + operator: assert 'ab' == 'a' + 'b' 4.3. Triple-single-quoted string Triple-single-quoted strings are a series of characters surrounded by triplets of single quotes: '''a triple-single-quoted string''' Triple-single-quoted strings are plain java.lang.String and don’t support interpolation. Triple-single-quoted strings may span multiple lines. The content of the string can cross line boundaries without the need to split the string in several pieces and without concatenation or newline escape characters: def aMultilineString = '''line one line two line three''' If your code is indented, for example in the body of the method of a class, your string will contain the whitespace of the indentation. The Groovy Development Kit contains methods for stripping out the indentation with the String#stripIndent() method, and with the String#stripMargin() method that takes a delimiter character to identify the text to remove from the beginning of a string. When creating a string as follows: def startingAndEndingWithANewline = ''' line one line two line three ''' You will notice that the resulting string contains a newline character as first character. It is possible to strip that character by escaping the newline with a backslash: def strippedFirstNewline = '''\ line one line two line three ''' assert !strippedFirstNewline.startsWith('\n') 4.3.1. Escaping special characters You can escape single quotes with the backslash character to avoid terminating the string literal: 'an escaped single quote: \' needs a backslash' And you can escape the escape character itself with a double backslash: 'an escaped escape character: \\ needs a double backslash' Some special characters also use the backslash as escape character: Escape sequence Character \b backspace \f formfeed \n newline \r carriage return \s single space \t tabulation \\ backslash \' single quote within a single-quoted string (and optional for triple-single-quoted and double-quoted strings) \" double quote within a double-quoted string (and optional for triple-double-quoted and single-quoted strings) We’ll see some more escaping details when it comes to other types of strings discussed later. 4.3.2. Unicode escape sequence For characters that are not present on your keyboard, you can use unicode escape sequences: a backslash, followed by 'u', then 4 hexadecimal digits. For example, the Euro currency symbol can be represented with: 'The Euro currency symbol: \u20AC' 4.4. Double-quoted string Double-quoted strings are a series of characters surrounded by double quotes: "a double-quoted string" Double-quoted strings are plain java.lang.String if there’s no interpolated expression, but are groovy.lang.GString instances if interpolation is present. To escape a double quote, you can use the backslash character: "A double quote: \"". 4.4.1. String interpolation Any Groovy expression can be interpolated in all string literals, apart from single and triple-single-quoted strings. Interpolation is the act of replacing a placeholder in the string with its value upon evaluation of the string. The placeholder expressions are surrounded by ${} . The curly braces may be omitted for unambiguous dotted expressions, i.e. we can use just a $ prefix in those cases. If the GString is ever passed to a method taking a String, the expression value inside the placeholder is evaluated to its string representation (by calling toString() on that expression) and the resulting String is passed to the method. Here, we have a string with a placeholder referencing a local variable: def name = 'Guillaume' // a plain string def greeting = "Hello ${name}" assert greeting.toString() == 'Hello Guillaume' Any Groovy expression is valid, as we can see in this example with an arithmetic expression: def sum = "The sum of 2 and 3 equals ${2 + 3}" assert sum.toString() == 'The sum of 2 and 3 equals 5' Not only are expressions allowed in between the ${} placeholder, but so are statements. However, a statement’s value is just null . So if several statements are inserted in that placeholder, the last one should somehow return a meaningful value to be inserted. For instance, "The sum of 1 and 2 is equal to ${def a = 1; def b = 2; a + b}" is supported and works as expected but a good practice is usually to stick to simple expressions inside GString placeholders. In addition to ${} placeholders, we can also use a lone $ sign prefixing a dotted expression: def person = [name: 'Guillaume', age: 36] assert "$person.name is $person.age years old" == 'Guillaume is 36 years old' But only dotted expressions of the form a.b , a.b.c , etc, are valid. Expressions containing parentheses like method calls, curly braces for closures, dots which aren’t part of a property expression or arithmetic operators would be invalid. Given the following variable definition of a number: def number = 3.14 The following statement will throw a groovy.lang.MissingPropertyException because Groovy believes you’re trying to access the toString property of that number, which doesn’t exist: shouldFail(MissingPropertyException) { println "$number.toString()" } You can think of "$number.toString()" as being interpreted by the parser as "${number.toString}()" . Similarly, if the expression is ambiguous, you need to keep the curly braces: String thing = 'treasure' assert 'The x-coordinate of the treasure is represented by treasure.x' == "The x-coordinate of the $thing is represented by $thing.x" // <= Not allowed: ambiguous!! assert 'The x-coordinate of the treasure is represented by treasure.x' == "The x-coordinate of the $thing is represented by ${thing}.x" // <= Curly braces required If you need to escape the $ or ${} placeholders in a GString so they appear as is without interpolation, you just need to use a \ backslash character to escape the dollar sign: assert '$5' == "\$5" assert '${name}' == "\${name}" 4.4.2. Special case of interpolating closure expressions So far, we’ve seen we could interpolate arbitrary expressions inside the ${} placeholder, but there is a special case and notation for closure expressions. When the placeholder contains an arrow, ${→} , the expression is actually a closure expression — you can think of it as a closure with a dollar prepended in front of it: def sParameterLessClosure = "1 + 2 == ${-> 3}" (1) assert sParameterLessClosure == '1 + 2 == 3' def sOneParamClosure = "1 + 2 == ${ w -> w << 3}" (2) assert sOneParamClosure == '1 + 2 == 3' 1 The closure is a parameterless closure which doesn’t take arguments. 2 Here, the closure takes a single java.io.StringWriter argument, to which you can append content with the << leftShift operator. In either case, both placeholders are embedded closures. In appearance, it looks like a more verbose way of defining expressions to be interpolated, but closures have an interesting advantage over mere expressions: lazy evaluation. Let’s consider the following sample: def number = 1 (1) def eagerGString = "value == ${number}" def lazyGString = "value == ${ -> number }" assert eagerGString == "value == 1" (2) assert lazyGString == "value == 1" (3) number = 2 (4) assert eagerGString == "value == 1" (5) assert lazyGString == "value == 2" (6) 1 We define a number variable containing 1 that we then interpolate within two GStrings, as an expression in eagerGString and as a closure in lazyGString . 2 We expect the resulting string to contain the same string value of 1 for eagerGString . 3 Similarly for lazyGString 4 Then we change the value of the variable to a new number 5 With a plain interpolated expression, the value was actually bound at the time of creation of the GString. 6 But with a closure expression, the closure is called upon each coercion of the GString into String, resulting in an updated string containing the new number value. An embedded closure expression taking more than one parameter will generate an exception at runtime. Only closures with zero or one parameter are allowed. 4.4.3. Interoperability with Java When a method (whether implemented in Java or Groovy) expects a java.lang.String , but we pass a groovy.lang.GString instance, the toString() method of the GString is automatically and transparently called. String takeString(String message) { (4) assert message instanceof String (5) return message } def message = "The message is ${'hello'}" (1) assert message instanceof GString (2) def result = takeString(message) (3) assert result instanceof String assert result == 'The message is hello' 1 We create a GString variable 2 We double-check it’s an instance of the GString 3 We then pass that GString to a method taking a String as parameter 4 The signature of the takeString() method explicitly says its sole parameter is a String 5 We also verify that the parameter is indeed a String and not a GString. 4.4.4. GString and String hashCodes Although interpolated strings can be used in lieu of plain Java strings, they differ with strings in a particular way: their hashCodes are different. Plain Java strings are immutable, whereas the resulting String representation of a GString can vary, depending on its interpolated values. Even for the same resulting string, GStrings and Strings don’t have the same hashCode. assert "one: ${1}".hashCode() != "one: 1".hashCode() GString and Strings having different hashCode values, using GString as Map keys should be avoided, especially if we try to retrieve an associated value with a String instead of a GString. def key = "a" def m = ["${key}": "letter ${key}"] (1) assert m["a"] == null (2) 1 The map is created with an initial pair whose key is a GString 2 When we try to fetch the value with a String key, we will not find it, as Strings and GString have different hashCode values 4.5. Triple-double-quoted string Triple-double-quoted strings behave like double-quoted strings, with the addition that they are multiline, like the triple-single-quoted strings. def name = 'Groovy' def template = """ Dear Mr ${name}, You're the winner of the lottery! Yours sincerly, Dave """ assert template.toString().contains('Groovy') Neither double quotes nor single quotes need be escaped in triple-double-quoted strings. 4.6. Slashy string Beyond the usual quoted strings, Groovy offers slashy strings, which use / as the opening and closing delimiter. Slashy strings are particularly useful for defining regular expressions and patterns, as there is no need to escape backslashes. Example of a slashy string: def fooPattern = /.*foo.*/ assert fooPattern == '.*foo.*' Only forward slashes need to be escaped with a backslash: def escapeSlash = /The character \/ is a forward slash/ assert escapeSlash == 'The character / is a forward slash' Slashy strings are multiline: def multilineSlashy = /one two three/ assert multilineSlashy.contains('\n') Slashy strings can be thought of as just another way to define a GString but with different escaping rules. They hence support interpolation: def color = 'blue' def interpolatedSlashy = /a ${color} car/ assert interpolatedSlashy == 'a blue car' 4.6.1. Special cases An empty slashy string cannot be represented with a double forward slash, as it’s understood by the Groovy parser as a line comment. That’s why the following assert would actually not compile as it would look like a non-terminated statement: assert '' == // As slashy strings were mostly designed to make regexp easier so a few things that are errors in GStrings like $() or $5 will work with slashy strings. Remember that escaping backslashes is not required. An alternative way of thinking of this is that in fact escaping is not supported. The slashy string /\t/ won’t contain a tab but instead a backslash followed by the character 't'. Escaping is only allowed for the slash character, i.e. /\/folder/ will be a slashy string containing '/folder' . A consequence of slash escaping is that a slashy string can’t end with a backslash. Otherwise that will escape the slashy string terminator. You can instead use a special trick, /ends with slash ${'\\'}/ . But best just avoid using a slashy string in such a case. 4.7. Dollar slashy string Dollar slashy strings are multiline GStrings delimited with an opening $/ and a closing /$ . The escaping character is the dollar sign, and it can escape another dollar, or a forward slash. Escaping for the dollar and forward slash characters is only needed where conflicts arise with the special use of those characters. The characters $foo would normally indicate a GString placeholder, so those four characters can be entered into a dollar slashy string by escaping the dollar, i.e. $$foo . Similarly, you will need to escape a dollar slashy closing delimiter if you want it to appear in your string. Here are a few examples: def name = "Guillaume" def date = "April, 1st" def dollarSlashy = $/ Hello $name, today we're ${date}. $ dollar sign $$ escaped dollar sign \ backslash / forward slash $/ escaped forward slash $$$/ escaped opening dollar slashy $/$$ escaped closing dollar slashy /$ assert [ 'Guillaume', 'April, 1st', '$ dollar sign', '$ escaped dollar sign', '\\ backslash', '/ forward slash', '/ escaped forward slash', '$/ escaped opening dollar slashy', '/$ escaped closing dollar slashy' ].every { dollarSlashy.contains(it) } It was created to overcome some of the limitations of the slashy string escaping rules. Use it when its escaping rules suit your string contents (typically if it has some slashes you don’t want to escape). 4.8. String summary table String name String syntax Interpolated Multiline Escape character Single-quoted '…​' \ Triple-single-quoted '''…​''' \ Double-quoted "…​" \ Triple-double-quoted """…​""" \ Slashy /…​/ \ Dollar slashy $/…​/$ $ 4.9. Characters Unlike Java, Groovy doesn’t have an explicit character literal. However, you can be explicit about making a Groovy string an actual character, by three different means: char c1 = 'A' (1) assert c1 instanceof Character def c2 = 'B' as char (2) assert c2 instanceof Character def c3 = (char)'C' (3) assert c3 instanceof Character 1 by being explicit when declaring a variable holding the character by specifying the char type 2 by using type coercion with the as operator 3 by using a cast to char operation The first option 1 is interesting when the character is held in a variable, while the other two ( 2 and 3 ) are more interesting when a char value must be passed as argument of a method call. 5. Numbers Groovy supports different kinds of integral literals and decimal literals, backed by the usual Number types of Java. 5.1. Integral literals The integral literal types are the same as in Java: byte char short int long java.math.BigInteger You can create integral numbers of those types with the following declarations: // primitive types byte b = 1 char c = 2 short s = 3 int i = 4 long l = 5 // infinite precision BigInteger bi = 6 If you use optional typing by using the def keyword, the type of the integral number will vary: it’ll adapt to the capacity of the type that can hold that number. For positive numbers: def a = 1 assert a instanceof Integer // Integer.MAX_VALUE def b = 2147483647 assert b instanceof Integer // Integer.MAX_VALUE + 1 def c = 2147483648 assert c instanceof Long // Long.MAX_VALUE def d = 9223372036854775807 assert d instanceof Long // Long.MAX_VALUE + 1 def e = 9223372036854775808 assert e instanceof BigInteger As well as for negative numbers: def na = -1 assert na instanceof Integer // Integer.MIN_VALUE def nb = -2147483648 assert nb instanceof Integer // Integer.MIN_VALUE - 1 def nc = -2147483649 assert nc instanceof Long // Long.MIN_VALUE def nd = -9223372036854775808 assert nd instanceof Long // Long.MIN_VALUE - 1 def ne = -9223372036854775809 assert ne instanceof BigInteger 5.1.1. Alternative non-base 10 representations Numbers can also be represented in binary, octal, hexadecimal and decimal bases. Binary literal Binary numbers start with a 0b prefix: int xInt = 0b10101111 assert xInt == 175 short xShort = 0b11001001 assert xShort == 201 as short byte xByte = 0b11 assert xByte == 3 as byte long xLong = 0b101101101101 assert xLong == 2925l BigInteger xBigInteger = 0b111100100001 assert xBigInteger == 3873g int xNegativeInt = -0b10101111 assert xNegativeInt == -175 Octal literal Octal numbers are specified in the typical format of 0 followed by octal digits. int xInt = 077 assert xInt == 63 short xShort = 011 assert xShort == 9 as short byte xByte = 032 assert xByte == 26 as byte long xLong = 0246 assert xLong == 166l BigInteger xBigInteger = 01111 assert xBigInteger == 585g int xNegativeInt = -077 assert xNegativeInt == -63 Hexadecimal literal Hexadecimal numbers are specified in the typical format of 0x followed by hex digits. int xInt = 0x77 assert xInt == 119 short xShort = 0xaa assert xShort == 170 as short byte xByte = 0x3a assert xByte == 58 as byte long xLong = 0xffff assert xLong == 65535l BigInteger xBigInteger = 0xaaaa assert xBigInteger == 43690g Double xDouble = new Double('0x1.0p0') assert xDouble == 1.0d int xNegativeInt = -0x77 assert xNegativeInt == -119 5.2. Decimal literals The decimal literal types are the same as in Java: float double java.math.BigDecimal You can create decimal numbers of those types with the following declarations: // primitive types float f = 1.234 double d = 2.345 // infinite precision BigDecimal bd = 3.456 Decimals can use exponents, with the e or E exponent letter, followed by an optional sign, and an integral number representing the exponent: assert 1e3 == 1_000.0 assert 2E4 == 20_000.0 assert 3e+1 == 30.0 assert 4E-2 == 0.04 assert 5e-1 == 0.5 Conveniently for exact decimal number calculations, Groovy chooses java.math.BigDecimal as its decimal number type. In addition, both float and double are supported, but require an explicit type declaration, type coercion or suffix. Even if BigDecimal is the default for decimal numbers, such literals are accepted in methods or closures taking float or double as parameter types. Decimal numbers can’t be represented using a binary, octal or hexadecimal representation. 5.3. Underscore in literals When writing long literal numbers, it’s harder on the eye to figure out how some numbers are grouped together, for example with groups of thousands, of words, etc. By allowing you to place underscore in number literals, it’s easier to spot those groups: long creditCardNumber = 1234_5678_9012_3456L long socialSecurityNumbers = 999_99_9999L double monetaryAmount = 12_345_132.12 long hexBytes = 0xFF_EC_DE_5E long hexWords = 0xFFEC_DE5E long maxLong = 0x7fff_ffff_ffff_ffffL long alsoMaxLong = 9_223_372_036_854_775_807L long bytes = 0b11010010_01101001_10010100_10010010 5.4. Number type suffixes We can force a number (including binary, octals and hexadecimals) to have a specific type by giving a suffix (see table below), either uppercase or lowercase. Type Suffix BigInteger G or g Long L or l Integer I or i BigDecimal G or g Double D or d Float F or f Examples: assert 42I == Integer.valueOf('42') assert 42i == Integer.valueOf('42') // lowercase i more readable assert 123L == Long.valueOf("123") // uppercase L more readable assert 2147483648 == Long.valueOf('2147483648') // Long type used, value too large for an Integer assert 456G == new BigInteger('456') assert 456g == new BigInteger('456') assert 123.45 == new BigDecimal('123.45') // default BigDecimal type used assert .321 == new BigDecimal('.321') assert 1.200065D == Double.valueOf('1.200065') assert 1.234F == Float.valueOf('1.234') assert 1.23E23D == Double.valueOf('1.23E23') assert 0b1111L.class == Long // binary assert 0xFFi.class == Integer // hexadecimal assert 034G.class == BigInteger // octal 5.5. Math operations Although operators are covered in more detail elsewhere, it’s important to discuss the behavior of math operations and what their resulting types are. Division and power binary operations aside (covered below), binary operations between byte , char , short and int result in int binary operations involving long with byte , char , short and int result in long binary operations involving BigInteger and any other integral type result in BigInteger binary operations involving BigDecimal with byte , char , short , int and BigInteger result in BigDecimal binary operations between float , double and BigDecimal result in double binary operations between two BigDecimal result in BigDecimal The following table summarizes those rules: byte char short int long BigInteger float double BigDecimal byte int int int int long BigInteger double double BigDecimal char int int int long BigInteger double double BigDecimal short int int long BigInteger double double BigDecimal int int long BigInteger double double BigDecimal long long BigInteger double double BigDecimal BigInteger BigInteger double double BigDecimal float double double double double double double BigDecimal BigDecimal Thanks to Groovy’s operator overloading, the usual arithmetic operators work as well with BigInteger and BigDecimal , unlike in Java where you have to use explicit methods for operating on those numbers. 5.5.1. The case of the division operator The division operators / (and /= for division and assignment) produce a double result if either operand is a float or double , and a BigDecimal result otherwise (when both operands are any combination of an integral type short , char , byte , int , long , BigInteger or BigDecimal ). BigDecimal division is performed with the divide() method if the division is exact (i.e. yielding a result that can be represented within the bounds of the same precision and scale), or using a MathContext with a precision of the maximum of the two operands' precision plus an extra precision of 10, and a scale of the maximum of 10 and the maximum of the operands' scale. For integer division like in Java, you should use the intdiv() method, as Groovy doesn’t provide a dedicated integer division operator symbol. 5.5.2. The case of the power operator The power operation is represented by the ** operator, with two parameters: the base and the exponent. The result of the power operation depends on its operands, and the result of the operation (in particular if the result can be represented as an integral value). The following rules are used by Groovy’s power operation to determine the resulting type: If the exponent is a decimal value if the result can be represented as an Integer , then return an Integer else if the result can be represented as a Long , then return a Long otherwise return a Double If the exponent is an integral value if the exponent is strictly negative, then return an Integer , Long or Double if the result value fits in that type if the exponent is positive or zero if the base is a BigDecimal , then return a BigDecimal result value if the base is a BigInteger , then return a BigInteger result value if the base is an Integer , then return an Integer if the result value fits in it, otherwise a BigInteger if the base is a Long , then return a Long if the result value fits in it, otherwise a BigInteger We can illustrate those rules with a few examples: // base and exponent are ints and the result can be represented by an Integer assert 2 ** 3 instanceof Integer // 8 assert 10 ** 9 instanceof Integer // 1_000_000_000 // the base is a long, so fit the result in a Long // (although it could have fit in an Integer) assert 5L ** 2 instanceof Long // 25 // the result can't be represented as an Integer or Long, so return a BigInteger assert 100 ** 10 instanceof BigInteger // 10e20 assert 1234 ** 123 instanceof BigInteger // 170515806212727042875... // the base is a BigDecimal and the exponent a negative int // but the result can be represented as an Integer assert 0.5 ** -2 instanceof Integer // 4 // the base is an int, and the exponent a negative float // but again, the result can be represented as an Integer assert 1 ** -0.3f instanceof Integer // 1 // the base is an int, and the exponent a negative int // but the result will be calculated as a Double // (both base and exponent are actually converted to doubles) assert 10 ** -1 instanceof Double // 0.1 // the base is a BigDecimal, and the exponent is an int, so return a BigDecimal assert 1.2 ** 10 instanceof BigDecimal // 6.1917364224 // the base is a float or double, and the exponent is an int // but the result can only be represented as a Double value assert 3.4f ** 5 instanceof Double // 454.35430372146965 assert 5.6d ** 2 instanceof Double // 31.359999999999996 // the exponent is a decimal value // and the result can only be represented as a Double value assert 7.8 ** 1.9 instanceof Double // 49.542708423868476 assert 2 ** 0.1f instanceof Double // 1.0717734636432956 6. Booleans Boolean is a special data type that is used to represent truth values: true and false . Use this data type for simple flags that track true/false conditions . Boolean values can be stored in variables, assigned into fields, just like any other data type: def myBooleanVariable = true boolean untypedBooleanVar = false booleanField = true true and false are the only two primitive boolean values. But more complex boolean expressions can be represented using logical operators . In addition, Groovy has special rules (often referred to as Groovy Truth ) for coercing non-boolean objects to a boolean value. 7. Lists Groovy uses a comma-separated list of values, surrounded by square brackets, to denote lists. Groovy lists are plain JDK java.util.List , as Groovy doesn’t define its own collection classes. The concrete list implementation used when defining list literals are java.util.ArrayList by default, unless you decide to specify otherwise, as we shall see later on. def numbers = [1, 2, 3] (1) assert numbers instanceof List (2) assert numbers.size() == 3 (3) 1 We define a list numbers delimited by commas and surrounded by square brackets, and we assign that list into a variable 2 The list is an instance of Java’s java.util.List interface 3 The size of the list can be queried with the size() method, and shows our list contains 3 elements In the above example, we used a homogeneous list, but you can also create lists containing values of heterogeneous types: def heterogeneous = [1, "a", true] (1) 1 Our list here contains a number, a string and a boolean value We mentioned that by default, list literals are actually instances of java.util.ArrayList , but it is possible to use a different backing type for our lists, thanks to using type coercion with the as operator, or with explicit type declaration for your variables: def arrayList = [1, 2, 3] assert arrayList instanceof java.util.ArrayList def linkedList = [2, 3, 4] as LinkedList (1) assert linkedList instanceof java.util.LinkedList LinkedList otherLinked = [3, 4, 5] (2) assert otherLinked instanceof java.util.LinkedList 1 We use coercion with the as operator to explicitly request a java.util.LinkedList implementation 2 We can say that the variable holding the list literal is of type java.util.LinkedList You can access elements of the list with the [] subscript operator (both for reading and setting values) with positive indices or negative indices to access elements from the end of the list, as well as with ranges, and use the << leftShift operator to append elements to a list: def letters = ['a', 'b', 'c', 'd'] assert letters[0] == 'a' (1) assert letters[1] == 'b' assert letters[-1] == 'd' (2) assert letters[-2] == 'c' letters[2] = 'C' (3) assert letters[2] == 'C' letters << 'e' (4) assert letters[ 4] == 'e' assert letters[-1] == 'e' assert letters[1, 3] == ['b', 'd'] (5) assert letters[2..4] == ['C', 'd', 'e'] (6) 1 Access the first element of the list (zero-based counting) 2 Access the last element of the list with a negative index: -1 is the first element from the end of the list 3 Use an assignment to set a new value for the third element of the list 4 Use the << leftShift operator to append an element at the end of the list 5 Access two elements at once, returning a new list containing those two elements 6 Use a range to access a range of values from the list, from a start to an end element position As lists can be heterogeneous in nature, lists can also contain other lists to create multidimensional lists: def multi = [[0, 1], [2, 3]] (1) assert multi[1][0] == 2 (2) 1 Define a list of numbers 2 Access the second element of the top-most list, and the first element of the inner list 8. Arrays Groovy reuses the list notation for arrays, but to make such literals arrays, you need to explicitly define the type of the array through coercion or type declaration. String[] arrStr = ['Ananas', 'Banana', 'Kiwi'] (1) assert arrStr instanceof String[] (2) assert !(arrStr instanceof List) def numArr = [1, 2, 3] as int[] (3) assert numArr instanceof int[] (4) assert numArr.size() == 3 1 Define an array of strings using explicit variable type declaration 2 Assert that we created an array of strings 3 Create an array of ints with the as operator 4 Assert that we created an array of primitive ints You can also create multi-dimensional arrays: def matrix3 = new Integer[3][3] (1) assert matrix3.size() == 3 Integer[][] matrix2 (2) matrix2 = [[1, 2], [3, 4]] assert matrix2 instanceof Integer[][] 1 You can define the bounds of a new array 2 Or declare an array without specifying its bounds Access to elements of an array follows the same notation as for lists: String[] names = ['Cédric', 'Guillaume', 'Jochen', 'Paul'] assert names[0] == 'Cédric' (1) names[2] = 'Blackdrag' (2) assert names[2] == 'Blackdrag' 1 Retrieve the first element of the array 2 Set the value of the third element of the array to a new value 8.1. Java-style array initialization Groovy has always supported literal list/array definitions using square brackets and has avoided Java-style curly braces so as not to conflict with closure definitions. In the case where the curly braces come immediately after an array type declaration however, there is no ambiguity with closure definitions, so Groovy 3 and above support that variant of the Java array initialization expression. Examples: def primes = new int[] {2, 3, 5, 7, 11} assert primes.size() == 5 && primes.sum() == 28 assert primes.class.name == '[I' def pets = new String[] {'cat', 'dog'} assert pets.size() == 2 && pets.sum() == 'catdog' assert pets.class.name == '[Ljava.lang.String;' // traditional Groovy alternative still supported String[] groovyBooks = [ 'Groovy in Action', 'Making Java Groovy' ] assert groovyBooks.every{ it.contains('Groovy') } 9. Maps Sometimes called dictionaries or associative arrays in other languages, Groovy features maps. Maps associate keys to values, separating keys and values with colons, and each key/value pairs with commas, and the whole keys and values surrounded by square brackets. def colors = [red: '#FF0000', green: '#00FF00', blue: '#0000FF'] (1) assert colors['red'] == '#FF0000' (2) assert colors.green == '#00FF00' (3) colors['pink'] = '#FF00FF' (4) colors.yellow = '#FFFF00' (5) assert colors.pink == '#FF00FF' assert colors['yellow'] == '#FFFF00' assert colors instanceof java.util.LinkedHashMap 1 We define a map of string color names, associated with their hexadecimal-coded html colors 2 We use the subscript notation to check the content associated with the red key 3 We can also use the property notation to assert the color green’s hexadecimal representation 4 Similarly, we can use the subscript notation to add a new key/value pair 5 Or the property notation, to add the yellow color When using names for the keys, we actually define string keys in the map. Groovy creates maps that are actually instances of java.util.LinkedHashMap . If you try to access a key which is not present in the map: assert colors.unknown == null def emptyMap = [:] assert emptyMap.anyKey == null You will retrieve a null result. In the examples above, we used string keys, but you can also use values of other types as keys: def numbers = [1: 'one', 2: 'two'] assert numbers[1] == 'one' Here, we used numbers as keys, as numbers can unambiguously be recognized as numbers, so Groovy will not create a string key like in our previous examples. But consider the case you want to pass a variable in lieu of the key, to have the value of that variable become the key: def key = 'name' def person = [key: 'Guillaume'] (1) assert !person.containsKey('name') (2) assert person.containsKey('key') (3) 1 The key associated with the 'Guillaume' name will actually be the "key" string, not the value associated with the key variable 2 The map doesn’t contain the 'name' key 3 Instead, the map contains a 'key' key You can also pass quoted strings as well as keys: ["name": "Guillaume"]. This is mandatory if your key string isn’t a valid identifier, for example if you wanted to create a string key containing a dash like in: ["street-name": "Main street"]. When you need to pass variable values as keys in your map definitions, you must surround the variable or expression with parentheses: person = [(key): 'Guillaume'] (1) assert person.containsKey('name') (2) assert !person.containsKey('key') (3) 1 This time, we surround the key variable with parentheses, to instruct the parser we are passing a variable rather than defining a string key 2 The map does contain the name key 3 But the map doesn’t contain the key key as before Groovy Learn Documentation Download Support Contribute Ecosystem Blog posts About Source code Security Books Thanks Sponsorship FAQ Search Socialize Discuss on the mailing-list Groovy on X Groovy on Bluesky Groovy on Mastodon Groovy on LinkedIn Events and conferences Source code on GitHub Report issues in Jira Stack Overflow questions Slack Community The Groovy programming language is supported by the Apache Software Foundation and the Groovy community. Apache, Apache Groovy, Groovy, and the ASF logo are either registered trademarks or trademarks of The Apache Software Foundation. © 2003-2025 the Apache Groovy project — Groovy is Open Source: license , privacy policy . | 2026-01-13T09:29:32 |
https://docs.aws.amazon.com/de_de/cost-management/latest/userguide/add-tags-to-dashboards.html | Hinzufügen von Tags zu Dashboards - AWS Kostenmanagement Hinzufügen von Tags zu Dashboards - AWS Kostenmanagement Dokumentation AWS Billing and Cost Management Benutzer-Leitfaden Die vorliegende Übersetzung wurde maschinell erstellt. Im Falle eines Konflikts oder eines Widerspruchs zwischen dieser übersetzten Fassung und der englischen Fassung (einschließlich infolge von Verzögerungen bei der Übersetzung) ist die englische Fassung maßgeblich. Hinzufügen von Tags zu Dashboards Mithilfe von Tags können Sie Ihre Dashboards identifizieren, organisieren und verwalten, indem sie beschreibende Beschriftungen hinzufügen. Sie können Ihre Dashboards taggen, um zu identifizieren, welche Abteilung sie erstellt hat, sie nach Projekt oder Initiative verfolgen, ihren Zweck kennzeichnen oder sie für verschiedene Umgebungen kennzeichnen. Sie könnten beispielsweise Tags wie Abteilung = Marketing oder Projekt = Kostenoptimierung-2025 verwenden, um Ihre Dashboards zu kategorisieren. Wenn Sie in Ihrem Unternehmen über viele Dashboards verfügen, werden Tags besonders wertvoll. Sie ermöglichen es Ihnen, bestimmte Dashboards zu filtern und nach ihnen zu suchen, den Zugriff mithilfe von IAM-Richtlinien auf der Grundlage von Tag-Werten zu steuern und Dashboards zu verfolgen, die in verschiedenen Teams ähnlichen Zwecken dienen. Wenn Sie die AWS CLI oder das SDK verwenden, helfen Ihnen Tags auch dabei, verwandte Dashboards als Gruppe zu verwalten. Um Tags zu einem Dashboard hinzuzufügen Öffnen Sie die Fakturierungs- und Kostenverwaltungskonsole unter https://console.aws.amazon.com/costmanagement/ . Wählen Sie im Navigationsbereich Dashboards aus. Wählen Sie das Dashboard aus, das Sie taggen möchten. Wählen Sie Aktionen und dann in der Drop-down-Liste Tags verwalten aus. Wählen Sie Neues Tag hinzufügen aus. Geben Sie den Schlüssel und den Wert (optional) für das Tag ein. Wählen Sie Neues Tag hinzufügen, um weitere Tags hinzuzufügen. Die maximale Anzahl von Tags, die Sie hinzufügen können, ist 50 Wählen Sie Änderungen speichern aus. Nachdem Sie die Änderungen gespeichert haben, werden die Tags auf Ihr Dashboard angewendet und können zum Filtern und zur Zugriffskontrolle verwendet werden. JavaScript ist in Ihrem Browser nicht verfügbar oder deaktiviert. Zur Nutzung der AWS-Dokumentation muss JavaScript aktiviert sein. Weitere Informationen finden auf den Hilfe-Seiten Ihres Browsers. Dokumentkonventionen Dashboards duplizieren Analysieren Sie Ihre Kosten und Nutzung mit dem AWS Cost Explorer Hat Ihnen diese Seite geholfen? – Ja Vielen Dank, dass Sie uns mitgeteilt haben, dass wir gute Arbeit geleistet haben! Würden Sie sich einen Moment Zeit nehmen, um uns mitzuteilen, was wir richtig gemacht haben, damit wir noch besser werden? Hat Ihnen diese Seite geholfen? – Nein Vielen Dank, dass Sie uns mitgeteilt haben, dass diese Seite überarbeitet werden muss. Es tut uns Leid, dass wir Ihnen nicht weiterhelfen konnten. Würden Sie sich einen Moment Zeit nehmen, um uns mitzuteilen, wie wir die Dokumentation verbessern können? | 2026-01-13T09:29:32 |
https://www.chinadaily.com.cn/a/202512/15/WS69400847a310d6866eb2ebe3.html | Chongqing hosts Silver Age fashion model competition - Chinadaily.com.cn Search HOME CHINA WORLD BUSINESS LIFESTYLE CULTURE TRAVEL WATCHTHIS SPORTS OPINION REGIONAL FORUM NEWSPAPER MOBILE Home China Society Home / China / Society Chongqing hosts Silver Age fashion model competition By Deng Rui and Tan Yingzi in Chongqing | chinadaily.com.cn | Updated: 2025-12-15 21:08 Share Share - WeChat --> CLOSE In a celebration of style and age, the Silver Age Fashion Model Competition (Group Category) concluded on Friday in Nan'an district, Southwest China's Chongqing, after captivating live and online audiences with their runway walks and thoughtfully choreographed performances. [Photo provided to chinadaily.com.cn] In a celebration of style and age, the Silver Age Fashion Model Competition (Group Category) concluded on Friday in Nan'an district, Southwest China's Chongqing, after captivating live and online audiences with their runway walks and thoughtfully choreographed performances. According to Mao Yuanyuan, founder of the competition, the event brought together 25 senior model teams from community and senior groups across the municipality, with 18 teams making it to the finals. The participants, whose average age exceeded 60, showcased a diverse range of styles, including traditional Chinese attire, trendy outfits, and creative costumes. "Our elderly friends are enjoying increasingly rich and high-quality lives in their later years," said Jian Daisheng, chairman of the Nan'an Elderly Care Association. "This public welfare competition is one of our key initiatives to establish a cultural platform for the elderly, broaden their social opportunities, and invigorate their community." The term "Silver Age" typically refers to individuals aged 60 and above, particularly those involved in social volunteer activities like the Silver Age Action programs. This age range generally spans from 55 to 70 and represents an influential force in the context of policy. The age range is sometimes adjusted depending on the specific area of participation. According to the Chongqing Civil Affairs Bureau, by the end of 2024, the municipality had approximately 8.01 million seniors aged 60 and above, accounting for 25.11 percent of the population. That number is 3.11 percentage points higher than the national average. --> 1 2 3 4 5 6 7 Next >>| --> 1/7 Next Photo Symphony of life in Yellow River Delta Workers build giant snowman in Heilongjiang Watch it again: SCIO briefing on national economic performance of November Breathing new life into lakes Zhejiang banks bet big on high-tech drivers Thrills designed for 'wimps' make giant leap in tourism --> --> Top BACK TO THE TOP English 中文 HOME CHINA WORLD BUSINESS LIFESTYLE CULTURE TRAVEL VIDEO SPORTS OPINION REGIONAL NEWSPAPER China Daily PDF China Daily E-paper MOBILE Copyright 1994 - . All rights reserved. The content (including but not limited to text, photo, multimedia information, etc) published in this site belongs to China Daily Information Co (CDIC). Without written authorization from CDIC, such content shall not be republished or used in any form. Note: Browsers with 1024*768 or higher resolution are suggested for this site. License for publishing multimedia online 0108263 Registration Number: 130349 About China Daily Advertise on Site Contact Us Job Offer Expat Employment FOLLOW US Copyright 1994 - . All rights reserved. The content (including but not limited to text, photo, multimedia information, etc) published in this site belongs to China Daily Information Co (CDIC). Without written authorization from CDIC, such content shall not be republished or used in any form. --> | 2026-01-13T09:29:32 |
https://cloudflare.com/es-la/coffee-shop-networking/ | Conectividad tipo cafetería con Cloudflare | Cloudflare Me interesa Idiomas English English (United Kingdom) Deutsch Español (Latinoamérica) Español (España) Français Italiano 日本語 한국어 Polski Português (Brasil) Русский 繁體中文 简体中文 Plataforma Conectividad cloud La conectividad cloud de Cloudflare ofrece más de 60 servicios de red, seguridad y rendimiento. Enterprise Para organizaciones grandes y medianas Pequeña empresa Para organizaciones pequeñas Socio Ser socio de Cloudflare Casos de uso Moderniza tus aplicaciones Acelera el rendimiento Protege la disponibilidad de tus aplicaciones Optimiza tu experiencia en la web Moderniza tu seguridad Reemplaza tu VPN Protégete contra el phishing Protege tu aplicaciones web y tus API Moderniza tus redes Red de cafeterías Moderniza tu WAN Simplifica tu red corporativa Temas de CXO Adopta la IA Incorpora IA a los equipos de trabajo y a las experiencias digitales Seguridad de IA Protege las aplicaciones de IA generativa y agéntica Cumplimiento de los datos Optimiza el cumplimiento normativo y minimiza el riesgo Criptografía poscuántica Protege los datos y cumple con los estándares de cumplimiento normativo Industrias Atención médica Banca Minoristas Videojuegos Sector público Recursos Guías de producto Arquitecturas de referencia Informes de analistas Eventos Eventos Demostraciones Seminarios web Talleres Solicitar una demo Productos Productos Seguridad del espacio de trabajo Acceso a la red Zero Trust Puerta de enlace web segura Seguridad del correo electrónico Agente de seguridad de acceso a la nube Seguridad para aplicaciones Protección DDoS a la capa 7 Firewall de aplicaciones web Seguridad de la API Gestión de bots Rendimiento de aplicaciones CDN DNS Enrutamiento inteligente Load balancing Redes y SASE Protección DDoS a las capas 3 - 4 NaaS/SD- WAN Firewall como servicio Interconexión de red Planes y precios Planes Enterprise Planes para pequeñas empresas Planes individuales Compara planes Servicios globales Paquetes de soporte para un rendimiento exitoso Experiencia optimizada de Cloudflare Servicios profesionales Implementación guiada por expertos Gestión de cuentas técnicas Gestión técnica enfocada Servicio de operaciones de seguridad Supervisión y respuesta de Cloudflare Registro de dominios Compra y gestiona dominios 1.1.1.1 Resolución de DNS gratuita Recursos Guías de producto Arquitecturas de referencia Informes de analistas Demos de productos y recorridos Ayúdame a elegir Desarrolladores Documentación Biblioteca para desarrolladores Documentación y guías Demos de aplicaciones Explora lo que puedes crear Tutoriales Tutoriales de creación paso a paso Arquitectura de referencia Diagramas y patrones de diseño Productos Inteligencia artificial AI Gateway Observa y controla las aplicaciones de IA Workers AI Ejecuta modelos de aprendizaje automático en nuestra red Proceso Observability Registros, métricas y seguimientos Workers Crea e implementa aplicaciones sin servidor Multimedia Images Transforma y optimiza imágenes Realtime Crea aplicaciones de audio y video en tiempo real Almacenamiento y base de datos D1 Desarrolla bases de datos SQL sin servidor R2 Almacena datos sin costosas tarifas de salida Planes y precios Workers Crea e implementa aplicaciones sin servidor Workers KV Almacén de clave-valor sin servidor para aplicaciones R2 Almacena datos sin costosas tarifas de salida Descubre proyectos Historias de nuestros clientes Demo de IA en 30 segundos Guía rápida para empezar Descubre Workers Playground Crea, prueba e implementa Discord para desarrolladores Únete a la comunidad Comienza a crear Socios Red de socios Crece, innova y satisface las necesidades de los clientes con Cloudflare Portal de socios Encuentra recursos y registra acuerdos Tipos de asociación Programa PowerUP Impulsa el crecimiento de tu negocio mientras garantizas la conexión y la seguridad de tus usuarios Socios de tecnología Explora nuestro ecosistema de asociaciones e integraciones tecnológicas Integradores de sistemas globales Apoyar la transformación digital eficiente a gran escala Proveedores de servicios Descubre nuestra red de valiosos proveedores de servicios Programa de agencias de autoservicio Gestiona las cuentas de autoservicio de tus clientes Portal punto a punto Información sobre el tráfico de tu red Encuentra un socio Impulsa tu negocio - conéctate con los socios de Cloudflare Powered+. Recursos Eventos Demos y recorridos por los productos Demostraciones de productos a pedido Casos prácticos Cloudflare, la clave del éxito Seminarios web Debates interesantes Talleres Foros virtuales Biblioteca Guías útiles, planes de desarrollo y mucho más Informes Información sobre investigaciones de Cloudflare Blog Análisis técnicos y novedades de productos Centro de aprendizaje Herramientas educativas y contenido práctico Desarrollar Arquitectura de referencia Guías técnicas Guías de soluciones y productos Documentación del producto Documentación Documentación para desarrolladores Explorar theNET Información estratégica para empresas digitales Cloudflare TV Series y eventos innovadores Cloudforce One Investigaciones y operaciones sobre amenazas Radar Tendencias del tráfico y la seguridad en Internet Informes de analistas Informes de investigación del sector Eventos Próximos eventos regionales Confianza, privacidad y cumplimiento normativo Información y políticas de cumplimiento normativo Soporte Te ayudamos Foro de la comunidad ¿Has perdido el acceso a tu cuenta? Discord para desarrolladores Te ayudamos Empresa información de la empresa Liderazgo Conoce a nuestros líderes Relaciones con inversores Información para inversores Prensa Consulta noticias recientes Empleo Explora las posiciones disponibles confianza, privacidad y seguridad Privacidad Política, datos y protección Confianza Política, proceso y seguridad Cumplimiento normativo Certificación y regulación Transparencia Política y divulgaciones INTERÉS PÚBLICO Asistencia humanitaria Proyecto Galileo Sector público Proyecto Athenian Elecciones Cloudflare para campañas Salud Project Fair Shot Red global Ubicaciones globales y estado Iniciar sesión Contacta con Ventas Implementa la conectividad tipo cafetería con Cloudflare Mejora la experiencia del usuario y reduce la infraestructura de red heredada Utiliza la plataforma SASE nativa de nube y distribuida a nivel global de Cloudflare para optimizar el acceso a las aplicaciones y simplificar la conexión en red de las sucursales. Habla con un experto Obtén un resumen de solución Ventajas de Cloudflare Mejora la experiencia del usuario Ofrece una experiencia de acceso de usuario sencilla, optimizada y segura, independientemente de la ubicación física. Menor costo total de propiedad (TCO) Reduce la inversión en dispositivos de hardware y los gastos en conexiones de red privada. Agilidad y velocidad a escala de la nube Brinda cobertura rápidamente en todo el mundo, sin necesidad de construir una infraestructura privada. Cómo funciona Pasos clave para la conectividad tipo cafetería Reduce los equipos de red tradicionales, locales, mediante la migración a los servicios SASE unificados y nativos de nube de Cloudflare: Trabaja de forma segura desde cualquier lugar, ya sea de forma local o remota, con Access para el acceso a la red Zero Trust (ZTNA). Conecta tus redes utilizando las opciones flexibles para Magic WAN con sucursales y sitios minoristas, centros de datos y nubes. Protege el tráfico y detén las amenazas con Magic Firewall , nuestro servicio integral de SWG ( Gateway ) y firewall como servicio. Supervisa de forma preventiva la experiencia del usuario, identifica problemas y soluciona los problemas de estado de los dispositivos y la red con Digital Experience Monitoring (DEX) . Qué dicen nuestros clientes "A medida que ampliamos el número de sitios, la configuración de nuevas redes puede resultar tan costosa como complicada. Nuestro objetivo es alcanzar un nivel en el que podamos implementar un dispositivo en cualquier lugar del mundo y que opere de inmediato. Con Cloudflare, logramos ese nivel de estandarización y simplicidad". Director de tecnología, Ocado Simplifica tu red con las soluciones de conectividad tipo cafetería de Cloudflare Leer documento técnico Por qué Cloudflare Simplifica y optimiza la visibilidad y protección de datos para todo el tráfico La plataforma unificada de Cloudflare que integra servicios de seguridad y conectividad nativos de nube es la base ideal para la protección de datos: Arquitectura modular Responde a cualquier requisito empresarial con programabilidad completa de la API y registro, enrutamiento, almacenamiento en caché y descifrado personalizables según la ubicación. Integración Protege las experiencias de los usuarios con inspección de paso único y una red que está a 50 m/s del 95% de los usuarios de Internet. Información sobre amenazas Bloquea un mayor número de amenazas, conocidas y desconocidas, con la información obtenida del bloqueo de ~234 mil millones de amenazas diarias. Interfaz unificada Reduce la proliferación de herramientas y la fatiga por alertas con una única interfaz de usuario administrativa unificada. Recursos Seminario web on demand Construcción de las bases para el modelo de conectividad tipo cafetería Aprende a elaborar un plan flexible para adoptar la conectividad tipo cafetería, utilizando como base los casos de uso básicos de SASE. Ver seminario web Descripción general del producto Magic WAN Simplifica la conectividad de red desde las sucursales, las VPC multinube o los centros de datos mediante la plataforma SASE Cloudflare One. Más información Descripción general del producto Cloudflare Access Mejora la productividad y reduce los riesgos con el acceso de los usuarios a aplicaciones autoalojadas, SaaS o no web, sin necesidad de una VPN. Más información Contacta con Ventas +1 (888) 99 FLARE Primeros pasos Planes gratuitos Planes para pequeñas empresas Para empresas Sugerencias Solicitar demostración Contacta con Ventas Soluciones Conectividad cloud Servicios para aplicaciones SASE y seguridad del espacio de trabajo Servicios para redes Plataforma para desarrolladores Soporte Centro de ayuda Atención al cliente Foro de la comunidad Discord para desarrolladores ¿Has perdido el acceso a tu cuenta? Estado de Cloudflare Cumplimiento normativo Recursos de conformidad Confianza GDPR IA responsable Informe de transparencia Notificar abuso Empresa Acerca de Cloudflare Mapa de red Nuestro equipo Logotipos y dossier de prensa Diversidad, equidad e inclusión Impact/ESG Primeros pasos Planes gratuitos Planes para pequeñas empresas Para empresas Sugerencias Solicitar demostración Contacta con Ventas Soluciones Conectividad cloud Servicios para aplicaciones SASE y seguridad del espacio de trabajo Servicios para redes Plataforma para desarrolladores Soporte Centro de ayuda Atención al cliente Foro de la comunidad Discord para desarrolladores ¿Has perdido el acceso a tu cuenta? Estado de Cloudflare Cumplimiento normativo Recursos de conformidad Confianza GDPR IA responsable Informe de transparencia Notificar abuso Empresa Acerca de Cloudflare Mapa de red Nuestro equipo Logotipos y dossier de prensa Diversidad, equidad e inclusión Impact/ESG © 2026 Cloudflare, Inc. Política de privacidad Términos del servicio Informar sobre problemas de seguridad Tus opciones de privacidad Marca comercial | 2026-01-13T09:29:32 |
https://docs.aws.amazon.com/ko_kr/cost-management/latest/userguide/add-tags-to-dashboards.html | 대시보드에 태그 추가 - AWS 비용 관리 대시보드에 태그 추가 - AWS 비용 관리 설명서 AWS Billing and Cost Management 사용 설명서 기계 번역으로 제공되는 번역입니다. 제공된 번역과 원본 영어의 내용이 상충하는 경우에는 영어 버전이 우선합니다. 대시보드에 태그 추가 태그를 사용하면 설명이 포함된 레이블을 추가하여 대시보드를 식별, 구성, 관리할 수 있습니다. 대시보드에 태그를 지정하여 대시보드를 생성한 부서를 식별하거나, 프로젝트 또는 이니셔티브별로 대시보드를 추적하거나, 용도를 레이블로 지정하거나, 다양한 환경에 적합하게 표시할 수 있습니다. 예를 들어 Department = Marketing 또는 Project = Cost-Optimization-2025와 같은 태그를 사용하여 대시보드를 분류할 수 있습니다. 조직 전체에 대시보드가 많으면 태그가 특히 유용합니다. 이를 통해 특정 대시보드를 필터하여 검색하고, 태그 값을 기반으로 IAM 정책을 통해 액세스를 제어하고, 여러 팀에서 유사한 목적으로 사용되는 대시보드를 추적할 수 있습니다. AWS CLI 또는 SDK를 사용하는 경우 태그는 관련 대시보드를 그룹으로 관리하는 데도 도움이 됩니다. 대시보드에 태그를 추가하려면 에서 과금 정보 및 비용 관리 콘솔을 엽니다 https://console.aws.amazon.com/costmanagement/ 탐색 창에서 대시보드 를 선택합니다. 태그를 지정할 대시보드를 선택합니다. 작업 을 선택한 다음 드롭다운 목록에서 태그 관리 를 선택합니다. 새로운 태그 추가 를 선택합니다. 태그에 키와 값(선택 사항)을 입력합니다. 태그를 추가하려면 새 태그 추가 를 선택합니다. 추가할 수 있는 최대 태그 수는 50개입니다. 변경 사항 저장 을 선택합니다. 변경 사항을 저장하면 태그가 대시보드에 적용되고 필터링 및 액세스 제어에 사용할 수 있습니다. javascript가 브라우저에서 비활성화되거나 사용이 불가합니다. AWS 설명서를 사용하려면 Javascript가 활성화되어야 합니다. 지침을 보려면 브라우저의 도움말 페이지를 참조하십시오. 문서 규칙 대시보드 복제 AWS Cost Explorer를 사용하여 비용 및 사용량 분석 이 페이지의 내용이 도움이 되었습니까? - 예 칭찬해 주셔서 감사합니다! 잠깐 시간을 내어 좋았던 부분을 알려 주시면 더 열심히 만들어 보겠습니다. 이 페이지의 내용이 도움이 되었습니까? - 아니요 이 페이지에 작업이 필요하다는 점을 알려 주셔서 감사합니다. 실망시켜 드려 죄송합니다. 잠깐 시간을 내어 설명서를 향상시킬 수 있는 방법에 대해 말씀해 주십시오. | 2026-01-13T09:29:32 |
http://www.chinadaily.com.cn/a/202601/13/WS69660bf0a310d6866eb33768.html | Old vinyls reflect modern desire for music - Chinadaily.com.cn Search HOME CHINA WORLD BUSINESS LIFESTYLE CULTURE TRAVEL VIDEO SPORTS OPINION REGIONAL NEWSPAPER MOBILE Global Edition ASIA 中文 双语 Français HOME CHINA WORLD BUSINESS LIFESTYLE CULTURE TRAVEL VIDEO SPORTS OPINION REGIONAL NEWSPAPER China Daily PDF China Daily E-paper MOBILE Culture Art Music&Theater Film&TV Books Heritage Events&Festivals People Cultural Exchange Video Photo Home / Culture / Music and Theater Home Culture Music and Theater Old vinyls reflect modern desire for music By Chen Nan | chinadaily.com.cn | Updated: 2026-01-13 17:09 Share Share - WeChat --> CLOSE Jazz pianist and collector Luo Ning curates the exhibition Looking Back , which offers visitors an immersive exploration of China's musical history through a meticulously selected collection of over 160 vinyl records. [Photo by Zou Hong/chinadaily.com.cn] The warmth of a crackling record, its familiar hum reverberating through time — this is the essence of Looking Back , a centennial exhibition that brings the past to life in vibrant detail. Curated by renowned jazz pianist and collector Luo Ning, the exhibition offers visitors an immersive exploration of China's musical history through a meticulously selected collection of over 160 vinyl records. Spanning nearly a century, from the late Qing Dynasty (1644-1911) to the 1980s, it sheds light on a time when music was both an art form and a cultural artifact. "It's like opening sleeping time capsules," says Luo, adding that this exhibition is an invitation for people, especially the younger generations, to connect with the past and rediscover the sounds and stories that shaped a century of music. Having amassed more than 10,000 vinyl records over two decades, Luo says that his collection is a labor of love, carefully sourced from around the world. His passion goes beyond the music itself. He notes that the album covers released after 1949 are considered an essential part of cultural expression. "The more records I collected, the more I realized it's about the stories embedded in these grooves, many of which are irreplaceable pieces of our cultural heritage," he says. Exhibits on display showcase China's evolving musical landscape over the past century. [Photo by Zou Hong/chinadaily.com.cn] One of the key pieces in the exhibition is a 1902 Cantonese Opera recording titled Dadong Jiebai , or Sworn Brotherhood Through A Hole, created by Chinese workers in the United States. Produced by the Victor Talking Machine Company, this early recording was produced for homesick overseas Chinese. "Sound, just like food, stirs memories of home," says Luo. More than a century later, it stands as a vibrant piece of cultural history, providing insight into the lives of Chinese laborers abroad at the time. Another notable piece is Mai Ma , or Selling Horse, performed by Tan Xinpei (1847-1917), one of the leading figures in Peking Opera. Released by Pathe Records in 1911, the record holds historical significance beyond its artistic value. Tan's Selling Horse was a favorite of Empress Dowager Cixi, who was an avid patron of Peking Opera. Her support played a crucial role in elevating Peking Opera to the cultural prominence it held during the late Qing Dynasty. Another featured recording is Mao Mao Yu , or Drizzle, often regarded as one of the earliest Chinese pop songs. Released in 1927 and performed by singer Li Minghui, the song marks a critical moment in Chinese music history. It was one of the first to embrace a more Westernized, light, and popular style, moving away from traditional Chinese music. "It's a glimpse into China's evolving musical landscape," says Luo. "What fascinates me most is how these records reflect the changing urban culture and musical evolution of China," he notes. 1 2 Next >>| 1/2 Next --> --> Related Stories Traditional Chinese opera with a contemporary twist Serenading an ancient city Carrying an epic spirit over centuries Guardians of a vanishing song Video: Preserving the sound of silk strings Photo Exhibition highlights artists' vivid devotion to colors Galloping toward the new Festive atmosphere, immersive cultural experience in North China ancient town Super idol rewrites the script Through the Seasons invites reflection and renewal China releases Year of the Horse stamps amid collector enthusiasm Most Popular Editor's Picks Tracing China's origins Tales & Trails: Gansu Linxia — a vibrant civilization along the Yellow River Photo Gallery Exhibition highlights artists' vivid devotion to colors Galloping toward the new Festive atmosphere, immersive cultural experience in North China ancient town Video 2025 captivating Chinese screens Leaping into the dark Tracking Chinese cultural frontline in 2025 Special Coverage Global Mayors Dialogue · Dunhuang World Conference on China Studies Chinaculture.org Golf: China's ancient game? Xinjiang: A living tapestry of intangible cultural heritage Top BACK TO THE TOP English 中文 HOME CHINA WORLD BUSINESS LIFESTYLE CULTURE TRAVEL VIDEO SPORTS OPINION REGIONAL NEWSPAPER China Daily PDF China Daily E-paper MOBILE Copyright 1994 - . All rights reserved. The content (including but not limited to text, photo, multimedia information, etc) published in this site belongs to China Daily Information Co (CDIC). Without written authorization from CDIC, such content shall not be republished or used in any form. Note: Browsers with 1024*768 or higher resolution are suggested for this site. License for publishing multimedia online 0108263 Registration Number: 130349 About China Daily Advertise on Site Contact Us Job Offer Expat Employment FOLLOW US Copyright 1994 - . All rights reserved. The content (including but not limited to text, photo, multimedia information, etc) published in this site belongs to China Daily Information Co (CDIC). Without written authorization from CDIC, such content shall not be republished or used in any form. --> | 2026-01-13T09:29:32 |
https://www.atlassian.com/software/jira/templates/marketing | Marketing Templates | Jira Template Library | Atlassian Close View this page in your language ? All languages Choose your language 中文 Deutsch English Español Français Italiano 한국어 Nederlands 日本語 Português Pусский Polski Get it free Features All Features Rovo in Jira Back Solutions Teams Use cases Company size Teams Marketing Engineering Design Operations IT Use cases Getting started Planning Campaign Management Agile Project Management Program Management Company size Enterprise Back Product guide Templates Templates All Templates Software Development Marketing Design Sales Operations Service Management HR Legal IT Operations Finance Jira Service Management templates Back Pricing More + Less - Get it free Back Get it free Jira Templates Open and close the navigation menu Categories Software development Marketing Design Sales Operations Service management HR Legal IT Operations Finance Project Management Templates Categories Software development Marketing Design Sales Operations Service management HR Legal IT Operations Finance Project Management Templates Marketing templates Deliver impactful marketing with Jira. With pre-built, customizable templates for marketing teams, it’s easy to get started. Project management Manage activities for completing a business project. Content management Manage the content lifecycle from prioritization to delivery. Campaign management Drive a marketing campaign from idea to execution. Go-to-market Coordinate a go-to-market launch. Marketing service management Manage and track all your marketing requests. Email campaign Plan and execute on email campaigns from draft to launch Marketing resources Jira for marketing teams Unlock the agility of your marketing team. Learn more about how Jira helps streamline your work. Learn more Put your projects on autopilot Focus on what matters and automate the rest. Create your team's custom rules or get started quickly with pre-made automations. Explore automations Plug in to your favorite tools Leverage 500+ integrations to work seamlessly, and 3000+ other extensions to craft your team’s perfect process. Explore app marketplace Company Careers Events Blogs Investor Relations Atlassian Foundation Press kit Contact us products Rovo Jira Jira Align Jira Service Management Confluence Loom Trello Bitbucket See all products Resources Technical support Purchasing & licensing Atlassian Community Knowledge base Marketplace My account Create support ticket Learn Partners Training & certification Documentation Developer resources Enterprise services See all resources Copyright © 2025 Atlassian Privacy Policy Terms Impressum Choose language Deutsch English Español Français Italiano 한국어 Nederlands 日本語 Polski Português русский 中文 | 2026-01-13T09:29:32 |
https://docs.aws.amazon.com/id_id/cost-management/latest/userguide/add-tags-to-dashboards.html | Menambahkan tag ke dasbor - AWS Manajemen Biaya Menambahkan tag ke dasbor - AWS Manajemen Biaya Dokumentasi AWS Billing and Cost Management Panduan Pengguna Terjemahan disediakan oleh mesin penerjemah. Jika konten terjemahan yang diberikan bertentangan dengan versi bahasa Inggris aslinya, utamakan versi bahasa Inggris. Menambahkan tag ke dasbor Tag membantu Anda mengidentifikasi, mengatur, dan mengelola dasbor Anda dengan menambahkan label deskriptif. Anda dapat menandai dasbor Anda untuk mengidentifikasi departemen mana yang membuatnya, melacaknya berdasarkan proyek atau inisiatif, memberi label tujuannya, atau menandainya untuk lingkungan yang berbeda. Misalnya, Anda dapat menggunakan tag seperti Department = Marketing atau Project = Cost-Optimization-2025 untuk mengkategorikan dasbor Anda. Ketika Anda memiliki banyak dasbor di seluruh organisasi Anda, tag menjadi sangat berharga. Mereka memungkinkan Anda untuk memfilter dan mencari dasbor tertentu, mengontrol akses melalui kebijakan IAM berdasarkan nilai tag, dan melacak dasbor yang melayani tujuan serupa di berbagai tim. Jika Anda menggunakan AWS CLI atau SDK, tag juga membantu Anda mengelola dasbor terkait sebagai grup. Untuk menambahkan tag ke dasbor Buka Konsol Manajemen Penagihan dan Biaya di https://console.aws.amazon.com/costmanagement/ . Pada panel navigasi, silakan pilih Dasbor . Pilih dasbor yang ingin Anda tag. Pilih Tindakan , lalu pilih Kelola tag dari daftar dropdown. Pilih Tambahkan tag baru . Masukkan kunci dan nilai (opsional) untuk tag. Pilih Tambahkan tag baru untuk menambahkan tag tambahan. Jumlah maksimum tag yang dapat Anda tambahkan adalah 50 Pilih Simpan perubahan . Setelah Anda menyimpan perubahan, tag diterapkan ke dasbor Anda dan dapat digunakan untuk pemfilteran dan kontrol akses. Javascript dinonaktifkan atau tidak tersedia di browser Anda. Untuk menggunakan Dokumentasi AWS, Javascript harus diaktifkan. Lihat halaman Bantuan browser Anda untuk petunjuk. Konvensi Dokumen Duplikasi dasbor Menganalisis biaya dan penggunaan Anda dengan AWS Cost Explorer Apakah halaman ini membantu Anda? - Ya Terima kasih telah memberitahukan bahwa hasil pekerjaan kami sudah baik. Jika Anda memiliki waktu luang, beri tahu kami aspek apa saja yang sudah bagus, agar kami dapat menerapkannya secara lebih luas. Apakah halaman ini membantu Anda? - Tidak Terima kasih telah memberi tahu kami bahwa halaman ini perlu ditingkatkan. Maaf karena telah mengecewakan Anda. Jika Anda memiliki waktu luang, beri tahu kami bagaimana dokumentasi ini dapat ditingkatkan. | 2026-01-13T09:29:32 |
https://ace.atlassian.com/clcs/ | Community-led Conferences | Atlassian Community Events Skip to main content Toggle Navigation Events Connect Atlassian Community Events Join a Chapter Community-led Conferences Online Community Connect with Orbiit Learn Community-Led Classes Company User Groups Earn an Atlassian Certification Become a Champion ACE Speakers Find an ACE Speaker Log in Community Led Conferences Explore our Community-Led Conferences, where collaborative, user led events take the main stage. Join our connected community to engage in purposeful discussions, share insights, and co-create impactful experiences. Calendar January, 2026 28 New York City, US RovoCon New York February, 2026 21 Bangkok, TH Bangkok Atlassian Community Learning Event 28 Indore, IN Atlassian Community Indore Presents: Community Rewind 2025 Meet Atlassian users like you The Atlassian Community features a global network of people who meet online and in-person with a shared mission to build relationships and expand their knowledge of Atlassian products. Find your community group Interested In becoming a Speaker? Seize the opportunity to become a speaker and share your expertise! Whether you're a seasoned pro or a rising star, this platform is your stage to inspire, inform, and connect with an engaged audience. Learn more → Interested in becoming a Sponsor? Sponsoring Atlassian Community Events is a great way to showcase your expertise with Atlassian tools and practices. Helping to drive leaders success can get you face time with customers and help you solidify your reputation as a reliable resource within Atlassian tools. Learn more → Want to become a Leader in your city? Shape the Atlassian Community as a leader! This thrilling opportunity allows you to influence, inspire, and make a significant impact. Atlassian Community Event Leaders go above and beyond to create engaging, fun events. It's a lot of work, and a lot of play! Embrace the challenge and unlock the potential of community building. Learn more → Recent Conferences Check out all the Community Conferences that have happened all over the world before and watch this space for repeat conferences. Team '25-EU | Community-led conference - Pune : Dec 13, 2025 , December 13, 2025 Pune, IN 🎬 Formula Fun Night: Year-End Party for Atlassian Community Seoul🎉 , December 9, 2025 Seoul, KR Global Community Holiday Social 2025: Celebrate, Connect & Reflect! , December 8, 2025 Austin, US Merry Morning Thanksmas - Coffee and Donuts , December 4, 2025 Cincinnati, US Launching Bangkok Atlassian Community Events , November 27, 2025 Bangkok, TH Ziton og Confluence Cloud + Team'25 Europe wrap-up 🎁 , November 20, 2025 Aarhus, DK AI Craft Meetup: Mastering the art of AI in Modern Work , November 12, 2025 New York City, US Atlassian Builders' Summit (In-Person) Conference - SOLD OUT , October 22, 2025 Virtual, US How to Level Up Jira & Confluence — 10 Years of ACE Cologne , October 15, 2025 Cologne, DE London Atlassian Community Events Present: Team Europe '25: RovoCon , October 13, 2025 London, GB Port of Call: Barcelona , October 5, 2025 London, GB Atlassian Builders' Summit in Black & White with Josh Costella , September 25, 2025 New York, US Córdoba Team '25 Community-Led Conference. The Bee's Knees! , August 29, 2025 Córdoba, AR Atlassian Co‑innovation Power Hour🔥 , August 28, 2025 Seoul, KR AI Summer Camp with Atlassian Rovo , August 22, 2025 Los Angeles, US Forge & Rovo: Building the Future of Atlassian Apps , August 2, 2025 Delhi, IN Team 25 Recap: Unlocking the Power of Atlassian Tools in Bengaluru , June 28, 2025 Bangalore, IN Team ’25 Recap - Atlassian's Latest Announcements , June 22, 2025 Ahmedabad, IN Team '25 Recap & Community Spotlight – Atlassian Pune Community Annual Conference , June 7, 2025 Pune, IN Atlassian UK & Ireland Community Led Conference '25 , June 6, 2025 London, GB TEAM '25 Solidario de la Comunidad Atlassian de Valencia , May 29, 2025 Valencia, ES Agile in Wonderland Meanjin (Brisbane) 2025 - take 2 , May 27, 2025 Brisbane, AU Community + Customer Led Conference in Berlin , May 15, 2025 Berlin, DE Resumen y novedades del TEAM 25 de Anaheim,California,(EEUU) , May 14, 2025 Barcelona, ES ACE Belgium - Exciting Updates from Atlassian Team'25 - Join Us :) , May 6, 2025 Belgium, BE Agile in Wonderland Melbourne 2025 , April 30, 2025 Melbourne, AU Team '25 Follow-Up: Atlassian Spring in Kyiv , April 25, 2025 Kyiv, UA Trello Trailblazers TrelloCon 2025 , April 10, 2025 Virtual, GB Workshop on AI and Technology Enabled Collaboration for Nonprofits , March 22, 2025 Delhi, IN Phoenix | Rovo World Tour | ACE Roadshow 2025 , March 6, 2025 Phoenix, US La inteligencia artificial de Atlassian en la nube al descubierto , February 27, 2025 Madrid, ES Bristol Atlassian Community Event - February 19th , February 19, 2025 Bristol, GB Creando contenido y divulgándolo con el programa Atlassian Creator , February 19, 2025 Barcelona, ES Kickstarting the Bangkok Atlassian Community Event , February 19, 2025 Bangkok, TH Conversational AI with Gaspar AI: boost engagement and amplify productivity , February 13, 2025 Milan, IT San Francisco | Jira for all teams | ACE Roadshow 2025 , February 12, 2025 San Francisco, US Atlassian Community Conference 2025, Kathmandu , February 8, 2025 Kathmandu, NP Community Event at Atlas Camp 2025 - A Night of Connection and Innovation , February 4, 2025 Belgium, BE Faster Together: Collaboration and Operations in Harmony , December 22, 2024 Ahmedabad, IN Team on Tour Recap - Atlassian Community Bangalore , December 7, 2024 Bangalore, IN Community-led conference - Pune : Dec 7, 2024 , December 7, 2024 Pune, IN Atlassian Developer Day , December 7, 2024 Noida, IN Year-End Festive Gathering | Thank You 2024 & Welcome 2025! Dublin Edition , December 6, 2024 Dublin, IE Atlassian Community LATAM Roadshow 2024 - Santiago de Chile , November 16, 2024 Santiago, CL Atlassian Community LATAM Roadshow 2024 - Córdoba , November 14, 2024 Córdoba, AR Back to the future with Atlassian: AI, ROVO and Guard , November 14, 2024 Prague, CZ Atlassian Community LATAM Roadshow 2024 - Buenos Aires , November 12, 2024 Buenos Aires, AR Team 24 de la Comunidad Atlassian de Malaga , November 8, 2024 Málaga, ES Atlassian Community Connect: A Day of Collaboration and Learning , October 26, 2024 Bangalore, IN ACE Brisbane @ LAST Conference , September 27, 2024 Brisbane, AU Learn about all the ways to get involved in the Atlassian Community. The Atlassian Community features a global network of people who meet online and in-person with a shared mission to build relationships and expand their knowledge of Atlassian products. Explore now Submit a Community Conference Do you have a dream to create a Community Conference? Connect with our team to share your vision and understand best practices. Please email us at ace@.atlassian.com © 2026 Atlassian Community Events All Rights Reserved ∙ Events ∙ Contact Us ∙ Privacy Policy ∙ Terms and Conditions ∙ Notice at Collection | 2026-01-13T09:29:32 |
https://giantrabbit.com/our-work?client=howlround-theatre-commons | Our Work | Giant Rabbit Skip to main content Menu Close Main navigation Our Services Our Work About Us Strategy Design Development CRM Selection & Data Migration Fundraising & User Analytics Drupal 7 Upgrades to Backdrop CMS Project Rescues Managed Hosting Support & Maintenance Security  All Arts & Culture Education Environment Health Human Rights Social Justice Technology & Privacy  About Giant Rabbit The Team Jobs Contact Us  Our Work Our clients are fighting for public health, access to abortion, and LGBTQ+ rights. They're going to court on behalf of asylum-seekers and promoting human rights around the world. We support organizations that fight climate change, work for environmental conservation, and warn people about the risks of avalanches. Our clients are also working theaters, performing arts organizations, museums, and cultural institutions. Defending human rights at home and abroad. Partner Since 2018 Center for Gender and Refugee Studies Partner Since 2022 Family Violence Appellate Project Partner Since 2013 Front Line Defenders Partner Since 2022 Human Rights First Partner Since 2022 Justice Action Center Partner Since 2016 National Network of Abortion Funds (NNAF) Partner Since 2020 Observatory for the Protection of Human Rights Defenders Partner Since 2022 Youth Law Center Working toward a healthier future. Partner Since 2019 American Academy of Pediatrics California Chapter 1 Partner Since 2022 Advancing New Standards in Reproductive Health (ANSIRH) Partner Since 2023 Beyond the Pill Partner Since 2015 Cutaneous Lymphoma Foundation Partner Since 2020 Farmers Market Coalition Partner Since 2021 HealthRIGHT 360 Partner Since 2019 Ibis Reproductive Health Services Partner Since 2020 Mandela Partners Protecting the environment and fighting climate change. Partner From 2022 To 2023 Audubon Canyon Ranch Partner Since 2017 Ecology Center Partner Since 2014 Edible Schoolyard Project Partner Since 2007 eLock Technologies Partner Since 2022 Environmental Grantmakers Association Partner Since 2019 Highstead Partner Since 2020 John Muir Land Trust Partner Since 2022 Just Zero Partner Since 2014 Leave No Trace Partner Since 2020 Northwest Avalanche Center (NWAC) Partner Since 2023 One Tree Planted Partner Since 2021 Payette Avalanche Center Partner Since 2022 Sempervirens Partner Since 2019 Sierra Avalanche Center Partner Since 2014 The Trust For Public Land Partner Since 2022 Utah Avalanche Center Working for social and economic justice for all. Partner Since 2021 A New Way of Life Partner Since 2022 Center for Constitutional Rights Partner Since 2021 Center for WorkLife Law Partner Since 2021 Common Cause Partner Since 2010 CompassPoint Partner Since 2021 Equality Action Center Partner Since 2018 Keshet Partner Since 2024 Labor Notes Partner Since 2022 Legal Link Partner Since 2022 Mirror Memoirs Partner Since 2013 Unbound Philanthropy Partner Since 2018 Migrant Justice Building connection through arts, culture, and food. Partner Since 2013 18 Reasons Partner Since 2021 Artists Communities Alliance Partner Since 2019 Authors Alliance Partner Since 2018 Company One Theatre Partner Since 2017 Howlround Theatre Commons Partner Since 2023 Lighthouse Writers Workshop Partner Since 2023 Museo de las Americas Partner Since 2013 Sacred Lands Film Project Improving the quality and accessibility of education. Partner Since 2022 Academy College Prep Partner From 2017 To 2022 Bellwether Education Partner Since 2020 California Community Colleges Transfer Guarantee Pathway to Historically Black Colleges and Universities Partner From 2019 To 2020 The College of Business at Oregon State University Partner Since 2011 Ignited Partner From 2018 To 2022 Maker Ed Partner Since 2014 myShakespeare Partner Since 2019 Umoja Community Education Foundation Using technology for good and defending digital rights and privacy. Partner Since 2014 Electronic Frontier Foundation Partner Since 2019 FreeBSD Foundation Partner From 2015 To 2016 Internet Archive Partner Since 2012 Society of Motion Picture & Television Engineers (SMPTE) Partner From 2013 To 2021 The TOR Project Partner Since 2014 USENIX Partner Since 2020 Women's Audio Mission Partner From 2013 To 2015 Wikimedia Foundation Non-profit Sectors Human Rights Health Environment Social Justice Arts & Culture Education Technology & Privacy ❮ How can we help? Get in touch Giant Rabbit LLC 415.355.4211 info@giantrabbit.com Copyright © 2018-2025 by Giant Rabbit LLC. Artwork by RBlack . | Read our privacy policy . | 2026-01-13T09:29:32 |
https://developer.wordpress.com/docs/guides/how-to-create-custom-blueprints/ | How to create custom Blueprints for WordPress Studio and Playground Skip to content Search Search Menu Search Search At a glance WordPress and WordPress.com Tech stack Glossary Interface styles Support Get started Step 1: Create a site Step 2: Set up your local environment Step 3: Set up GitHub Step 4: Develop locally Step 5: Deploy to your production or staging site WordPress Studio Studio sites Blueprints Open in WordPress Studio button How to create custom Blueprints Preview Sites Studio Sync Studio Assistant Studio CLI Import & export SSL in Studio Frequently asked questions Changelog Roadmap Beta features MCP MCP tools reference MCP prompt examples Developer tools WP-CLI WP-CLI overview Platform-specific commands Common commands Troubleshooting REST API Getting started with the REST API REST API reference Namespaces & versions OAuth2 authentication WordPress.com Connect Using the REST API from JavaScript & the browser (CORS) Guidelines for responsible use of Automattic’s APIs Site Accelerator API Platform features Site performance Domain management User management Real time backup Storage Sitemaps Jetpack Scan Account security Guides Add HTTP headers Block patterns Manage user, file, and folder permissions Manually restore your site from a Jetpack Backup Symlinked files and folders WordPress.com oEmbed provider Troubleshooting Enabling WP_DEBUG Jetpack Activity Log At a glance WordPress and WordPress.com Tech stack Glossary Interface styles Support Get started Step 1: Create a site Step 2: Set up your local environment Step 3: Set up GitHub Step 4: Develop locally Step 5: Deploy to your production or staging site WordPress Studio Studio sites Blueprints Open in WordPress Studio button How to create custom Blueprints Preview Sites Studio Sync Studio Assistant Studio CLI Import & export SSL in Studio Frequently asked questions Changelog Roadmap Beta features MCP MCP tools reference MCP prompt examples Developer tools WP-CLI WP-CLI overview Platform-specific commands Common commands Troubleshooting REST API Getting started with the REST API REST API reference Namespaces & versions OAuth2 authentication WordPress.com Connect Using the REST API from JavaScript & the browser (CORS) Guidelines for responsible use of Automattic’s APIs Site Accelerator API Platform features Site performance Domain management User management Real time backup Storage Sitemaps Jetpack Scan Account security Guides Add HTTP headers Block patterns Manage user, file, and folder permissions Manually restore your site from a Jetpack Backup Symlinked files and folders WordPress.com oEmbed provider Troubleshooting Enabling WP_DEBUG Jetpack Activity Log How to create custom WordPress Blueprints WordPress Studio is powered by WordPress Playground , which supports Blueprints. Blueprints in Studio help you: Streamline repeatable setups: Create Blueprints for common site types (like blog, portfolio, or store) to start new Studio projects more efficiently. Keep teams aligned: Add a blueprint.json file to your project’s GitHub repository, whether you’re building a plugin, theme, or full site. It scaffolds the same environment every time, so teammates can start building a plugin, theme, or full site in minutes, while version control keeps changes reviewable and consistent. Simplify demos and testing: Launch Studio with the exact theme, plugins, and sample content you need. Reproduce bugs or confirm fixes with a reliable, repeatable setup. This guide will teach you the basics of creating a custom Blueprint and provide additional resources where you can learn more. What are Blueprints? A Blueprint is a JSON file that defines a WordPress site’s setup. Within a Blueprint, you can configure settings such as your preferred WordPress and PHP versions. You can also specify a list of steps to run when the site is created, like installing and activating plugins and themes, setting site options, importing demo content, and running PHP or SQL queries. Blueprints are written using a public JSON schema, standardizing their use across Playground, WordPress Studio, and beyond. This minimal example configures the preferred WordPress and PHP versions, installs and activates the WooCommerce plugin and the Pendant theme, and sets the admin color scheme to “Modern.” { "$schema": "https://playground.wordpress.net/blueprint-schema.json", "landingPage": "/wp-admin/", "login": true, "preferredVersions": { "php": "8.3", "wp": "latest" }, "steps": [ { "step": "installPlugin", "pluginData": { "resource": "wordpress.org/plugins", "slug": "woocommerce" }, "options": { "activate": true } }, { "step": "installTheme", "themeData": { "resource": "wordpress.org/themes", "slug": "pendant" }, "options": { "activate": true } }, { "step": "updateUserMeta", "meta": { "admin_color": "modern" }, "userId": 1 } ] } { "$schema": "https://playground.wordpress.net/blueprint-schema.json", "landingPage": "/wp-admin/", "login": true, "preferredVersions": { "php": "8.3", "wp": "latest" }, "steps": [ { "step": "installPlugin", "pluginData": { "resource": "wordpress.org/plugins", "slug": "woocommerce" }, "options": { "activate": true } }, { "step": "installTheme", "themeData": { "resource": "wordpress.org/themes", "slug": "pendant" }, "options": { "activate": true } }, { "step": "updateUserMeta", "meta": { "admin_color": "modern" }, "userId": 1 } ] } Copiar Copiado Key things to know: preferredVersions lets you predefine the PHP and WordPress versions. steps is where the magic happens. You can log in, install or activate plugins and themes, import WXR content, set options, run PHP, and more. For instance, the example demonstrates installing WooCommerce, setting the site’s language to Spanish, and adjusting the admin color scheme. Check out the Step Library for each available action with examples. WordPress Playground offers an interactive Blueprint builder , allowing you to test various Blueprint setups. It’s a great way to validate your custom Blueprints before running them in Studio. Preview Blueprint Preview and download this Blueprint using the button above. Once downloaded, you can use it to create a new site in Studio. For detailed instructions, refer to the site creation flow in Studio . Blueprint limitations in Studio The following table highlights how Blueprints function differently in Studio compared to playground.wordpress.net , as of version 1.6.0: Property Why it’s ignored by Studio landingPage Users can navigate to the WP Admin and frontend of the local site from links within the Studio user interface. login You’re automatically logged in when navigating to local sites from the Studio user interface. extraLibraries Studio maintains all extra libraries directly. features → networking Users should always be able to install plugin and themes in Studio. steps → step → defineSiteUrl The site URL defaults to localhost and can be customized in the Studio user interface during site creation. steps → step → enableMultisite Multisite is not currently supported in Studio. steps → step → setSiteOptions → blogName or siteOptions → blogName The site name is set in the Studio user interface during site creation. steps → step → setSiteOptions → login → username/password or siteOptions → login → username/password The username and password for a local site is set by Studio during site creation. Additional resources Blueprints can be simple like the example above or as sophisticated as your workflow requires. The Playground documentation provides a clear overview of Blueprint JSON format, a quick start tutorial, and detailed references. If you want to create your own Blueprints or explore examples from the WordPress community, see the resources below: Blueprints overview and quick start tutorial Data format and schema Steps reference and visual Step Library Example Blueprints and the community gallery Leveraging AI tools like the Studio Assistant is a great way to get help building custom Blueprints. Simply ask it to write a Blueprint for you: There are also several community projects that provide a user interface for creating Blueprints, which are worth checking out: WordPress Playground Step Library Pootle Playground Block Based Visual Blueprint Builder For those following the WordPress Playground project closely, you may be aware that a new version of Blueprints is under development . As soon as Blueprints v2 is stable in Playground, support will be added to Studio in a subsequent release. All v1 Blueprints will remain supported. Last updated: November 03, 2025 Ready to get started with WordPress.com? Get started Documentation is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License An Automattic Creation Loading Comments... Write a Comment... Email (Required) Name (Required) Website | 2026-01-13T09:29:32 |
https://cloudflare.com/de-de/coffee-shop-networking/ | Coffee Shop-Networking mit Cloudflare | Cloudflare Registrieren Sprachen English English (United Kingdom) Deutsch Español (Latinoamérica) Español (España) Français Italiano 日本語 한국어 Polski Português (Brasil) Русский 繁體中文 简体中文 Plattform Connectivity Cloud Die Connectivity Cloud von Cloudflare bietet mehr als 60 Netzwerk-, Sicherheits- und Performance-Services. Enterprise Für große und mittelständische Unternehmen Kleinunternehmen Für kleine Organisationen Partner Werden Sie Cloudflare-Partner Anwendungsfälle Modernisierung von Anwendungen Höhere Performance App-Verfügbarkeit sicherstellen Web-Erfahrung optimieren Sicherheit modernisieren VPN-Ersatz Phishing-Schutz Schutz von Webanwendungen und APIs Netzwerkmodernisierung Coffee Shop-Networking WAN-Modernisierung Vereinfachung des Firmennetzwerks CXO-Themen KI einführen Die KI-Nutzung in der Belegschaft und digitalen Erlebnissen fördern. KI-Sicherheit Sichern Sie agentenbasierte KI- und GenAI-Anwendungen Datenkonformität Compliance optimieren und Risiken minimieren Post-Quanten-Kryptografie Daten schützen und Compliance-Standards erfüllen Branchen Gesundheitswesen Bankwesen Einzelhandel Gaming Öffentlicher Sektor Weitere Informationen Produktleitfaden Referenz-Architekturen Analyseberichte Vertiefung Ereignisse Demos Webinare Workshops Demo anfragen Produkte Produkte Workspace-Sicherheit Zero-Trust-Netzwerkzugriff Secure Web Gateway E-Mail-Sicherheit Cloud Access Security Broker Anwendungssicherheit DDoS-Schutz auf L7 Web Application Firewall API-Sicherheit Bot-Management Anwendungsperformance CDN DNS Smart Routing Load Balancing Netzwerke und SASE DDoS-Schutz auf L3/4 NaaS / SD- WAN Firewall as a Service Netzwerk-Interconnection Tarife und Preise Enterprise-Tarife KMU-Tarife Tarife für Privatanwender Zum Tarifvergleich Globale Dienste Support- und Success-Pakete Optimiertes Cloudflare-Erlebnis Professionelle Services Implementierung unter Leitung von Experten Technische Kundenbetreuung Fokussiertes technisches Management Security Operations-Dienst Cloudflare-Überwachung und -Vorfallsreaktion Domainregistrierung Domains kaufen und verwalten 1.1.1.1 Kostenlose DNS-Auflösung Weitere Informationen Produktleitfaden Referenz-Architekturen Analyseberichte Produktdemonstrationen und Rundgänge Entscheidungshilfe Entwickler Dokumentation Entwickler-Bibliothek Dokumentation und Leitfäden Anwendungsdemos Entwicklungsmöglichkeiten entdecken Tutorials Schritt-für-Schritt-Entwicklungsleitfäden Referenz-Architektur Diagramme und Designmuster Produkte Künstliche Intelligenz AI Gateway KI-Apps beobachten & steuern Workers AI ML-Modelle in unserem Netzwerk ausführen Rechenleistung Observability Protokolle, Metriken und Traces Workers Serverlose Apps erstellen/bereitstellen Medien Images Bilder transformieren & optimieren Realtime Echtzeit-Audio-/-Video-Apps entwickeln Speicher und Datenbank D1 Erstellen Sie serverlose SQL-Datenbanken R2 Daten ohne kostspielige Egress-Gebühren speichern Tarife und Preise Workers Serverlose Apps erstellen & bereitstellen Workers KV Serverloser Schlüssel-Werte-Speicher für Apps R2 Daten speichern ohne teure Egress-Gebühren Projekte entdecken Anwendungsbeispiele aus der Praxis KI-Demo in 30 Sekunden Schnellstart-Guide Erkunden Sie den Workers Playground Entwickeln, testen und bereitstellen Entwickler-Discord Werden Sie Teil der Community Jetzt entwickeln Partner Partner-Netzwerk Cloudflare hilft Ihnen zu wachsen, Innovationen voranzutreiben und Kundenbedürfnisse gezielt zu erfüllen. Partner-Portal Ressourcen finden und Angebote registrieren Arten von Partnerschaften PowerUP-Programm Unternehmenswachstum vorantreiben – während Kunden zuverlässig verbunden und geschützt bleiben Technologiepartner Entdecken Sie unser Ökosystem aus Technologie-Partnern und Integrationen Globale Systemintegratoren Unterstützen Sie eine nahtlose, groß angelegte digitale Transformation Service-Provider Entdecken Sie unser Netzwerk von geschätzten Service-Providern Self-Serve-Agenturprogramm Verwalten Sie Self-Serve-Konten für Ihre Kunden Peer-to-Peer-Portal Traffic-Einblicke für Ihr Netzwerk Einen Partner finden Steigern Sie Ihr Geschäft – vernetzen Sie sich mit Cloudflare Powered+ Partnern. Ressourcen Vertiefung Demos + Produktführungen On-Demand-Produktdemos Kundenreferenzen Mit Cloudflare zum Erfolg Webinare Aufschlussreiche Diskussionen Workshops Virtuelle Foren Bibliothek Hilfreiche Leitfäden, Roadmaps und mehr Berichte Erkenntnisse aus der Forschung von Cloudflare Blog Technische Vertiefungen und Produktneuigkeiten Learning Center Lerntools und praktische Ratgeber Erstellen Referenz-Architektur Technische Leitfäden Lösungs- & Produktleitfäden Produktdokumentation Dokumentation Dokumentation für Entwickler Kennenlernen theNET Erkenntnisse für das digitale Unternehmen Cloudflare TV Innovative Reihen und Events Cloudforce One Bedrohungsforschung und -maßnahmen Radar Internet-Traffic und Sicherheitstrends Analyseberichte Berichte von Branchenanalysten Ereignisse Kommende regionale Events Vertrauen, Datenschutz und Compliance Compliance-Informationen und -Richtlinien Support Kontakt Community-Forum Kontozugang verloren? Entwickler-Discord Hilfe holen Unternehmen Unternehmensinfos Leadership Vorstellung unseres Führungsteams Anlegerbeziehungen Informationen für Anleger Presse Aktuelle Nachrichten entdecken Stellenausschreibungen Offene Stellen erkunden Vertrauen, Datenschutz und Sicherheit Datenschutz Richtlinien, Daten und Schutz Vertrauen Richtlinien, Prozess und Sicherheit Compliance Zertifizierung und Regulierung Transparenz Richtlinien und Hinweise Öffentliches Interesse Humanitäre Hilfe Projekt Galileo Behörden Projekt „Athenian“ Wahlen Cloudflare for Campaigns Gesundheit Project Fair Shot Globales Netzwerk Globale Standorte und Status Anmelden Vertrieb kontaktieren Implementieren Sie Coffee Shop-Networking mit Cloudflare Verbessern Sie die Benutzerfreundlichkeit und reduzieren Sie die Legacy-Netzwerkinfrastruktur Nutzen Sie die global verteilte, Cloud-native SASE-Plattform von Cloudflare, um den Zugriff auf Anwendungen zu optimieren und die Zweigstellenvernetzung zu vereinfachen. Sachkundige Beratung Kurzbeschreibung anfordern Cloudflare macht den Unterschied Bessere Nutzererfahrung Bieten Sie einen einfachen, optimierten und sicheren Benutzerzugriff, unabhängig vom physischen Standort. Niedrigere Gesamtbetriebskosten (TCO) Senken Sie Ihre Investitionskosten für Hardware-Appliances und private Netzwerkverbindungen. Agilität und Geschwindigkeit im Cloud-Maßstab Stellen Sie weltweit schnell Konnektivität bereit – ganz ohne eigene Infrastruktur. So funktioniert’s Wichtige Schritte für Coffee Shop-Networking Reduzieren Sie herkömmliche On-Premise-Netzwerkgeräte, indem Sie auf die einheitlichen, Cloud-nativen SASE-Services von Cloudflare umsteigen: Arbeiten Sie sicher von überall, ob lokal oder remote, mit Access für Zero Trust-Netzwerkzugang (ZTNA). Verbinden Sie Ihre Netzwerke mit den flexiblen Optionen für Magic WAN mit Zweigstellen, Einzelhandelsstandorten, Rechenzentren und Clouds. Sichern Sie den Datenverkehr und stoppen Sie Bedrohungen mit unserem umfassenden SWG ( Gateway ) und unserer Firewall-as-a-Service, Magic Firewall . Überwachen Sie proaktiv die Benutzererfahrung, identifizieren Sie Probleme und beheben Sie Geräte- und Netzwerkprobleme mithilfe von Digital Experience Monitoring (DEX) . Das sagen unsere Kunden „Mit zunehmender Anzahl an Standorten kann die Konfiguration neuer Netzwerke ebenso kostspielig wie komplex sein. Unsere Vision ist es, einen Punkt zu erreichen, an dem wir ein Gerät überall auf der Welt einsetzen können und es einfach funktioniert. Mit Cloudflare erreichen wir dieses Maß an Standardisierung und Einfachheit.“ Chief Technology Officer, Ocado Vereinfachen Sie Ihr Netzwerk mit den Coffee-Shop-Networking-Lösungen von Cloudflare Whitepaper lesen Was spricht für Cloudflare? Vereinfachen und optimieren Sie die Datentransparenz und den Schutz für den gesamten Traffic. Die Cloudflare-Plattform vereint Cloud-native Sicherheits- und Vernetzungsdienste an einem einzigen Ort und ist deshalb auch perfekt für Datenschutz: Modulare Architektur Erfüllen Sie alle geschäftlichen Anforderungen mit vollständiger API-Programmierbarkeit und ortsabhängig anpassbarer Protokollierung, Weiterleitung, Zwischenspeicherung und Entschlüsselung. Integration Keine Abstriche bei der Nutzererfahrung mit Single-Pass-Überprüfung und einem 50 ms von 95Prozent aller Internetnutzer entfernten Netzwerk Bedrohungsdaten Besserer Schutz vor bekannten und unbekannten Gefahren dank der Erkenntnisse aus ~234 Milliarden täglich neutralisierter Bedrohungen. Einheitliche Schnittstelle Reduzieren Sie die Zersplitterung von Tools und die Alarmmüdigkeit mit einer einzigen, einheitlichen administrativen Benutzeroberfläche. Weitere Informationen On Demand-Webinare Das Fundament für Coffee Shop-Networking legen Lernen Sie, wie Sie auf Basis zentraler SASE-Anwendungsfälle einen flexiblen Plan zur Einführung von Coffee Shop-Networking zu erstellen Webinar ansehen Cloudflare-Produktübersicht Magic WAN Vereinfachen Sie die Netzwerkkonnektivität von Zweigstellen, Multi-Cloud-VPCs oder Rechenzentren mithilfe der Cloudflare One SASE-Plattform. Mehr dazu Cloudflare-Produktübersicht Cloudflare Access Steigern Sie die Produktivität und reduzieren Sie Risiken mit dem Benutzerzugriff auf selbst gehostete, SaaS- oder Nicht-Web-Apps – ohne VPN. Mehr dazu Vertrieb kontaktieren +1 (888) 99 FLARE Erste Schritte Free-Tarife Tarife für kleine Unternehmen Für Unternehmen Empfehlung erhalten Demo anfragen Vertrieb kontaktieren Lösungen Connectivity Cloud Anwendungsservices SASE und Workspace-Sicherheit Netzwerkservices Entwicklerplattform Support Hilfe-Center Kundensupport Community-Forum Entwickler-Discord Kontozugang verloren? Cloudflare-Status Compliance Ressourcen rund um Compliance Vertrauen DSGVO Verantwortungsvolle KI Transparenzbericht Regelverstoß melden Unternehmen Über Cloudflare Netzwerkkarte Unser Team Logos und Pressekit Diversität, Gleichberechtigung und Inklusion Impact/ESG Erste Schritte Free-Tarife Tarife für kleine Unternehmen Für Unternehmen Empfehlung erhalten Demo anfragen Vertrieb kontaktieren Lösungen Connectivity Cloud Anwendungsservices SASE und Workspace-Sicherheit Netzwerkservices Entwicklerplattform Support Hilfe-Center Kundensupport Community-Forum Entwickler-Discord Kontozugang verloren? Cloudflare-Status Compliance Ressourcen rund um Compliance Vertrauen DSGVO Verantwortungsvolle KI Transparenzbericht Regelverstoß melden Unternehmen Über Cloudflare Netzwerkkarte Unser Team Logos und Pressekit Diversität, Gleichberechtigung und Inklusion Impact/ESG © 2026 Cloudflare, Inc. Datenschutzrichtlinie Nutzungsbedingungen Sicherheitsprobleme berichten Ihre Datenschutzoptionen Marken | 2026-01-13T09:29:32 |
http://groovy-lang.org/syntax.html#_decimal_literals | The Apache Groovy programming language - Syntax Socialize Discuss on the mailing-list Groovy on X Groovy on Bluesky Groovy on Mastodon Groovy on LinkedIn Events and conferences Source code on GitHub Report issues in Jira Stack Overflow questions Slack Community You are using an outdated browser. Please upgrade your browser to improve your experience. Apache Groovy™ Learn Documentation Download Support Contribute Ecosystem Blog posts Socialize Table of contents 1. Comments 1.1. Single-line comment 1.2. Multiline comment 1.3. Groovydoc comment 1.4. Shebang line 2. Keywords 3. Identifiers 3.1. Normal identifiers 3.2. Quoted identifiers 4. Strings 4.1. Single-quoted string 4.2. String concatenation 4.3. Triple-single-quoted string 4.3.1. Escaping special characters 4.3.2. Unicode escape sequence 4.4. Double-quoted string 4.4.1. String interpolation 4.4.2. Special case of interpolating closure expressions 4.4.3. Interoperability with Java 4.4.4. GString and String hashCodes 4.5. Triple-double-quoted string 4.6. Slashy string 4.6.1. Special cases 4.7. Dollar slashy string 4.8. String summary table 4.9. Characters 5. Numbers 5.1. Integral literals 5.1.1. Alternative non-base 10 representations Binary literal Octal literal Hexadecimal literal 5.2. Decimal literals 5.3. Underscore in literals 5.4. Number type suffixes 5.5. Math operations 5.5.1. The case of the division operator 5.5.2. The case of the power operator 6. Booleans 7. Lists 8. Arrays 8.1. Java-style array initialization 9. Maps Syntax This chapter covers the syntax of the Groovy programming language. The grammar of the language derives from the Java grammar, but enhances it with specific constructs for Groovy, and allows certain simplifications. 1. Comments 1.1. Single-line comment Single-line comments start with // and can be found at any position in the line. The characters following // , until the end of the line, are considered part of the comment. // a standalone single line comment println "hello" // a comment till the end of the line 1.2. Multiline comment A multiline comment starts with /* and can be found at any position in the line. The characters following /* will be considered part of the comment, including new line characters, up to the first */ closing the comment. Multiline comments can thus be put at the end of a statement, or even inside a statement. /* a standalone multiline comment spanning two lines */ println "hello" /* a multiline comment starting at the end of a statement */ println 1 /* one */ + 2 /* two */ 1.3. Groovydoc comment Similarly to multiline comments, Groovydoc comments are multiline, but start with /** and end with */ . Lines following the first Groovydoc comment line can optionally start with a star * . Those comments are associated with: type definitions (classes, interfaces, enums, annotations), fields and properties definitions methods definitions Although the compiler will not complain about Groovydoc comments not being associated with the above language elements, you should prepend those constructs with the comment right before it. /** * A Class description */ class Person { /** the name of the person */ String name /** * Creates a greeting method for a certain person. * * @param otherPerson the person to greet * @return a greeting message */ String greet(String otherPerson) { "Hello ${otherPerson}" } } Groovydoc follows the same conventions as Java’s own Javadoc. So you’ll be able to use the same tags as with Javadoc. In addition, Groovy supports Runtime Groovydoc since 3.0.0, i.e. Groovydoc can be retained at runtime. Runtime Groovydoc is disabled by default. It can be enabled by adding JVM option -Dgroovy.attach.runtime.groovydoc=true The Runtime Groovydoc starts with /**@ and ends with */ , for example: /**@ * Some class groovydoc for Foo */ class Foo { /**@ * Some method groovydoc for bar */ void bar() { } } assert Foo.class.groovydoc.content.contains('Some class groovydoc for Foo') (1) assert Foo.class.getMethod('bar', new Class[0]).groovydoc.content.contains('Some method groovydoc for bar') (2) 1 Get the runtime groovydoc for class Foo 2 Get the runtime groovydoc for method bar 1.4. Shebang line Beside the single-line comment, there is a special line comment, often called the shebang line understood by UNIX systems which allows scripts to be run directly from the command-line, provided you have installed the Groovy distribution and the groovy command is available on the PATH . #!/usr/bin/env groovy println "Hello from the shebang line" The # character must be the first character of the file. Any indentation would yield a compilation error. 2. Keywords Groovy has the following reserved keywords: Table 1. Reserved Keywords abstract assert break case catch class const continue def default do else enum extends final finally for goto if implements import instanceof interface native new null non-sealed package public protected private return static strictfp super switch synchronized this threadsafe throw throws transient try while Of these, const , goto , strictfp , and threadsafe are not currently in use. The reserved keywords can’t in general be used for variable, field and method names. A trick allows methods to be defined having the same name as a keyword by surrounding the name in quotes as shown in the following example: // reserved keywords can be used for method names if quoted def "abstract"() { true } // when calling such methods, the name must be qualified using "this." this.abstract() Using such names might be confusing and is often best to avoid. The trick is primarily intended to enable certain Java integration scenarios and certain DSL scenarios where having "verbs" and "nouns" with the same name as keywords may be desirable. In addition, Groovy has the following contextual keywords: Table 2. Contextual Keywords as in permits record sealed trait var yields These words are only keywords in certain contexts and can be more freely used in some places, in particular for variables, fields and method names. This extra lenience allows using method or variable names that were not keywords in earlier versions of Groovy or are not keywords in Java. Examples are shown here: // contextual keywords can be used for field and variable names def as = true assert as // contextual keywords can be used for method names def in() { true } // when calling such methods, the name only needs to be qualified using "this." in scenarios which would be ambiguous this.in() Groovy programmers familiar with these contextual keywords may still wish to avoid using those names unless there is a good reason to use such a name. The restrictions on reserved keywords also apply for the primitive types, the boolean literals and the null literal (all of which are discussed later): Table 3. Other reserved words null true false boolean char byte short int long float double While not recommended, the same trick as for reserved keywords can be used: def "null"() { true } // not recommended; potentially confusing assert this.null() // must be qualified Using such words as method names is potentially confusing and is often best to avoid, however, it might be useful for certain kinds of DSLs . 3. Identifiers 3.1. Normal identifiers Identifiers start with a letter, a dollar or an underscore. They cannot start with a number. A letter can be in the following ranges: 'a' to 'z' (lowercase ascii letter) 'A' to 'Z' (uppercase ascii letter) '\u00C0' to '\u00D6' '\u00D8' to '\u00F6' '\u00F8' to '\u00FF' '\u0100' to '\uFFFE' Then following characters can contain letters and numbers. Here are a few examples of valid identifiers (here, variable names): def name def item3 def with_underscore def $dollarStart But the following ones are invalid identifiers: def 3tier def a+b def a#b All keywords are also valid identifiers when following a dot: foo.as foo.assert foo.break foo.case foo.catch 3.2. Quoted identifiers Quoted identifiers appear after the dot of a dotted expression. For instance, the name part of the person.name expression can be quoted with person."name" or person.'name' . This is particularly interesting when certain identifiers contain illegal characters that are forbidden by the Java Language Specification, but which are allowed by Groovy when quoted. For example, characters like a dash, a space, an exclamation mark, etc. def map = [:] map."an identifier with a space and double quotes" = "ALLOWED" map.'with-dash-signs-and-single-quotes' = "ALLOWED" assert map."an identifier with a space and double quotes" == "ALLOWED" assert map.'with-dash-signs-and-single-quotes' == "ALLOWED" As we shall see in the following section on strings , Groovy provides different string literals. All kind of strings are actually allowed after the dot: map.'single quote' map."double quote" map.'''triple single quote''' map."""triple double quote""" map./slashy string/ map.$/dollar slashy string/$ There’s a difference between plain character strings and Groovy’s GStrings (interpolated strings), as in that the latter case, the interpolated values are inserted in the final string for evaluating the whole identifier: def firstname = "Homer" map."Simpson-${firstname}" = "Homer Simpson" assert map.'Simpson-Homer' == "Homer Simpson" 4. Strings Text literals are represented in the form of chain of characters called strings. Groovy lets you instantiate java.lang.String objects, as well as GStrings ( groovy.lang.GString ) which are also called interpolated strings in other programming languages. 4.1. Single-quoted string Single-quoted strings are a series of characters surrounded by single quotes: 'a single-quoted string' Single-quoted strings are plain java.lang.String and don’t support interpolation. 4.2. String concatenation All the Groovy strings can be concatenated with the + operator: assert 'ab' == 'a' + 'b' 4.3. Triple-single-quoted string Triple-single-quoted strings are a series of characters surrounded by triplets of single quotes: '''a triple-single-quoted string''' Triple-single-quoted strings are plain java.lang.String and don’t support interpolation. Triple-single-quoted strings may span multiple lines. The content of the string can cross line boundaries without the need to split the string in several pieces and without concatenation or newline escape characters: def aMultilineString = '''line one line two line three''' If your code is indented, for example in the body of the method of a class, your string will contain the whitespace of the indentation. The Groovy Development Kit contains methods for stripping out the indentation with the String#stripIndent() method, and with the String#stripMargin() method that takes a delimiter character to identify the text to remove from the beginning of a string. When creating a string as follows: def startingAndEndingWithANewline = ''' line one line two line three ''' You will notice that the resulting string contains a newline character as first character. It is possible to strip that character by escaping the newline with a backslash: def strippedFirstNewline = '''\ line one line two line three ''' assert !strippedFirstNewline.startsWith('\n') 4.3.1. Escaping special characters You can escape single quotes with the backslash character to avoid terminating the string literal: 'an escaped single quote: \' needs a backslash' And you can escape the escape character itself with a double backslash: 'an escaped escape character: \\ needs a double backslash' Some special characters also use the backslash as escape character: Escape sequence Character \b backspace \f formfeed \n newline \r carriage return \s single space \t tabulation \\ backslash \' single quote within a single-quoted string (and optional for triple-single-quoted and double-quoted strings) \" double quote within a double-quoted string (and optional for triple-double-quoted and single-quoted strings) We’ll see some more escaping details when it comes to other types of strings discussed later. 4.3.2. Unicode escape sequence For characters that are not present on your keyboard, you can use unicode escape sequences: a backslash, followed by 'u', then 4 hexadecimal digits. For example, the Euro currency symbol can be represented with: 'The Euro currency symbol: \u20AC' 4.4. Double-quoted string Double-quoted strings are a series of characters surrounded by double quotes: "a double-quoted string" Double-quoted strings are plain java.lang.String if there’s no interpolated expression, but are groovy.lang.GString instances if interpolation is present. To escape a double quote, you can use the backslash character: "A double quote: \"". 4.4.1. String interpolation Any Groovy expression can be interpolated in all string literals, apart from single and triple-single-quoted strings. Interpolation is the act of replacing a placeholder in the string with its value upon evaluation of the string. The placeholder expressions are surrounded by ${} . The curly braces may be omitted for unambiguous dotted expressions, i.e. we can use just a $ prefix in those cases. If the GString is ever passed to a method taking a String, the expression value inside the placeholder is evaluated to its string representation (by calling toString() on that expression) and the resulting String is passed to the method. Here, we have a string with a placeholder referencing a local variable: def name = 'Guillaume' // a plain string def greeting = "Hello ${name}" assert greeting.toString() == 'Hello Guillaume' Any Groovy expression is valid, as we can see in this example with an arithmetic expression: def sum = "The sum of 2 and 3 equals ${2 + 3}" assert sum.toString() == 'The sum of 2 and 3 equals 5' Not only are expressions allowed in between the ${} placeholder, but so are statements. However, a statement’s value is just null . So if several statements are inserted in that placeholder, the last one should somehow return a meaningful value to be inserted. For instance, "The sum of 1 and 2 is equal to ${def a = 1; def b = 2; a + b}" is supported and works as expected but a good practice is usually to stick to simple expressions inside GString placeholders. In addition to ${} placeholders, we can also use a lone $ sign prefixing a dotted expression: def person = [name: 'Guillaume', age: 36] assert "$person.name is $person.age years old" == 'Guillaume is 36 years old' But only dotted expressions of the form a.b , a.b.c , etc, are valid. Expressions containing parentheses like method calls, curly braces for closures, dots which aren’t part of a property expression or arithmetic operators would be invalid. Given the following variable definition of a number: def number = 3.14 The following statement will throw a groovy.lang.MissingPropertyException because Groovy believes you’re trying to access the toString property of that number, which doesn’t exist: shouldFail(MissingPropertyException) { println "$number.toString()" } You can think of "$number.toString()" as being interpreted by the parser as "${number.toString}()" . Similarly, if the expression is ambiguous, you need to keep the curly braces: String thing = 'treasure' assert 'The x-coordinate of the treasure is represented by treasure.x' == "The x-coordinate of the $thing is represented by $thing.x" // <= Not allowed: ambiguous!! assert 'The x-coordinate of the treasure is represented by treasure.x' == "The x-coordinate of the $thing is represented by ${thing}.x" // <= Curly braces required If you need to escape the $ or ${} placeholders in a GString so they appear as is without interpolation, you just need to use a \ backslash character to escape the dollar sign: assert '$5' == "\$5" assert '${name}' == "\${name}" 4.4.2. Special case of interpolating closure expressions So far, we’ve seen we could interpolate arbitrary expressions inside the ${} placeholder, but there is a special case and notation for closure expressions. When the placeholder contains an arrow, ${→} , the expression is actually a closure expression — you can think of it as a closure with a dollar prepended in front of it: def sParameterLessClosure = "1 + 2 == ${-> 3}" (1) assert sParameterLessClosure == '1 + 2 == 3' def sOneParamClosure = "1 + 2 == ${ w -> w << 3}" (2) assert sOneParamClosure == '1 + 2 == 3' 1 The closure is a parameterless closure which doesn’t take arguments. 2 Here, the closure takes a single java.io.StringWriter argument, to which you can append content with the << leftShift operator. In either case, both placeholders are embedded closures. In appearance, it looks like a more verbose way of defining expressions to be interpolated, but closures have an interesting advantage over mere expressions: lazy evaluation. Let’s consider the following sample: def number = 1 (1) def eagerGString = "value == ${number}" def lazyGString = "value == ${ -> number }" assert eagerGString == "value == 1" (2) assert lazyGString == "value == 1" (3) number = 2 (4) assert eagerGString == "value == 1" (5) assert lazyGString == "value == 2" (6) 1 We define a number variable containing 1 that we then interpolate within two GStrings, as an expression in eagerGString and as a closure in lazyGString . 2 We expect the resulting string to contain the same string value of 1 for eagerGString . 3 Similarly for lazyGString 4 Then we change the value of the variable to a new number 5 With a plain interpolated expression, the value was actually bound at the time of creation of the GString. 6 But with a closure expression, the closure is called upon each coercion of the GString into String, resulting in an updated string containing the new number value. An embedded closure expression taking more than one parameter will generate an exception at runtime. Only closures with zero or one parameter are allowed. 4.4.3. Interoperability with Java When a method (whether implemented in Java or Groovy) expects a java.lang.String , but we pass a groovy.lang.GString instance, the toString() method of the GString is automatically and transparently called. String takeString(String message) { (4) assert message instanceof String (5) return message } def message = "The message is ${'hello'}" (1) assert message instanceof GString (2) def result = takeString(message) (3) assert result instanceof String assert result == 'The message is hello' 1 We create a GString variable 2 We double-check it’s an instance of the GString 3 We then pass that GString to a method taking a String as parameter 4 The signature of the takeString() method explicitly says its sole parameter is a String 5 We also verify that the parameter is indeed a String and not a GString. 4.4.4. GString and String hashCodes Although interpolated strings can be used in lieu of plain Java strings, they differ with strings in a particular way: their hashCodes are different. Plain Java strings are immutable, whereas the resulting String representation of a GString can vary, depending on its interpolated values. Even for the same resulting string, GStrings and Strings don’t have the same hashCode. assert "one: ${1}".hashCode() != "one: 1".hashCode() GString and Strings having different hashCode values, using GString as Map keys should be avoided, especially if we try to retrieve an associated value with a String instead of a GString. def key = "a" def m = ["${key}": "letter ${key}"] (1) assert m["a"] == null (2) 1 The map is created with an initial pair whose key is a GString 2 When we try to fetch the value with a String key, we will not find it, as Strings and GString have different hashCode values 4.5. Triple-double-quoted string Triple-double-quoted strings behave like double-quoted strings, with the addition that they are multiline, like the triple-single-quoted strings. def name = 'Groovy' def template = """ Dear Mr ${name}, You're the winner of the lottery! Yours sincerly, Dave """ assert template.toString().contains('Groovy') Neither double quotes nor single quotes need be escaped in triple-double-quoted strings. 4.6. Slashy string Beyond the usual quoted strings, Groovy offers slashy strings, which use / as the opening and closing delimiter. Slashy strings are particularly useful for defining regular expressions and patterns, as there is no need to escape backslashes. Example of a slashy string: def fooPattern = /.*foo.*/ assert fooPattern == '.*foo.*' Only forward slashes need to be escaped with a backslash: def escapeSlash = /The character \/ is a forward slash/ assert escapeSlash == 'The character / is a forward slash' Slashy strings are multiline: def multilineSlashy = /one two three/ assert multilineSlashy.contains('\n') Slashy strings can be thought of as just another way to define a GString but with different escaping rules. They hence support interpolation: def color = 'blue' def interpolatedSlashy = /a ${color} car/ assert interpolatedSlashy == 'a blue car' 4.6.1. Special cases An empty slashy string cannot be represented with a double forward slash, as it’s understood by the Groovy parser as a line comment. That’s why the following assert would actually not compile as it would look like a non-terminated statement: assert '' == // As slashy strings were mostly designed to make regexp easier so a few things that are errors in GStrings like $() or $5 will work with slashy strings. Remember that escaping backslashes is not required. An alternative way of thinking of this is that in fact escaping is not supported. The slashy string /\t/ won’t contain a tab but instead a backslash followed by the character 't'. Escaping is only allowed for the slash character, i.e. /\/folder/ will be a slashy string containing '/folder' . A consequence of slash escaping is that a slashy string can’t end with a backslash. Otherwise that will escape the slashy string terminator. You can instead use a special trick, /ends with slash ${'\\'}/ . But best just avoid using a slashy string in such a case. 4.7. Dollar slashy string Dollar slashy strings are multiline GStrings delimited with an opening $/ and a closing /$ . The escaping character is the dollar sign, and it can escape another dollar, or a forward slash. Escaping for the dollar and forward slash characters is only needed where conflicts arise with the special use of those characters. The characters $foo would normally indicate a GString placeholder, so those four characters can be entered into a dollar slashy string by escaping the dollar, i.e. $$foo . Similarly, you will need to escape a dollar slashy closing delimiter if you want it to appear in your string. Here are a few examples: def name = "Guillaume" def date = "April, 1st" def dollarSlashy = $/ Hello $name, today we're ${date}. $ dollar sign $$ escaped dollar sign \ backslash / forward slash $/ escaped forward slash $$$/ escaped opening dollar slashy $/$$ escaped closing dollar slashy /$ assert [ 'Guillaume', 'April, 1st', '$ dollar sign', '$ escaped dollar sign', '\\ backslash', '/ forward slash', '/ escaped forward slash', '$/ escaped opening dollar slashy', '/$ escaped closing dollar slashy' ].every { dollarSlashy.contains(it) } It was created to overcome some of the limitations of the slashy string escaping rules. Use it when its escaping rules suit your string contents (typically if it has some slashes you don’t want to escape). 4.8. String summary table String name String syntax Interpolated Multiline Escape character Single-quoted '…​' \ Triple-single-quoted '''…​''' \ Double-quoted "…​" \ Triple-double-quoted """…​""" \ Slashy /…​/ \ Dollar slashy $/…​/$ $ 4.9. Characters Unlike Java, Groovy doesn’t have an explicit character literal. However, you can be explicit about making a Groovy string an actual character, by three different means: char c1 = 'A' (1) assert c1 instanceof Character def c2 = 'B' as char (2) assert c2 instanceof Character def c3 = (char)'C' (3) assert c3 instanceof Character 1 by being explicit when declaring a variable holding the character by specifying the char type 2 by using type coercion with the as operator 3 by using a cast to char operation The first option 1 is interesting when the character is held in a variable, while the other two ( 2 and 3 ) are more interesting when a char value must be passed as argument of a method call. 5. Numbers Groovy supports different kinds of integral literals and decimal literals, backed by the usual Number types of Java. 5.1. Integral literals The integral literal types are the same as in Java: byte char short int long java.math.BigInteger You can create integral numbers of those types with the following declarations: // primitive types byte b = 1 char c = 2 short s = 3 int i = 4 long l = 5 // infinite precision BigInteger bi = 6 If you use optional typing by using the def keyword, the type of the integral number will vary: it’ll adapt to the capacity of the type that can hold that number. For positive numbers: def a = 1 assert a instanceof Integer // Integer.MAX_VALUE def b = 2147483647 assert b instanceof Integer // Integer.MAX_VALUE + 1 def c = 2147483648 assert c instanceof Long // Long.MAX_VALUE def d = 9223372036854775807 assert d instanceof Long // Long.MAX_VALUE + 1 def e = 9223372036854775808 assert e instanceof BigInteger As well as for negative numbers: def na = -1 assert na instanceof Integer // Integer.MIN_VALUE def nb = -2147483648 assert nb instanceof Integer // Integer.MIN_VALUE - 1 def nc = -2147483649 assert nc instanceof Long // Long.MIN_VALUE def nd = -9223372036854775808 assert nd instanceof Long // Long.MIN_VALUE - 1 def ne = -9223372036854775809 assert ne instanceof BigInteger 5.1.1. Alternative non-base 10 representations Numbers can also be represented in binary, octal, hexadecimal and decimal bases. Binary literal Binary numbers start with a 0b prefix: int xInt = 0b10101111 assert xInt == 175 short xShort = 0b11001001 assert xShort == 201 as short byte xByte = 0b11 assert xByte == 3 as byte long xLong = 0b101101101101 assert xLong == 2925l BigInteger xBigInteger = 0b111100100001 assert xBigInteger == 3873g int xNegativeInt = -0b10101111 assert xNegativeInt == -175 Octal literal Octal numbers are specified in the typical format of 0 followed by octal digits. int xInt = 077 assert xInt == 63 short xShort = 011 assert xShort == 9 as short byte xByte = 032 assert xByte == 26 as byte long xLong = 0246 assert xLong == 166l BigInteger xBigInteger = 01111 assert xBigInteger == 585g int xNegativeInt = -077 assert xNegativeInt == -63 Hexadecimal literal Hexadecimal numbers are specified in the typical format of 0x followed by hex digits. int xInt = 0x77 assert xInt == 119 short xShort = 0xaa assert xShort == 170 as short byte xByte = 0x3a assert xByte == 58 as byte long xLong = 0xffff assert xLong == 65535l BigInteger xBigInteger = 0xaaaa assert xBigInteger == 43690g Double xDouble = new Double('0x1.0p0') assert xDouble == 1.0d int xNegativeInt = -0x77 assert xNegativeInt == -119 5.2. Decimal literals The decimal literal types are the same as in Java: float double java.math.BigDecimal You can create decimal numbers of those types with the following declarations: // primitive types float f = 1.234 double d = 2.345 // infinite precision BigDecimal bd = 3.456 Decimals can use exponents, with the e or E exponent letter, followed by an optional sign, and an integral number representing the exponent: assert 1e3 == 1_000.0 assert 2E4 == 20_000.0 assert 3e+1 == 30.0 assert 4E-2 == 0.04 assert 5e-1 == 0.5 Conveniently for exact decimal number calculations, Groovy chooses java.math.BigDecimal as its decimal number type. In addition, both float and double are supported, but require an explicit type declaration, type coercion or suffix. Even if BigDecimal is the default for decimal numbers, such literals are accepted in methods or closures taking float or double as parameter types. Decimal numbers can’t be represented using a binary, octal or hexadecimal representation. 5.3. Underscore in literals When writing long literal numbers, it’s harder on the eye to figure out how some numbers are grouped together, for example with groups of thousands, of words, etc. By allowing you to place underscore in number literals, it’s easier to spot those groups: long creditCardNumber = 1234_5678_9012_3456L long socialSecurityNumbers = 999_99_9999L double monetaryAmount = 12_345_132.12 long hexBytes = 0xFF_EC_DE_5E long hexWords = 0xFFEC_DE5E long maxLong = 0x7fff_ffff_ffff_ffffL long alsoMaxLong = 9_223_372_036_854_775_807L long bytes = 0b11010010_01101001_10010100_10010010 5.4. Number type suffixes We can force a number (including binary, octals and hexadecimals) to have a specific type by giving a suffix (see table below), either uppercase or lowercase. Type Suffix BigInteger G or g Long L or l Integer I or i BigDecimal G or g Double D or d Float F or f Examples: assert 42I == Integer.valueOf('42') assert 42i == Integer.valueOf('42') // lowercase i more readable assert 123L == Long.valueOf("123") // uppercase L more readable assert 2147483648 == Long.valueOf('2147483648') // Long type used, value too large for an Integer assert 456G == new BigInteger('456') assert 456g == new BigInteger('456') assert 123.45 == new BigDecimal('123.45') // default BigDecimal type used assert .321 == new BigDecimal('.321') assert 1.200065D == Double.valueOf('1.200065') assert 1.234F == Float.valueOf('1.234') assert 1.23E23D == Double.valueOf('1.23E23') assert 0b1111L.class == Long // binary assert 0xFFi.class == Integer // hexadecimal assert 034G.class == BigInteger // octal 5.5. Math operations Although operators are covered in more detail elsewhere, it’s important to discuss the behavior of math operations and what their resulting types are. Division and power binary operations aside (covered below), binary operations between byte , char , short and int result in int binary operations involving long with byte , char , short and int result in long binary operations involving BigInteger and any other integral type result in BigInteger binary operations involving BigDecimal with byte , char , short , int and BigInteger result in BigDecimal binary operations between float , double and BigDecimal result in double binary operations between two BigDecimal result in BigDecimal The following table summarizes those rules: byte char short int long BigInteger float double BigDecimal byte int int int int long BigInteger double double BigDecimal char int int int long BigInteger double double BigDecimal short int int long BigInteger double double BigDecimal int int long BigInteger double double BigDecimal long long BigInteger double double BigDecimal BigInteger BigInteger double double BigDecimal float double double double double double double BigDecimal BigDecimal Thanks to Groovy’s operator overloading, the usual arithmetic operators work as well with BigInteger and BigDecimal , unlike in Java where you have to use explicit methods for operating on those numbers. 5.5.1. The case of the division operator The division operators / (and /= for division and assignment) produce a double result if either operand is a float or double , and a BigDecimal result otherwise (when both operands are any combination of an integral type short , char , byte , int , long , BigInteger or BigDecimal ). BigDecimal division is performed with the divide() method if the division is exact (i.e. yielding a result that can be represented within the bounds of the same precision and scale), or using a MathContext with a precision of the maximum of the two operands' precision plus an extra precision of 10, and a scale of the maximum of 10 and the maximum of the operands' scale. For integer division like in Java, you should use the intdiv() method, as Groovy doesn’t provide a dedicated integer division operator symbol. 5.5.2. The case of the power operator The power operation is represented by the ** operator, with two parameters: the base and the exponent. The result of the power operation depends on its operands, and the result of the operation (in particular if the result can be represented as an integral value). The following rules are used by Groovy’s power operation to determine the resulting type: If the exponent is a decimal value if the result can be represented as an Integer , then return an Integer else if the result can be represented as a Long , then return a Long otherwise return a Double If the exponent is an integral value if the exponent is strictly negative, then return an Integer , Long or Double if the result value fits in that type if the exponent is positive or zero if the base is a BigDecimal , then return a BigDecimal result value if the base is a BigInteger , then return a BigInteger result value if the base is an Integer , then return an Integer if the result value fits in it, otherwise a BigInteger if the base is a Long , then return a Long if the result value fits in it, otherwise a BigInteger We can illustrate those rules with a few examples: // base and exponent are ints and the result can be represented by an Integer assert 2 ** 3 instanceof Integer // 8 assert 10 ** 9 instanceof Integer // 1_000_000_000 // the base is a long, so fit the result in a Long // (although it could have fit in an Integer) assert 5L ** 2 instanceof Long // 25 // the result can't be represented as an Integer or Long, so return a BigInteger assert 100 ** 10 instanceof BigInteger // 10e20 assert 1234 ** 123 instanceof BigInteger // 170515806212727042875... // the base is a BigDecimal and the exponent a negative int // but the result can be represented as an Integer assert 0.5 ** -2 instanceof Integer // 4 // the base is an int, and the exponent a negative float // but again, the result can be represented as an Integer assert 1 ** -0.3f instanceof Integer // 1 // the base is an int, and the exponent a negative int // but the result will be calculated as a Double // (both base and exponent are actually converted to doubles) assert 10 ** -1 instanceof Double // 0.1 // the base is a BigDecimal, and the exponent is an int, so return a BigDecimal assert 1.2 ** 10 instanceof BigDecimal // 6.1917364224 // the base is a float or double, and the exponent is an int // but the result can only be represented as a Double value assert 3.4f ** 5 instanceof Double // 454.35430372146965 assert 5.6d ** 2 instanceof Double // 31.359999999999996 // the exponent is a decimal value // and the result can only be represented as a Double value assert 7.8 ** 1.9 instanceof Double // 49.542708423868476 assert 2 ** 0.1f instanceof Double // 1.0717734636432956 6. Booleans Boolean is a special data type that is used to represent truth values: true and false . Use this data type for simple flags that track true/false conditions . Boolean values can be stored in variables, assigned into fields, just like any other data type: def myBooleanVariable = true boolean untypedBooleanVar = false booleanField = true true and false are the only two primitive boolean values. But more complex boolean expressions can be represented using logical operators . In addition, Groovy has special rules (often referred to as Groovy Truth ) for coercing non-boolean objects to a boolean value. 7. Lists Groovy uses a comma-separated list of values, surrounded by square brackets, to denote lists. Groovy lists are plain JDK java.util.List , as Groovy doesn’t define its own collection classes. The concrete list implementation used when defining list literals are java.util.ArrayList by default, unless you decide to specify otherwise, as we shall see later on. def numbers = [1, 2, 3] (1) assert numbers instanceof List (2) assert numbers.size() == 3 (3) 1 We define a list numbers delimited by commas and surrounded by square brackets, and we assign that list into a variable 2 The list is an instance of Java’s java.util.List interface 3 The size of the list can be queried with the size() method, and shows our list contains 3 elements In the above example, we used a homogeneous list, but you can also create lists containing values of heterogeneous types: def heterogeneous = [1, "a", true] (1) 1 Our list here contains a number, a string and a boolean value We mentioned that by default, list literals are actually instances of java.util.ArrayList , but it is possible to use a different backing type for our lists, thanks to using type coercion with the as operator, or with explicit type declaration for your variables: def arrayList = [1, 2, 3] assert arrayList instanceof java.util.ArrayList def linkedList = [2, 3, 4] as LinkedList (1) assert linkedList instanceof java.util.LinkedList LinkedList otherLinked = [3, 4, 5] (2) assert otherLinked instanceof java.util.LinkedList 1 We use coercion with the as operator to explicitly request a java.util.LinkedList implementation 2 We can say that the variable holding the list literal is of type java.util.LinkedList You can access elements of the list with the [] subscript operator (both for reading and setting values) with positive indices or negative indices to access elements from the end of the list, as well as with ranges, and use the << leftShift operator to append elements to a list: def letters = ['a', 'b', 'c', 'd'] assert letters[0] == 'a' (1) assert letters[1] == 'b' assert letters[-1] == 'd' (2) assert letters[-2] == 'c' letters[2] = 'C' (3) assert letters[2] == 'C' letters << 'e' (4) assert letters[ 4] == 'e' assert letters[-1] == 'e' assert letters[1, 3] == ['b', 'd'] (5) assert letters[2..4] == ['C', 'd', 'e'] (6) 1 Access the first element of the list (zero-based counting) 2 Access the last element of the list with a negative index: -1 is the first element from the end of the list 3 Use an assignment to set a new value for the third element of the list 4 Use the << leftShift operator to append an element at the end of the list 5 Access two elements at once, returning a new list containing those two elements 6 Use a range to access a range of values from the list, from a start to an end element position As lists can be heterogeneous in nature, lists can also contain other lists to create multidimensional lists: def multi = [[0, 1], [2, 3]] (1) assert multi[1][0] == 2 (2) 1 Define a list of numbers 2 Access the second element of the top-most list, and the first element of the inner list 8. Arrays Groovy reuses the list notation for arrays, but to make such literals arrays, you need to explicitly define the type of the array through coercion or type declaration. String[] arrStr = ['Ananas', 'Banana', 'Kiwi'] (1) assert arrStr instanceof String[] (2) assert !(arrStr instanceof List) def numArr = [1, 2, 3] as int[] (3) assert numArr instanceof int[] (4) assert numArr.size() == 3 1 Define an array of strings using explicit variable type declaration 2 Assert that we created an array of strings 3 Create an array of ints with the as operator 4 Assert that we created an array of primitive ints You can also create multi-dimensional arrays: def matrix3 = new Integer[3][3] (1) assert matrix3.size() == 3 Integer[][] matrix2 (2) matrix2 = [[1, 2], [3, 4]] assert matrix2 instanceof Integer[][] 1 You can define the bounds of a new array 2 Or declare an array without specifying its bounds Access to elements of an array follows the same notation as for lists: String[] names = ['Cédric', 'Guillaume', 'Jochen', 'Paul'] assert names[0] == 'Cédric' (1) names[2] = 'Blackdrag' (2) assert names[2] == 'Blackdrag' 1 Retrieve the first element of the array 2 Set the value of the third element of the array to a new value 8.1. Java-style array initialization Groovy has always supported literal list/array definitions using square brackets and has avoided Java-style curly braces so as not to conflict with closure definitions. In the case where the curly braces come immediately after an array type declaration however, there is no ambiguity with closure definitions, so Groovy 3 and above support that variant of the Java array initialization expression. Examples: def primes = new int[] {2, 3, 5, 7, 11} assert primes.size() == 5 && primes.sum() == 28 assert primes.class.name == '[I' def pets = new String[] {'cat', 'dog'} assert pets.size() == 2 && pets.sum() == 'catdog' assert pets.class.name == '[Ljava.lang.String;' // traditional Groovy alternative still supported String[] groovyBooks = [ 'Groovy in Action', 'Making Java Groovy' ] assert groovyBooks.every{ it.contains('Groovy') } 9. Maps Sometimes called dictionaries or associative arrays in other languages, Groovy features maps. Maps associate keys to values, separating keys and values with colons, and each key/value pairs with commas, and the whole keys and values surrounded by square brackets. def colors = [red: '#FF0000', green: '#00FF00', blue: '#0000FF'] (1) assert colors['red'] == '#FF0000' (2) assert colors.green == '#00FF00' (3) colors['pink'] = '#FF00FF' (4) colors.yellow = '#FFFF00' (5) assert colors.pink == '#FF00FF' assert colors['yellow'] == '#FFFF00' assert colors instanceof java.util.LinkedHashMap 1 We define a map of string color names, associated with their hexadecimal-coded html colors 2 We use the subscript notation to check the content associated with the red key 3 We can also use the property notation to assert the color green’s hexadecimal representation 4 Similarly, we can use the subscript notation to add a new key/value pair 5 Or the property notation, to add the yellow color When using names for the keys, we actually define string keys in the map. Groovy creates maps that are actually instances of java.util.LinkedHashMap . If you try to access a key which is not present in the map: assert colors.unknown == null def emptyMap = [:] assert emptyMap.anyKey == null You will retrieve a null result. In the examples above, we used string keys, but you can also use values of other types as keys: def numbers = [1: 'one', 2: 'two'] assert numbers[1] == 'one' Here, we used numbers as keys, as numbers can unambiguously be recognized as numbers, so Groovy will not create a string key like in our previous examples. But consider the case you want to pass a variable in lieu of the key, to have the value of that variable become the key: def key = 'name' def person = [key: 'Guillaume'] (1) assert !person.containsKey('name') (2) assert person.containsKey('key') (3) 1 The key associated with the 'Guillaume' name will actually be the "key" string, not the value associated with the key variable 2 The map doesn’t contain the 'name' key 3 Instead, the map contains a 'key' key You can also pass quoted strings as well as keys: ["name": "Guillaume"]. This is mandatory if your key string isn’t a valid identifier, for example if you wanted to create a string key containing a dash like in: ["street-name": "Main street"]. When you need to pass variable values as keys in your map definitions, you must surround the variable or expression with parentheses: person = [(key): 'Guillaume'] (1) assert person.containsKey('name') (2) assert !person.containsKey('key') (3) 1 This time, we surround the key variable with parentheses, to instruct the parser we are passing a variable rather than defining a string key 2 The map does contain the name key 3 But the map doesn’t contain the key key as before Groovy Learn Documentation Download Support Contribute Ecosystem Blog posts About Source code Security Books Thanks Sponsorship FAQ Search Socialize Discuss on the mailing-list Groovy on X Groovy on Bluesky Groovy on Mastodon Groovy on LinkedIn Events and conferences Source code on GitHub Report issues in Jira Stack Overflow questions Slack Community The Groovy programming language is supported by the Apache Software Foundation and the Groovy community. Apache, Apache Groovy, Groovy, and the ASF logo are either registered trademarks or trademarks of The Apache Software Foundation. © 2003-2025 the Apache Groovy project — Groovy is Open Source: license , privacy policy . | 2026-01-13T09:29:32 |
http://groovy-lang.org/syntax.html#_single_quoted_string | The Apache Groovy programming language - Syntax Socialize Discuss on the mailing-list Groovy on X Groovy on Bluesky Groovy on Mastodon Groovy on LinkedIn Events and conferences Source code on GitHub Report issues in Jira Stack Overflow questions Slack Community You are using an outdated browser. Please upgrade your browser to improve your experience. Apache Groovy™ Learn Documentation Download Support Contribute Ecosystem Blog posts Socialize Table of contents 1. Comments 1.1. Single-line comment 1.2. Multiline comment 1.3. Groovydoc comment 1.4. Shebang line 2. Keywords 3. Identifiers 3.1. Normal identifiers 3.2. Quoted identifiers 4. Strings 4.1. Single-quoted string 4.2. String concatenation 4.3. Triple-single-quoted string 4.3.1. Escaping special characters 4.3.2. Unicode escape sequence 4.4. Double-quoted string 4.4.1. String interpolation 4.4.2. Special case of interpolating closure expressions 4.4.3. Interoperability with Java 4.4.4. GString and String hashCodes 4.5. Triple-double-quoted string 4.6. Slashy string 4.6.1. Special cases 4.7. Dollar slashy string 4.8. String summary table 4.9. Characters 5. Numbers 5.1. Integral literals 5.1.1. Alternative non-base 10 representations Binary literal Octal literal Hexadecimal literal 5.2. Decimal literals 5.3. Underscore in literals 5.4. Number type suffixes 5.5. Math operations 5.5.1. The case of the division operator 5.5.2. The case of the power operator 6. Booleans 7. Lists 8. Arrays 8.1. Java-style array initialization 9. Maps Syntax This chapter covers the syntax of the Groovy programming language. The grammar of the language derives from the Java grammar, but enhances it with specific constructs for Groovy, and allows certain simplifications. 1. Comments 1.1. Single-line comment Single-line comments start with // and can be found at any position in the line. The characters following // , until the end of the line, are considered part of the comment. // a standalone single line comment println "hello" // a comment till the end of the line 1.2. Multiline comment A multiline comment starts with /* and can be found at any position in the line. The characters following /* will be considered part of the comment, including new line characters, up to the first */ closing the comment. Multiline comments can thus be put at the end of a statement, or even inside a statement. /* a standalone multiline comment spanning two lines */ println "hello" /* a multiline comment starting at the end of a statement */ println 1 /* one */ + 2 /* two */ 1.3. Groovydoc comment Similarly to multiline comments, Groovydoc comments are multiline, but start with /** and end with */ . Lines following the first Groovydoc comment line can optionally start with a star * . Those comments are associated with: type definitions (classes, interfaces, enums, annotations), fields and properties definitions methods definitions Although the compiler will not complain about Groovydoc comments not being associated with the above language elements, you should prepend those constructs with the comment right before it. /** * A Class description */ class Person { /** the name of the person */ String name /** * Creates a greeting method for a certain person. * * @param otherPerson the person to greet * @return a greeting message */ String greet(String otherPerson) { "Hello ${otherPerson}" } } Groovydoc follows the same conventions as Java’s own Javadoc. So you’ll be able to use the same tags as with Javadoc. In addition, Groovy supports Runtime Groovydoc since 3.0.0, i.e. Groovydoc can be retained at runtime. Runtime Groovydoc is disabled by default. It can be enabled by adding JVM option -Dgroovy.attach.runtime.groovydoc=true The Runtime Groovydoc starts with /**@ and ends with */ , for example: /**@ * Some class groovydoc for Foo */ class Foo { /**@ * Some method groovydoc for bar */ void bar() { } } assert Foo.class.groovydoc.content.contains('Some class groovydoc for Foo') (1) assert Foo.class.getMethod('bar', new Class[0]).groovydoc.content.contains('Some method groovydoc for bar') (2) 1 Get the runtime groovydoc for class Foo 2 Get the runtime groovydoc for method bar 1.4. Shebang line Beside the single-line comment, there is a special line comment, often called the shebang line understood by UNIX systems which allows scripts to be run directly from the command-line, provided you have installed the Groovy distribution and the groovy command is available on the PATH . #!/usr/bin/env groovy println "Hello from the shebang line" The # character must be the first character of the file. Any indentation would yield a compilation error. 2. Keywords Groovy has the following reserved keywords: Table 1. Reserved Keywords abstract assert break case catch class const continue def default do else enum extends final finally for goto if implements import instanceof interface native new null non-sealed package public protected private return static strictfp super switch synchronized this threadsafe throw throws transient try while Of these, const , goto , strictfp , and threadsafe are not currently in use. The reserved keywords can’t in general be used for variable, field and method names. A trick allows methods to be defined having the same name as a keyword by surrounding the name in quotes as shown in the following example: // reserved keywords can be used for method names if quoted def "abstract"() { true } // when calling such methods, the name must be qualified using "this." this.abstract() Using such names might be confusing and is often best to avoid. The trick is primarily intended to enable certain Java integration scenarios and certain DSL scenarios where having "verbs" and "nouns" with the same name as keywords may be desirable. In addition, Groovy has the following contextual keywords: Table 2. Contextual Keywords as in permits record sealed trait var yields These words are only keywords in certain contexts and can be more freely used in some places, in particular for variables, fields and method names. This extra lenience allows using method or variable names that were not keywords in earlier versions of Groovy or are not keywords in Java. Examples are shown here: // contextual keywords can be used for field and variable names def as = true assert as // contextual keywords can be used for method names def in() { true } // when calling such methods, the name only needs to be qualified using "this." in scenarios which would be ambiguous this.in() Groovy programmers familiar with these contextual keywords may still wish to avoid using those names unless there is a good reason to use such a name. The restrictions on reserved keywords also apply for the primitive types, the boolean literals and the null literal (all of which are discussed later): Table 3. Other reserved words null true false boolean char byte short int long float double While not recommended, the same trick as for reserved keywords can be used: def "null"() { true } // not recommended; potentially confusing assert this.null() // must be qualified Using such words as method names is potentially confusing and is often best to avoid, however, it might be useful for certain kinds of DSLs . 3. Identifiers 3.1. Normal identifiers Identifiers start with a letter, a dollar or an underscore. They cannot start with a number. A letter can be in the following ranges: 'a' to 'z' (lowercase ascii letter) 'A' to 'Z' (uppercase ascii letter) '\u00C0' to '\u00D6' '\u00D8' to '\u00F6' '\u00F8' to '\u00FF' '\u0100' to '\uFFFE' Then following characters can contain letters and numbers. Here are a few examples of valid identifiers (here, variable names): def name def item3 def with_underscore def $dollarStart But the following ones are invalid identifiers: def 3tier def a+b def a#b All keywords are also valid identifiers when following a dot: foo.as foo.assert foo.break foo.case foo.catch 3.2. Quoted identifiers Quoted identifiers appear after the dot of a dotted expression. For instance, the name part of the person.name expression can be quoted with person."name" or person.'name' . This is particularly interesting when certain identifiers contain illegal characters that are forbidden by the Java Language Specification, but which are allowed by Groovy when quoted. For example, characters like a dash, a space, an exclamation mark, etc. def map = [:] map."an identifier with a space and double quotes" = "ALLOWED" map.'with-dash-signs-and-single-quotes' = "ALLOWED" assert map."an identifier with a space and double quotes" == "ALLOWED" assert map.'with-dash-signs-and-single-quotes' == "ALLOWED" As we shall see in the following section on strings , Groovy provides different string literals. All kind of strings are actually allowed after the dot: map.'single quote' map."double quote" map.'''triple single quote''' map."""triple double quote""" map./slashy string/ map.$/dollar slashy string/$ There’s a difference between plain character strings and Groovy’s GStrings (interpolated strings), as in that the latter case, the interpolated values are inserted in the final string for evaluating the whole identifier: def firstname = "Homer" map."Simpson-${firstname}" = "Homer Simpson" assert map.'Simpson-Homer' == "Homer Simpson" 4. Strings Text literals are represented in the form of chain of characters called strings. Groovy lets you instantiate java.lang.String objects, as well as GStrings ( groovy.lang.GString ) which are also called interpolated strings in other programming languages. 4.1. Single-quoted string Single-quoted strings are a series of characters surrounded by single quotes: 'a single-quoted string' Single-quoted strings are plain java.lang.String and don’t support interpolation. 4.2. String concatenation All the Groovy strings can be concatenated with the + operator: assert 'ab' == 'a' + 'b' 4.3. Triple-single-quoted string Triple-single-quoted strings are a series of characters surrounded by triplets of single quotes: '''a triple-single-quoted string''' Triple-single-quoted strings are plain java.lang.String and don’t support interpolation. Triple-single-quoted strings may span multiple lines. The content of the string can cross line boundaries without the need to split the string in several pieces and without concatenation or newline escape characters: def aMultilineString = '''line one line two line three''' If your code is indented, for example in the body of the method of a class, your string will contain the whitespace of the indentation. The Groovy Development Kit contains methods for stripping out the indentation with the String#stripIndent() method, and with the String#stripMargin() method that takes a delimiter character to identify the text to remove from the beginning of a string. When creating a string as follows: def startingAndEndingWithANewline = ''' line one line two line three ''' You will notice that the resulting string contains a newline character as first character. It is possible to strip that character by escaping the newline with a backslash: def strippedFirstNewline = '''\ line one line two line three ''' assert !strippedFirstNewline.startsWith('\n') 4.3.1. Escaping special characters You can escape single quotes with the backslash character to avoid terminating the string literal: 'an escaped single quote: \' needs a backslash' And you can escape the escape character itself with a double backslash: 'an escaped escape character: \\ needs a double backslash' Some special characters also use the backslash as escape character: Escape sequence Character \b backspace \f formfeed \n newline \r carriage return \s single space \t tabulation \\ backslash \' single quote within a single-quoted string (and optional for triple-single-quoted and double-quoted strings) \" double quote within a double-quoted string (and optional for triple-double-quoted and single-quoted strings) We’ll see some more escaping details when it comes to other types of strings discussed later. 4.3.2. Unicode escape sequence For characters that are not present on your keyboard, you can use unicode escape sequences: a backslash, followed by 'u', then 4 hexadecimal digits. For example, the Euro currency symbol can be represented with: 'The Euro currency symbol: \u20AC' 4.4. Double-quoted string Double-quoted strings are a series of characters surrounded by double quotes: "a double-quoted string" Double-quoted strings are plain java.lang.String if there’s no interpolated expression, but are groovy.lang.GString instances if interpolation is present. To escape a double quote, you can use the backslash character: "A double quote: \"". 4.4.1. String interpolation Any Groovy expression can be interpolated in all string literals, apart from single and triple-single-quoted strings. Interpolation is the act of replacing a placeholder in the string with its value upon evaluation of the string. The placeholder expressions are surrounded by ${} . The curly braces may be omitted for unambiguous dotted expressions, i.e. we can use just a $ prefix in those cases. If the GString is ever passed to a method taking a String, the expression value inside the placeholder is evaluated to its string representation (by calling toString() on that expression) and the resulting String is passed to the method. Here, we have a string with a placeholder referencing a local variable: def name = 'Guillaume' // a plain string def greeting = "Hello ${name}" assert greeting.toString() == 'Hello Guillaume' Any Groovy expression is valid, as we can see in this example with an arithmetic expression: def sum = "The sum of 2 and 3 equals ${2 + 3}" assert sum.toString() == 'The sum of 2 and 3 equals 5' Not only are expressions allowed in between the ${} placeholder, but so are statements. However, a statement’s value is just null . So if several statements are inserted in that placeholder, the last one should somehow return a meaningful value to be inserted. For instance, "The sum of 1 and 2 is equal to ${def a = 1; def b = 2; a + b}" is supported and works as expected but a good practice is usually to stick to simple expressions inside GString placeholders. In addition to ${} placeholders, we can also use a lone $ sign prefixing a dotted expression: def person = [name: 'Guillaume', age: 36] assert "$person.name is $person.age years old" == 'Guillaume is 36 years old' But only dotted expressions of the form a.b , a.b.c , etc, are valid. Expressions containing parentheses like method calls, curly braces for closures, dots which aren’t part of a property expression or arithmetic operators would be invalid. Given the following variable definition of a number: def number = 3.14 The following statement will throw a groovy.lang.MissingPropertyException because Groovy believes you’re trying to access the toString property of that number, which doesn’t exist: shouldFail(MissingPropertyException) { println "$number.toString()" } You can think of "$number.toString()" as being interpreted by the parser as "${number.toString}()" . Similarly, if the expression is ambiguous, you need to keep the curly braces: String thing = 'treasure' assert 'The x-coordinate of the treasure is represented by treasure.x' == "The x-coordinate of the $thing is represented by $thing.x" // <= Not allowed: ambiguous!! assert 'The x-coordinate of the treasure is represented by treasure.x' == "The x-coordinate of the $thing is represented by ${thing}.x" // <= Curly braces required If you need to escape the $ or ${} placeholders in a GString so they appear as is without interpolation, you just need to use a \ backslash character to escape the dollar sign: assert '$5' == "\$5" assert '${name}' == "\${name}" 4.4.2. Special case of interpolating closure expressions So far, we’ve seen we could interpolate arbitrary expressions inside the ${} placeholder, but there is a special case and notation for closure expressions. When the placeholder contains an arrow, ${→} , the expression is actually a closure expression — you can think of it as a closure with a dollar prepended in front of it: def sParameterLessClosure = "1 + 2 == ${-> 3}" (1) assert sParameterLessClosure == '1 + 2 == 3' def sOneParamClosure = "1 + 2 == ${ w -> w << 3}" (2) assert sOneParamClosure == '1 + 2 == 3' 1 The closure is a parameterless closure which doesn’t take arguments. 2 Here, the closure takes a single java.io.StringWriter argument, to which you can append content with the << leftShift operator. In either case, both placeholders are embedded closures. In appearance, it looks like a more verbose way of defining expressions to be interpolated, but closures have an interesting advantage over mere expressions: lazy evaluation. Let’s consider the following sample: def number = 1 (1) def eagerGString = "value == ${number}" def lazyGString = "value == ${ -> number }" assert eagerGString == "value == 1" (2) assert lazyGString == "value == 1" (3) number = 2 (4) assert eagerGString == "value == 1" (5) assert lazyGString == "value == 2" (6) 1 We define a number variable containing 1 that we then interpolate within two GStrings, as an expression in eagerGString and as a closure in lazyGString . 2 We expect the resulting string to contain the same string value of 1 for eagerGString . 3 Similarly for lazyGString 4 Then we change the value of the variable to a new number 5 With a plain interpolated expression, the value was actually bound at the time of creation of the GString. 6 But with a closure expression, the closure is called upon each coercion of the GString into String, resulting in an updated string containing the new number value. An embedded closure expression taking more than one parameter will generate an exception at runtime. Only closures with zero or one parameter are allowed. 4.4.3. Interoperability with Java When a method (whether implemented in Java or Groovy) expects a java.lang.String , but we pass a groovy.lang.GString instance, the toString() method of the GString is automatically and transparently called. String takeString(String message) { (4) assert message instanceof String (5) return message } def message = "The message is ${'hello'}" (1) assert message instanceof GString (2) def result = takeString(message) (3) assert result instanceof String assert result == 'The message is hello' 1 We create a GString variable 2 We double-check it’s an instance of the GString 3 We then pass that GString to a method taking a String as parameter 4 The signature of the takeString() method explicitly says its sole parameter is a String 5 We also verify that the parameter is indeed a String and not a GString. 4.4.4. GString and String hashCodes Although interpolated strings can be used in lieu of plain Java strings, they differ with strings in a particular way: their hashCodes are different. Plain Java strings are immutable, whereas the resulting String representation of a GString can vary, depending on its interpolated values. Even for the same resulting string, GStrings and Strings don’t have the same hashCode. assert "one: ${1}".hashCode() != "one: 1".hashCode() GString and Strings having different hashCode values, using GString as Map keys should be avoided, especially if we try to retrieve an associated value with a String instead of a GString. def key = "a" def m = ["${key}": "letter ${key}"] (1) assert m["a"] == null (2) 1 The map is created with an initial pair whose key is a GString 2 When we try to fetch the value with a String key, we will not find it, as Strings and GString have different hashCode values 4.5. Triple-double-quoted string Triple-double-quoted strings behave like double-quoted strings, with the addition that they are multiline, like the triple-single-quoted strings. def name = 'Groovy' def template = """ Dear Mr ${name}, You're the winner of the lottery! Yours sincerly, Dave """ assert template.toString().contains('Groovy') Neither double quotes nor single quotes need be escaped in triple-double-quoted strings. 4.6. Slashy string Beyond the usual quoted strings, Groovy offers slashy strings, which use / as the opening and closing delimiter. Slashy strings are particularly useful for defining regular expressions and patterns, as there is no need to escape backslashes. Example of a slashy string: def fooPattern = /.*foo.*/ assert fooPattern == '.*foo.*' Only forward slashes need to be escaped with a backslash: def escapeSlash = /The character \/ is a forward slash/ assert escapeSlash == 'The character / is a forward slash' Slashy strings are multiline: def multilineSlashy = /one two three/ assert multilineSlashy.contains('\n') Slashy strings can be thought of as just another way to define a GString but with different escaping rules. They hence support interpolation: def color = 'blue' def interpolatedSlashy = /a ${color} car/ assert interpolatedSlashy == 'a blue car' 4.6.1. Special cases An empty slashy string cannot be represented with a double forward slash, as it’s understood by the Groovy parser as a line comment. That’s why the following assert would actually not compile as it would look like a non-terminated statement: assert '' == // As slashy strings were mostly designed to make regexp easier so a few things that are errors in GStrings like $() or $5 will work with slashy strings. Remember that escaping backslashes is not required. An alternative way of thinking of this is that in fact escaping is not supported. The slashy string /\t/ won’t contain a tab but instead a backslash followed by the character 't'. Escaping is only allowed for the slash character, i.e. /\/folder/ will be a slashy string containing '/folder' . A consequence of slash escaping is that a slashy string can’t end with a backslash. Otherwise that will escape the slashy string terminator. You can instead use a special trick, /ends with slash ${'\\'}/ . But best just avoid using a slashy string in such a case. 4.7. Dollar slashy string Dollar slashy strings are multiline GStrings delimited with an opening $/ and a closing /$ . The escaping character is the dollar sign, and it can escape another dollar, or a forward slash. Escaping for the dollar and forward slash characters is only needed where conflicts arise with the special use of those characters. The characters $foo would normally indicate a GString placeholder, so those four characters can be entered into a dollar slashy string by escaping the dollar, i.e. $$foo . Similarly, you will need to escape a dollar slashy closing delimiter if you want it to appear in your string. Here are a few examples: def name = "Guillaume" def date = "April, 1st" def dollarSlashy = $/ Hello $name, today we're ${date}. $ dollar sign $$ escaped dollar sign \ backslash / forward slash $/ escaped forward slash $$$/ escaped opening dollar slashy $/$$ escaped closing dollar slashy /$ assert [ 'Guillaume', 'April, 1st', '$ dollar sign', '$ escaped dollar sign', '\\ backslash', '/ forward slash', '/ escaped forward slash', '$/ escaped opening dollar slashy', '/$ escaped closing dollar slashy' ].every { dollarSlashy.contains(it) } It was created to overcome some of the limitations of the slashy string escaping rules. Use it when its escaping rules suit your string contents (typically if it has some slashes you don’t want to escape). 4.8. String summary table String name String syntax Interpolated Multiline Escape character Single-quoted '…​' \ Triple-single-quoted '''…​''' \ Double-quoted "…​" \ Triple-double-quoted """…​""" \ Slashy /…​/ \ Dollar slashy $/…​/$ $ 4.9. Characters Unlike Java, Groovy doesn’t have an explicit character literal. However, you can be explicit about making a Groovy string an actual character, by three different means: char c1 = 'A' (1) assert c1 instanceof Character def c2 = 'B' as char (2) assert c2 instanceof Character def c3 = (char)'C' (3) assert c3 instanceof Character 1 by being explicit when declaring a variable holding the character by specifying the char type 2 by using type coercion with the as operator 3 by using a cast to char operation The first option 1 is interesting when the character is held in a variable, while the other two ( 2 and 3 ) are more interesting when a char value must be passed as argument of a method call. 5. Numbers Groovy supports different kinds of integral literals and decimal literals, backed by the usual Number types of Java. 5.1. Integral literals The integral literal types are the same as in Java: byte char short int long java.math.BigInteger You can create integral numbers of those types with the following declarations: // primitive types byte b = 1 char c = 2 short s = 3 int i = 4 long l = 5 // infinite precision BigInteger bi = 6 If you use optional typing by using the def keyword, the type of the integral number will vary: it’ll adapt to the capacity of the type that can hold that number. For positive numbers: def a = 1 assert a instanceof Integer // Integer.MAX_VALUE def b = 2147483647 assert b instanceof Integer // Integer.MAX_VALUE + 1 def c = 2147483648 assert c instanceof Long // Long.MAX_VALUE def d = 9223372036854775807 assert d instanceof Long // Long.MAX_VALUE + 1 def e = 9223372036854775808 assert e instanceof BigInteger As well as for negative numbers: def na = -1 assert na instanceof Integer // Integer.MIN_VALUE def nb = -2147483648 assert nb instanceof Integer // Integer.MIN_VALUE - 1 def nc = -2147483649 assert nc instanceof Long // Long.MIN_VALUE def nd = -9223372036854775808 assert nd instanceof Long // Long.MIN_VALUE - 1 def ne = -9223372036854775809 assert ne instanceof BigInteger 5.1.1. Alternative non-base 10 representations Numbers can also be represented in binary, octal, hexadecimal and decimal bases. Binary literal Binary numbers start with a 0b prefix: int xInt = 0b10101111 assert xInt == 175 short xShort = 0b11001001 assert xShort == 201 as short byte xByte = 0b11 assert xByte == 3 as byte long xLong = 0b101101101101 assert xLong == 2925l BigInteger xBigInteger = 0b111100100001 assert xBigInteger == 3873g int xNegativeInt = -0b10101111 assert xNegativeInt == -175 Octal literal Octal numbers are specified in the typical format of 0 followed by octal digits. int xInt = 077 assert xInt == 63 short xShort = 011 assert xShort == 9 as short byte xByte = 032 assert xByte == 26 as byte long xLong = 0246 assert xLong == 166l BigInteger xBigInteger = 01111 assert xBigInteger == 585g int xNegativeInt = -077 assert xNegativeInt == -63 Hexadecimal literal Hexadecimal numbers are specified in the typical format of 0x followed by hex digits. int xInt = 0x77 assert xInt == 119 short xShort = 0xaa assert xShort == 170 as short byte xByte = 0x3a assert xByte == 58 as byte long xLong = 0xffff assert xLong == 65535l BigInteger xBigInteger = 0xaaaa assert xBigInteger == 43690g Double xDouble = new Double('0x1.0p0') assert xDouble == 1.0d int xNegativeInt = -0x77 assert xNegativeInt == -119 5.2. Decimal literals The decimal literal types are the same as in Java: float double java.math.BigDecimal You can create decimal numbers of those types with the following declarations: // primitive types float f = 1.234 double d = 2.345 // infinite precision BigDecimal bd = 3.456 Decimals can use exponents, with the e or E exponent letter, followed by an optional sign, and an integral number representing the exponent: assert 1e3 == 1_000.0 assert 2E4 == 20_000.0 assert 3e+1 == 30.0 assert 4E-2 == 0.04 assert 5e-1 == 0.5 Conveniently for exact decimal number calculations, Groovy chooses java.math.BigDecimal as its decimal number type. In addition, both float and double are supported, but require an explicit type declaration, type coercion or suffix. Even if BigDecimal is the default for decimal numbers, such literals are accepted in methods or closures taking float or double as parameter types. Decimal numbers can’t be represented using a binary, octal or hexadecimal representation. 5.3. Underscore in literals When writing long literal numbers, it’s harder on the eye to figure out how some numbers are grouped together, for example with groups of thousands, of words, etc. By allowing you to place underscore in number literals, it’s easier to spot those groups: long creditCardNumber = 1234_5678_9012_3456L long socialSecurityNumbers = 999_99_9999L double monetaryAmount = 12_345_132.12 long hexBytes = 0xFF_EC_DE_5E long hexWords = 0xFFEC_DE5E long maxLong = 0x7fff_ffff_ffff_ffffL long alsoMaxLong = 9_223_372_036_854_775_807L long bytes = 0b11010010_01101001_10010100_10010010 5.4. Number type suffixes We can force a number (including binary, octals and hexadecimals) to have a specific type by giving a suffix (see table below), either uppercase or lowercase. Type Suffix BigInteger G or g Long L or l Integer I or i BigDecimal G or g Double D or d Float F or f Examples: assert 42I == Integer.valueOf('42') assert 42i == Integer.valueOf('42') // lowercase i more readable assert 123L == Long.valueOf("123") // uppercase L more readable assert 2147483648 == Long.valueOf('2147483648') // Long type used, value too large for an Integer assert 456G == new BigInteger('456') assert 456g == new BigInteger('456') assert 123.45 == new BigDecimal('123.45') // default BigDecimal type used assert .321 == new BigDecimal('.321') assert 1.200065D == Double.valueOf('1.200065') assert 1.234F == Float.valueOf('1.234') assert 1.23E23D == Double.valueOf('1.23E23') assert 0b1111L.class == Long // binary assert 0xFFi.class == Integer // hexadecimal assert 034G.class == BigInteger // octal 5.5. Math operations Although operators are covered in more detail elsewhere, it’s important to discuss the behavior of math operations and what their resulting types are. Division and power binary operations aside (covered below), binary operations between byte , char , short and int result in int binary operations involving long with byte , char , short and int result in long binary operations involving BigInteger and any other integral type result in BigInteger binary operations involving BigDecimal with byte , char , short , int and BigInteger result in BigDecimal binary operations between float , double and BigDecimal result in double binary operations between two BigDecimal result in BigDecimal The following table summarizes those rules: byte char short int long BigInteger float double BigDecimal byte int int int int long BigInteger double double BigDecimal char int int int long BigInteger double double BigDecimal short int int long BigInteger double double BigDecimal int int long BigInteger double double BigDecimal long long BigInteger double double BigDecimal BigInteger BigInteger double double BigDecimal float double double double double double double BigDecimal BigDecimal Thanks to Groovy’s operator overloading, the usual arithmetic operators work as well with BigInteger and BigDecimal , unlike in Java where you have to use explicit methods for operating on those numbers. 5.5.1. The case of the division operator The division operators / (and /= for division and assignment) produce a double result if either operand is a float or double , and a BigDecimal result otherwise (when both operands are any combination of an integral type short , char , byte , int , long , BigInteger or BigDecimal ). BigDecimal division is performed with the divide() method if the division is exact (i.e. yielding a result that can be represented within the bounds of the same precision and scale), or using a MathContext with a precision of the maximum of the two operands' precision plus an extra precision of 10, and a scale of the maximum of 10 and the maximum of the operands' scale. For integer division like in Java, you should use the intdiv() method, as Groovy doesn’t provide a dedicated integer division operator symbol. 5.5.2. The case of the power operator The power operation is represented by the ** operator, with two parameters: the base and the exponent. The result of the power operation depends on its operands, and the result of the operation (in particular if the result can be represented as an integral value). The following rules are used by Groovy’s power operation to determine the resulting type: If the exponent is a decimal value if the result can be represented as an Integer , then return an Integer else if the result can be represented as a Long , then return a Long otherwise return a Double If the exponent is an integral value if the exponent is strictly negative, then return an Integer , Long or Double if the result value fits in that type if the exponent is positive or zero if the base is a BigDecimal , then return a BigDecimal result value if the base is a BigInteger , then return a BigInteger result value if the base is an Integer , then return an Integer if the result value fits in it, otherwise a BigInteger if the base is a Long , then return a Long if the result value fits in it, otherwise a BigInteger We can illustrate those rules with a few examples: // base and exponent are ints and the result can be represented by an Integer assert 2 ** 3 instanceof Integer // 8 assert 10 ** 9 instanceof Integer // 1_000_000_000 // the base is a long, so fit the result in a Long // (although it could have fit in an Integer) assert 5L ** 2 instanceof Long // 25 // the result can't be represented as an Integer or Long, so return a BigInteger assert 100 ** 10 instanceof BigInteger // 10e20 assert 1234 ** 123 instanceof BigInteger // 170515806212727042875... // the base is a BigDecimal and the exponent a negative int // but the result can be represented as an Integer assert 0.5 ** -2 instanceof Integer // 4 // the base is an int, and the exponent a negative float // but again, the result can be represented as an Integer assert 1 ** -0.3f instanceof Integer // 1 // the base is an int, and the exponent a negative int // but the result will be calculated as a Double // (both base and exponent are actually converted to doubles) assert 10 ** -1 instanceof Double // 0.1 // the base is a BigDecimal, and the exponent is an int, so return a BigDecimal assert 1.2 ** 10 instanceof BigDecimal // 6.1917364224 // the base is a float or double, and the exponent is an int // but the result can only be represented as a Double value assert 3.4f ** 5 instanceof Double // 454.35430372146965 assert 5.6d ** 2 instanceof Double // 31.359999999999996 // the exponent is a decimal value // and the result can only be represented as a Double value assert 7.8 ** 1.9 instanceof Double // 49.542708423868476 assert 2 ** 0.1f instanceof Double // 1.0717734636432956 6. Booleans Boolean is a special data type that is used to represent truth values: true and false . Use this data type for simple flags that track true/false conditions . Boolean values can be stored in variables, assigned into fields, just like any other data type: def myBooleanVariable = true boolean untypedBooleanVar = false booleanField = true true and false are the only two primitive boolean values. But more complex boolean expressions can be represented using logical operators . In addition, Groovy has special rules (often referred to as Groovy Truth ) for coercing non-boolean objects to a boolean value. 7. Lists Groovy uses a comma-separated list of values, surrounded by square brackets, to denote lists. Groovy lists are plain JDK java.util.List , as Groovy doesn’t define its own collection classes. The concrete list implementation used when defining list literals are java.util.ArrayList by default, unless you decide to specify otherwise, as we shall see later on. def numbers = [1, 2, 3] (1) assert numbers instanceof List (2) assert numbers.size() == 3 (3) 1 We define a list numbers delimited by commas and surrounded by square brackets, and we assign that list into a variable 2 The list is an instance of Java’s java.util.List interface 3 The size of the list can be queried with the size() method, and shows our list contains 3 elements In the above example, we used a homogeneous list, but you can also create lists containing values of heterogeneous types: def heterogeneous = [1, "a", true] (1) 1 Our list here contains a number, a string and a boolean value We mentioned that by default, list literals are actually instances of java.util.ArrayList , but it is possible to use a different backing type for our lists, thanks to using type coercion with the as operator, or with explicit type declaration for your variables: def arrayList = [1, 2, 3] assert arrayList instanceof java.util.ArrayList def linkedList = [2, 3, 4] as LinkedList (1) assert linkedList instanceof java.util.LinkedList LinkedList otherLinked = [3, 4, 5] (2) assert otherLinked instanceof java.util.LinkedList 1 We use coercion with the as operator to explicitly request a java.util.LinkedList implementation 2 We can say that the variable holding the list literal is of type java.util.LinkedList You can access elements of the list with the [] subscript operator (both for reading and setting values) with positive indices or negative indices to access elements from the end of the list, as well as with ranges, and use the << leftShift operator to append elements to a list: def letters = ['a', 'b', 'c', 'd'] assert letters[0] == 'a' (1) assert letters[1] == 'b' assert letters[-1] == 'd' (2) assert letters[-2] == 'c' letters[2] = 'C' (3) assert letters[2] == 'C' letters << 'e' (4) assert letters[ 4] == 'e' assert letters[-1] == 'e' assert letters[1, 3] == ['b', 'd'] (5) assert letters[2..4] == ['C', 'd', 'e'] (6) 1 Access the first element of the list (zero-based counting) 2 Access the last element of the list with a negative index: -1 is the first element from the end of the list 3 Use an assignment to set a new value for the third element of the list 4 Use the << leftShift operator to append an element at the end of the list 5 Access two elements at once, returning a new list containing those two elements 6 Use a range to access a range of values from the list, from a start to an end element position As lists can be heterogeneous in nature, lists can also contain other lists to create multidimensional lists: def multi = [[0, 1], [2, 3]] (1) assert multi[1][0] == 2 (2) 1 Define a list of numbers 2 Access the second element of the top-most list, and the first element of the inner list 8. Arrays Groovy reuses the list notation for arrays, but to make such literals arrays, you need to explicitly define the type of the array through coercion or type declaration. String[] arrStr = ['Ananas', 'Banana', 'Kiwi'] (1) assert arrStr instanceof String[] (2) assert !(arrStr instanceof List) def numArr = [1, 2, 3] as int[] (3) assert numArr instanceof int[] (4) assert numArr.size() == 3 1 Define an array of strings using explicit variable type declaration 2 Assert that we created an array of strings 3 Create an array of ints with the as operator 4 Assert that we created an array of primitive ints You can also create multi-dimensional arrays: def matrix3 = new Integer[3][3] (1) assert matrix3.size() == 3 Integer[][] matrix2 (2) matrix2 = [[1, 2], [3, 4]] assert matrix2 instanceof Integer[][] 1 You can define the bounds of a new array 2 Or declare an array without specifying its bounds Access to elements of an array follows the same notation as for lists: String[] names = ['Cédric', 'Guillaume', 'Jochen', 'Paul'] assert names[0] == 'Cédric' (1) names[2] = 'Blackdrag' (2) assert names[2] == 'Blackdrag' 1 Retrieve the first element of the array 2 Set the value of the third element of the array to a new value 8.1. Java-style array initialization Groovy has always supported literal list/array definitions using square brackets and has avoided Java-style curly braces so as not to conflict with closure definitions. In the case where the curly braces come immediately after an array type declaration however, there is no ambiguity with closure definitions, so Groovy 3 and above support that variant of the Java array initialization expression. Examples: def primes = new int[] {2, 3, 5, 7, 11} assert primes.size() == 5 && primes.sum() == 28 assert primes.class.name == '[I' def pets = new String[] {'cat', 'dog'} assert pets.size() == 2 && pets.sum() == 'catdog' assert pets.class.name == '[Ljava.lang.String;' // traditional Groovy alternative still supported String[] groovyBooks = [ 'Groovy in Action', 'Making Java Groovy' ] assert groovyBooks.every{ it.contains('Groovy') } 9. Maps Sometimes called dictionaries or associative arrays in other languages, Groovy features maps. Maps associate keys to values, separating keys and values with colons, and each key/value pairs with commas, and the whole keys and values surrounded by square brackets. def colors = [red: '#FF0000', green: '#00FF00', blue: '#0000FF'] (1) assert colors['red'] == '#FF0000' (2) assert colors.green == '#00FF00' (3) colors['pink'] = '#FF00FF' (4) colors.yellow = '#FFFF00' (5) assert colors.pink == '#FF00FF' assert colors['yellow'] == '#FFFF00' assert colors instanceof java.util.LinkedHashMap 1 We define a map of string color names, associated with their hexadecimal-coded html colors 2 We use the subscript notation to check the content associated with the red key 3 We can also use the property notation to assert the color green’s hexadecimal representation 4 Similarly, we can use the subscript notation to add a new key/value pair 5 Or the property notation, to add the yellow color When using names for the keys, we actually define string keys in the map. Groovy creates maps that are actually instances of java.util.LinkedHashMap . If you try to access a key which is not present in the map: assert colors.unknown == null def emptyMap = [:] assert emptyMap.anyKey == null You will retrieve a null result. In the examples above, we used string keys, but you can also use values of other types as keys: def numbers = [1: 'one', 2: 'two'] assert numbers[1] == 'one' Here, we used numbers as keys, as numbers can unambiguously be recognized as numbers, so Groovy will not create a string key like in our previous examples. But consider the case you want to pass a variable in lieu of the key, to have the value of that variable become the key: def key = 'name' def person = [key: 'Guillaume'] (1) assert !person.containsKey('name') (2) assert person.containsKey('key') (3) 1 The key associated with the 'Guillaume' name will actually be the "key" string, not the value associated with the key variable 2 The map doesn’t contain the 'name' key 3 Instead, the map contains a 'key' key You can also pass quoted strings as well as keys: ["name": "Guillaume"]. This is mandatory if your key string isn’t a valid identifier, for example if you wanted to create a string key containing a dash like in: ["street-name": "Main street"]. When you need to pass variable values as keys in your map definitions, you must surround the variable or expression with parentheses: person = [(key): 'Guillaume'] (1) assert person.containsKey('name') (2) assert !person.containsKey('key') (3) 1 This time, we surround the key variable with parentheses, to instruct the parser we are passing a variable rather than defining a string key 2 The map does contain the name key 3 But the map doesn’t contain the key key as before Groovy Learn Documentation Download Support Contribute Ecosystem Blog posts About Source code Security Books Thanks Sponsorship FAQ Search Socialize Discuss on the mailing-list Groovy on X Groovy on Bluesky Groovy on Mastodon Groovy on LinkedIn Events and conferences Source code on GitHub Report issues in Jira Stack Overflow questions Slack Community The Groovy programming language is supported by the Apache Software Foundation and the Groovy community. Apache, Apache Groovy, Groovy, and the ASF logo are either registered trademarks or trademarks of The Apache Software Foundation. © 2003-2025 the Apache Groovy project — Groovy is Open Source: license , privacy policy . | 2026-01-13T09:29:32 |
https://ace.atlassian.com/chapters/ | Join a chapter today! | Atlassian Community Events Skip to main content Toggle Navigation Events Connect Atlassian Community Events Join a Chapter Community-led Conferences Online Community Connect with Orbiit Learn Community-Led Classes Company User Groups Earn an Atlassian Certification Become a Champion ACE Speakers Find an ACE Speaker Log in Join a chapter today! Atlassian Community Events are free, user-led meetups happening in cities around the world. These events are fueled by passionate Community Leaders who are shaping the future of the community, one meetup at a time. Feeling inspired to take the lead? Find your city below and start connecting with others like you. If you’re all about bringing people together and creating something impactful, we’d love for you to join the Community Leader program. See how you can get involved. Learn more → © 2026 Atlassian Community Events All Rights Reserved ∙ Events ∙ Contact Us ∙ Privacy Policy ∙ Terms and Conditions ∙ Notice at Collection | 2026-01-13T09:29:32 |
https://giantrabbit.com/our-work?client=center-constitutional-rights | Our Work | Giant Rabbit Skip to main content Menu Close Main navigation Our Services Our Work About Us Strategy Design Development CRM Selection & Data Migration Fundraising & User Analytics Drupal 7 Upgrades to Backdrop CMS Project Rescues Managed Hosting Support & Maintenance Security  All Arts & Culture Education Environment Health Human Rights Social Justice Technology & Privacy  About Giant Rabbit The Team Jobs Contact Us  Our Work Our clients are fighting for public health, access to abortion, and LGBTQ+ rights. They're going to court on behalf of asylum-seekers and promoting human rights around the world. We support organizations that fight climate change, work for environmental conservation, and warn people about the risks of avalanches. Our clients are also working theaters, performing arts organizations, museums, and cultural institutions. Defending human rights at home and abroad. Partner Since 2018 Center for Gender and Refugee Studies Partner Since 2022 Family Violence Appellate Project Partner Since 2013 Front Line Defenders Partner Since 2022 Human Rights First Partner Since 2022 Justice Action Center Partner Since 2016 National Network of Abortion Funds (NNAF) Partner Since 2020 Observatory for the Protection of Human Rights Defenders Partner Since 2022 Youth Law Center Working toward a healthier future. Partner Since 2019 American Academy of Pediatrics California Chapter 1 Partner Since 2022 Advancing New Standards in Reproductive Health (ANSIRH) Partner Since 2023 Beyond the Pill Partner Since 2015 Cutaneous Lymphoma Foundation Partner Since 2020 Farmers Market Coalition Partner Since 2021 HealthRIGHT 360 Partner Since 2019 Ibis Reproductive Health Services Partner Since 2020 Mandela Partners Protecting the environment and fighting climate change. Partner From 2022 To 2023 Audubon Canyon Ranch Partner Since 2017 Ecology Center Partner Since 2014 Edible Schoolyard Project Partner Since 2007 eLock Technologies Partner Since 2022 Environmental Grantmakers Association Partner Since 2019 Highstead Partner Since 2020 John Muir Land Trust Partner Since 2022 Just Zero Partner Since 2014 Leave No Trace Partner Since 2020 Northwest Avalanche Center (NWAC) Partner Since 2023 One Tree Planted Partner Since 2021 Payette Avalanche Center Partner Since 2022 Sempervirens Partner Since 2019 Sierra Avalanche Center Partner Since 2014 The Trust For Public Land Partner Since 2022 Utah Avalanche Center Working for social and economic justice for all. Partner Since 2021 A New Way of Life Partner Since 2022 Center for Constitutional Rights Partner Since 2021 Center for WorkLife Law Partner Since 2021 Common Cause Partner Since 2010 CompassPoint Partner Since 2021 Equality Action Center Partner Since 2018 Keshet Partner Since 2024 Labor Notes Partner Since 2022 Legal Link Partner Since 2022 Mirror Memoirs Partner Since 2013 Unbound Philanthropy Partner Since 2018 Migrant Justice Building connection through arts, culture, and food. Partner Since 2013 18 Reasons Partner Since 2021 Artists Communities Alliance Partner Since 2019 Authors Alliance Partner Since 2018 Company One Theatre Partner Since 2017 Howlround Theatre Commons Partner Since 2023 Lighthouse Writers Workshop Partner Since 2023 Museo de las Americas Partner Since 2013 Sacred Lands Film Project Improving the quality and accessibility of education. Partner Since 2022 Academy College Prep Partner From 2017 To 2022 Bellwether Education Partner Since 2020 California Community Colleges Transfer Guarantee Pathway to Historically Black Colleges and Universities Partner From 2019 To 2020 The College of Business at Oregon State University Partner Since 2011 Ignited Partner From 2018 To 2022 Maker Ed Partner Since 2014 myShakespeare Partner Since 2019 Umoja Community Education Foundation Using technology for good and defending digital rights and privacy. Partner Since 2014 Electronic Frontier Foundation Partner Since 2019 FreeBSD Foundation Partner From 2015 To 2016 Internet Archive Partner Since 2012 Society of Motion Picture & Television Engineers (SMPTE) Partner From 2013 To 2021 The TOR Project Partner Since 2014 USENIX Partner Since 2020 Women's Audio Mission Partner From 2013 To 2015 Wikimedia Foundation Non-profit Sectors Human Rights Health Environment Social Justice Arts & Culture Education Technology & Privacy ❮ How can we help? Get in touch Giant Rabbit LLC 415.355.4211 info@giantrabbit.com Copyright © 2018-2025 by Giant Rabbit LLC. Artwork by RBlack . | Read our privacy policy . | 2026-01-13T09:29:32 |
https://www.atlassian.com/software/jira/templates/sales | Sales Templates | Jira Template Library | Atlassian Close View this page in your language ? All languages Choose your language 中文 Deutsch English Español Français Italiano 한국어 Nederlands 日本語 Português Pусский Polski Get it free Features All Features Rovo in Jira Back Solutions Teams Use cases Company size Teams Marketing Engineering Design Operations IT Use cases Getting started Planning Campaign Management Agile Project Management Program Management Company size Enterprise Back Product guide Templates Templates All Templates Software Development Marketing Design Sales Operations Service Management HR Legal IT Operations Finance Jira Service Management templates Back Pricing More + Less - Get it free Back Get it free Jira Templates Open and close the navigation menu Categories Software development Marketing Design Sales Operations Service management HR Legal IT Operations Finance Project Management Templates Categories Software development Marketing Design Sales Operations Service management HR Legal IT Operations Finance Project Management Templates Sales templates Drive your deals to success with Jira. With pre-built, customizable templates for sales teams, it’s easy to get started. Project management Manage activities for completing a business project. Sales pipeline Track potential customers from new lead to closed deal. Sales service management Manage, track, and report on all your sales requests. Lead tracking Track sales leads from opportunity to close. Sales resources Jira for sales teams Manage your pipeline from start to close. Learn more about how Jira helps streamline your work. Learn more Put your projects on autopilot Focus on what matters and automate the rest. Create your team's custom rules or get started quickly with pre-made automations. Explore automations Plug in to your favorite tools Leverage 500+ integrations to work seamlessly, and 3000+ other extensions to craft your team’s perfect process. Explore app marketplace Company Careers Events Blogs Investor Relations Atlassian Foundation Press kit Contact us products Rovo Jira Jira Align Jira Service Management Confluence Loom Trello Bitbucket See all products Resources Technical support Purchasing & licensing Atlassian Community Knowledge base Marketplace My account Create support ticket Learn Partners Training & certification Documentation Developer resources Enterprise services See all resources Copyright © 2025 Atlassian Privacy Policy Terms Impressum Choose language Deutsch English Español Français Italiano 한국어 Nederlands 日本語 Polski Português русский 中文 | 2026-01-13T09:29:32 |
https://chromewebstore.google.com/detail/category/detail/volume-master/detail/jetwriter-ai-reply-emails/collection/detail/jetwriter-ai-reply-emails/pdnenlnelpdomajfejgapbdpmjkfpjkp | Chrome Web Store Skip to main content Chrome Web Store My extensions & themes Developer Dashboard Give feedback Sign in Discover Extensions Themes Welcome to Chrome Web Store Welcome to the Chrome Web Store Supercharge your browser with extensions and themes for Chrome See collection Favorites of 2025 Discover the standout AI extensions that made our year See collection Every day is Earth Day Plant trees, shop sustainably, and more See collection Adobe Photoshop Easily remove backgrounds, adjust colors and more. Plus, get 6 months free access to Photoshop web. 3.7 600K Users See details The future of writing Elevate your writing and create engaging and high-quality content effortlessly See collection 1 / 5 Top categories Shopping Entertainment Tools Art & Design Accessibility Top charts Trending Kami for Google Chrome™ Education 4.6 Average rating 4.6 out of 5 stars. Learn more about results and reviews. BetterCampus (prev. BetterCanvas) Education 4.9 Average rating 4.9 out of 5 stars. Learn more about results and reviews. Read&Write for Google Chrome™ Accessibility 3.4 Average rating 3.4 out of 5 stars. Learn more about results and reviews. See more Popular Volume Master Accessibility 4.8 Average rating 4.8 out of 5 stars. Learn more about results and reviews. Free VPN for Chrome - VPN Proxy VeePN Workflow & Planning 4.5 Average rating 4.5 out of 5 stars. Learn more about results and reviews. AdBlock — block ads across the web Workflow & Planning 4.5 Average rating 4.5 out of 5 stars. Learn more about results and reviews. See more New and notable Ad Block Wonder Privacy & Security 4.3 Average rating 4.3 out of 5 stars. Learn more about results and reviews. Smart popup blocker Tools 4.6 Average rating 4.6 out of 5 stars. Learn more about results and reviews. Manus AI Browser Operator Tools 4.5 Average rating 4.5 out of 5 stars. Learn more about results and reviews. See more Editors' Picks for you Handpicked by Chrome Editors See collection Extend your browser See more Discover a new level of convenience and customization with side panel extensions Chat with all AI models (Gemini, Claude, DeepSeek…) & AI Agents | AITOPIA 4.9 Average rating 4.9 out of 5 stars. Learn more about results and reviews. AI Agent Marketplace & AI Sidebar with all AI models (Gemini, Claude, DeepSeek & more) and hundreds of AI Agents Adobe Photoshop 3.7 Average rating 3.7 out of 5 stars. Learn more about results and reviews. Easily remove backgrounds, adjust colors and more. Plus, get 6 months free access to Photoshop web. BrowserGPT: ChatGPT Anywhere Powered by GPT 4 4.4 Average rating 4.4 out of 5 stars. Learn more about results and reviews. Write, reword, and translate 8x faster. Reply to emails in a click. Works on Google Docs, Gmail, YouTube, Twitter, Instagram, etc. Sidebar: ChatGPT, Bookmarks, GPT-4o | Meomni 4.8 Average rating 4.8 out of 5 stars. Learn more about results and reviews. Ultimate Sidebar ChatGPT Assistant, Bookmarks with AI, Calendar and Tasks Fleeting Notes 4.6 Average rating 4.6 out of 5 stars. Learn more about results and reviews. Quick notes from the browser to Obsidian Eclipse your screen Dim the lights with our dark mode selections See collection Chrome monthly spotlight Promising extensions to try out Web Highlights: PDF & Web Highlighter + Notes & AI Summary Productivity Highlighter & Annotation Tool for Websites & PDFs with AI Summary - free, easy to use, no sign-up required. Moonlight: AI Colleague for Research Papers Everything you need to read a paper: explanation, summary, translation, chat, and reference search. Reboost - Track Water Intake and Set Reminders Track your water intake and set custom reminders. Stay hydrated, stay on track, and never miss a break! ✨ YouTube Notes to Notion with Udemy, Coursera, BiliBili and more by Snipo Take YouTube notes directly to Notion, generate AI flashcards, capture screenshots, and sync learning courses with Notion Works with Gmail See more Boost your email productivity Boomerang for Gmail 4.2 Average rating 4.2 out of 5 stars. Learn more about results and reviews. Meeting scheduling and email management tool trusted by millions. Schedule meetings, track responses, send later, and more. Checker Plus for Gmail™ 4.7 Average rating 4.7 out of 5 stars. Learn more about results and reviews. Get notifications, read, listen to or delete emails without opening Gmail and easily manage multiple accounts. Email Tracker by Mailtrack® 4.4 Average rating 4.4 out of 5 stars. Learn more about results and reviews. Free, unlimited email tracker for Gmail, trusted by millions. Accurate, reliable, GDPR-compliant, and Google-audited. Streak CRM for Gmail 4.5 Average rating 4.5 out of 5 stars. Learn more about results and reviews. Manage sales and customer relationships directly inside Gmail. GMass: Powerful mail merge for Gmail 4.8 Average rating 4.8 out of 5 stars. Learn more about results and reviews. A powerful mass email and mail merge system for Gmail. Just for fun Bring some joy to your browser See collection Learn a new language See more Study while you browse Google Translate 4.2 Average rating 4.2 out of 5 stars. Learn more about results and reviews. View translations easily as you browse the web. By the Google Translate team. Rememberry - Translate and Memorize with Flashcards 4.6 Average rating 4.6 out of 5 stars. Learn more about results and reviews. Translate words while browsing and turn them into spaced repetition flashcards to build foreign language vocabulary. DeepL: translate and write with AI 4.7 Average rating 4.7 out of 5 stars. Learn more about results and reviews. Translate while you read and write with DeepL Translate, the world’s most accurate translator. Relingo - Master vocabulary while browsing websites and watching YouTube 4.6 Average rating 4.6 out of 5 stars. Learn more about results and reviews. Relingo extract words, full-text immersive translation while browsing. Also supports bilingual subtitles for Youtube, Netflix, etc. Readlang Web Reader 4.3 Average rating 4.3 out of 5 stars. Learn more about results and reviews. Read websites in the language you're learning, translate words you don't know, and we'll create flashcards to help you remember. Game on See more Beat boredom with bite-sized games in your browser BattleTabs 4.7 Average rating 4.7 out of 5 stars. Learn more about results and reviews. Multiplayer Battles in your New Tab Tiny Tycoon 4.7 Average rating 4.7 out of 5 stars. Learn more about results and reviews. Build a tiny tycoon on a tiny planet. Boxel 3D 4.6 Average rating 4.6 out of 5 stars. Learn more about results and reviews. Boxel 3D is a speedrunning game packed with challenging levels, custom skins, online multiplayer, and a creative level editor. Ice Dodo 4.6 Average rating 4.6 out of 5 stars. Learn more about results and reviews. Play 3D game easily by clicking the little icon at the top right corner of your browser. Boxel Golf 4.7 Average rating 4.7 out of 5 stars. Learn more about results and reviews. Boxel Golf is a multiplayer golf game packed with challenging courses, custom hats, and a powerful level builder. Work smarter, not harder with AI Automate tasks and stay focused and organized with AI-powered productivity extensions See collection For music lovers See more Equalizers, radios, playlists, and more Volume Master 4.8 Average rating 4.8 out of 5 stars. Learn more about results and reviews. Up to 600% volume boost Music Mode for YouTube™ 4.5 Average rating 4.5 out of 5 stars. Learn more about results and reviews. Hides the video and thumbnails on YouTube. Blocks the video keeping only the audio on YouTube Music. Smart Mute 4.5 Average rating 4.5 out of 5 stars. Learn more about results and reviews. Listen to audio one tab at a time. Modest Guitar | Columns for Ultimate-Guitar 4.8 Average rating 4.8 out of 5 stars. Learn more about results and reviews. Multiple columns and fullscreen for Ultimate-Guitar tabs Chrome Piano 4.5 Average rating 4.5 out of 5 stars. Learn more about results and reviews. Play the piano in your browser Google apps About Chrome Web Store Developer Dashboard Privacy Policy Terms of Service Help | 2026-01-13T09:29:32 |
https://chromewebstore.google.com/detail/category/detail/volume-master/detail/jetwriter-ai-reply-emails/collection/ | Chrome Web Store Skip to main content Chrome Web Store My extensions & themes Developer Dashboard Give feedback Sign in Discover Extensions Themes Welcome to Chrome Web Store Welcome to the Chrome Web Store Supercharge your browser with extensions and themes for Chrome See collection Favorites of 2025 Discover the standout AI extensions that made our year See collection Every day is Earth Day Plant trees, shop sustainably, and more See collection Adobe Photoshop Easily remove backgrounds, adjust colors and more. Plus, get 6 months free access to Photoshop web. 3.7 600K Users See details The future of writing Elevate your writing and create engaging and high-quality content effortlessly See collection 1 / 5 Top categories Shopping Entertainment Tools Art & Design Accessibility Top charts Trending Kami for Google Chrome™ Education 4.6 Average rating 4.6 out of 5 stars. Learn more about results and reviews. BetterCampus (prev. BetterCanvas) Education 4.9 Average rating 4.9 out of 5 stars. Learn more about results and reviews. Read&Write for Google Chrome™ Accessibility 3.4 Average rating 3.4 out of 5 stars. Learn more about results and reviews. See more Popular Volume Master Accessibility 4.8 Average rating 4.8 out of 5 stars. Learn more about results and reviews. Free VPN for Chrome - VPN Proxy VeePN Workflow & Planning 4.5 Average rating 4.5 out of 5 stars. Learn more about results and reviews. AdBlock — block ads across the web Workflow & Planning 4.5 Average rating 4.5 out of 5 stars. Learn more about results and reviews. See more New and notable Ad Block Wonder Privacy & Security 4.3 Average rating 4.3 out of 5 stars. Learn more about results and reviews. Smart popup blocker Tools 4.6 Average rating 4.6 out of 5 stars. Learn more about results and reviews. Manus AI Browser Operator Tools 4.5 Average rating 4.5 out of 5 stars. Learn more about results and reviews. See more Editors' Picks for you Handpicked by Chrome Editors See collection Extend your browser See more Discover a new level of convenience and customization with side panel extensions Chat with all AI models (Gemini, Claude, DeepSeek…) & AI Agents | AITOPIA 4.9 Average rating 4.9 out of 5 stars. Learn more about results and reviews. AI Agent Marketplace & AI Sidebar with all AI models (Gemini, Claude, DeepSeek & more) and hundreds of AI Agents Adobe Photoshop 3.7 Average rating 3.7 out of 5 stars. Learn more about results and reviews. Easily remove backgrounds, adjust colors and more. Plus, get 6 months free access to Photoshop web. BrowserGPT: ChatGPT Anywhere Powered by GPT 4 4.4 Average rating 4.4 out of 5 stars. Learn more about results and reviews. Write, reword, and translate 8x faster. Reply to emails in a click. Works on Google Docs, Gmail, YouTube, Twitter, Instagram, etc. Sidebar: ChatGPT, Bookmarks, GPT-4o | Meomni 4.8 Average rating 4.8 out of 5 stars. Learn more about results and reviews. Ultimate Sidebar ChatGPT Assistant, Bookmarks with AI, Calendar and Tasks Fleeting Notes 4.6 Average rating 4.6 out of 5 stars. Learn more about results and reviews. Quick notes from the browser to Obsidian Eclipse your screen Dim the lights with our dark mode selections See collection Chrome monthly spotlight Promising extensions to try out Web Highlights: PDF & Web Highlighter + Notes & AI Summary Productivity Highlighter & Annotation Tool for Websites & PDFs with AI Summary - free, easy to use, no sign-up required. Moonlight: AI Colleague for Research Papers Everything you need to read a paper: explanation, summary, translation, chat, and reference search. Reboost - Track Water Intake and Set Reminders Track your water intake and set custom reminders. Stay hydrated, stay on track, and never miss a break! ✨ YouTube Notes to Notion with Udemy, Coursera, BiliBili and more by Snipo Take YouTube notes directly to Notion, generate AI flashcards, capture screenshots, and sync learning courses with Notion Works with Gmail See more Boost your email productivity Boomerang for Gmail 4.2 Average rating 4.2 out of 5 stars. Learn more about results and reviews. Meeting scheduling and email management tool trusted by millions. Schedule meetings, track responses, send later, and more. Checker Plus for Gmail™ 4.7 Average rating 4.7 out of 5 stars. Learn more about results and reviews. Get notifications, read, listen to or delete emails without opening Gmail and easily manage multiple accounts. Email Tracker by Mailtrack® 4.4 Average rating 4.4 out of 5 stars. Learn more about results and reviews. Free, unlimited email tracker for Gmail, trusted by millions. Accurate, reliable, GDPR-compliant, and Google-audited. Streak CRM for Gmail 4.5 Average rating 4.5 out of 5 stars. Learn more about results and reviews. Manage sales and customer relationships directly inside Gmail. GMass: Powerful mail merge for Gmail 4.8 Average rating 4.8 out of 5 stars. Learn more about results and reviews. A powerful mass email and mail merge system for Gmail. Just for fun Bring some joy to your browser See collection Learn a new language See more Study while you browse Google Translate 4.2 Average rating 4.2 out of 5 stars. Learn more about results and reviews. View translations easily as you browse the web. By the Google Translate team. Rememberry - Translate and Memorize with Flashcards 4.6 Average rating 4.6 out of 5 stars. Learn more about results and reviews. Translate words while browsing and turn them into spaced repetition flashcards to build foreign language vocabulary. DeepL: translate and write with AI 4.7 Average rating 4.7 out of 5 stars. Learn more about results and reviews. Translate while you read and write with DeepL Translate, the world’s most accurate translator. Relingo - Master vocabulary while browsing websites and watching YouTube 4.6 Average rating 4.6 out of 5 stars. Learn more about results and reviews. Relingo extract words, full-text immersive translation while browsing. Also supports bilingual subtitles for Youtube, Netflix, etc. Readlang Web Reader 4.3 Average rating 4.3 out of 5 stars. Learn more about results and reviews. Read websites in the language you're learning, translate words you don't know, and we'll create flashcards to help you remember. Game on See more Beat boredom with bite-sized games in your browser BattleTabs 4.7 Average rating 4.7 out of 5 stars. Learn more about results and reviews. Multiplayer Battles in your New Tab Tiny Tycoon 4.7 Average rating 4.7 out of 5 stars. Learn more about results and reviews. Build a tiny tycoon on a tiny planet. Boxel 3D 4.6 Average rating 4.6 out of 5 stars. Learn more about results and reviews. Boxel 3D is a speedrunning game packed with challenging levels, custom skins, online multiplayer, and a creative level editor. Ice Dodo 4.6 Average rating 4.6 out of 5 stars. Learn more about results and reviews. Play 3D game easily by clicking the little icon at the top right corner of your browser. Boxel Golf 4.7 Average rating 4.7 out of 5 stars. Learn more about results and reviews. Boxel Golf is a multiplayer golf game packed with challenging courses, custom hats, and a powerful level builder. Work smarter, not harder with AI Automate tasks and stay focused and organized with AI-powered productivity extensions See collection For music lovers See more Equalizers, radios, playlists, and more Volume Master 4.8 Average rating 4.8 out of 5 stars. Learn more about results and reviews. Up to 600% volume boost Music Mode for YouTube™ 4.5 Average rating 4.5 out of 5 stars. Learn more about results and reviews. Hides the video and thumbnails on YouTube. Blocks the video keeping only the audio on YouTube Music. Smart Mute 4.5 Average rating 4.5 out of 5 stars. Learn more about results and reviews. Listen to audio one tab at a time. Modest Guitar | Columns for Ultimate-Guitar 4.8 Average rating 4.8 out of 5 stars. Learn more about results and reviews. Multiple columns and fullscreen for Ultimate-Guitar tabs Chrome Piano 4.5 Average rating 4.5 out of 5 stars. Learn more about results and reviews. Play the piano in your browser Google apps About Chrome Web Store Developer Dashboard Privacy Policy Terms of Service Help | 2026-01-13T09:29:32 |
https://docs.aws.amazon.com/zh_cn/cost-management/latest/userguide/ce-cost-comparison.html | 比较不同时间段的成本 - AWS 成本管理 比较不同时间段的成本 - AWS 成本管理 文档 AWS Billing and Cost Management 用户指南 权限 访问控制台 本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。 比较不同时间段的成本 成本比较是 Cost Explorer 的一项功能,可帮助您快速识别和了解 AWS 支出的变化。它会自动分析两个选定月份之间的成本变化,突出显示最大的成本驱动因素,并解释这些变化背后的原因。该功能提供控制台和 API 访问权限,帮助您分析 AWS 支出的成本变化。 主要优势: 快速识别各项服务、账户和区域中的主要成本变化。 提供成本驱动因素的详细明细,包括使用量和折扣变化。 将手动成本分析时间从数小时缩短至数秒。 在 Cost Explorer 中免费提供。 权限 要访问成本比较功能中的数据,您需要以下 IAM 权限: ce:GetCostAndUsageComparisons ce:GetCostComparisonDrivers 这些权限使您能够检索成本和使用情况比较以及成本驱动因素。 访问控制台 要在控制台中分析成本变化,您可以使用 热门趋势 小组件或 Cost Explorer。 访问 控制台 打开 账单与成本管理控制台,网址为 https://console.aws.amazon.com/costmanagement/ 。 请执行以下任一操作: 在控制台主页上,查看 热门趋势 小组件,其中显示了前两个月的十大成本差异。 在导航窗格中,选择 Cost Explorer ,然后在 报告参数 面板中选择 比较 。 定期查看 热门趋势 小组件,尽早识别重大成本变化。有关此小组件的更多信息,请参阅 热门趋势 。 Javascript 在您的浏览器中被禁用或不可用。 要使用 Amazon Web Services 文档,必须启用 Javascript。请参阅浏览器的帮助页面以了解相关说明。 文档惯例 预测 了解成本比较如何工作 此页面对您有帮助吗?- 是 感谢您对我们工作的肯定! 如果不耽误您的时间,请告诉我们做得好的地方,让我们做得更好。 此页面对您有帮助吗?- 否 感谢您告诉我们本页内容还需要完善。很抱歉让您失望了。 如果不耽误您的时间,请告诉我们如何改进文档。 | 2026-01-13T09:29:32 |
http://www.chinadaily.com.cn/a/202601/06/WS695c6a22a310d6866eb32330.html | Tracking Chinese cultural frontline in 2025 - Chinadaily.com.cn Search HOME CHINA WORLD BUSINESS LIFESTYLE CULTURE TRAVEL WATCHTHIS SPORTS OPINION REGIONAL FORUM NEWSPAPER MOBILE Home Culture Video Home / Culture / Video Tracking Chinese cultural frontline in 2025 chinadaily.com.cn | Updated: 2026-01-06 09:49 Share Share - WeChat --> CLOSE As the curtain fell on 2025, the first season of China Daily online show Cultural Frontline reached its denouement. Throughout the past year, our journey has taken us from the excitement of Chinese animated blockbusters and smash hit video games, to the digital innovations of leading cultural and archaeological institutions. We have travelled across space and time, via the literary classics and bestselling sci-fi epics. Our mission will resume again in 2026, when we continue to uncover the latest advances on China's Cultural Frontline. --> --> Photo Witnessing heritage: Xi's cultural encounters (7) Venezuela attack exposes US true colors Ten photos from across China: Jan 2 - 8 Tsakhor village prepares for Losar New Year China-Austria winter carnival kicks off in Shanxi Highs and lows mark China-US ties in 2025 --> --> Top BACK TO THE TOP English 中文 HOME CHINA WORLD BUSINESS LIFESTYLE CULTURE TRAVEL VIDEO SPORTS OPINION REGIONAL NEWSPAPER China Daily PDF China Daily E-paper MOBILE Copyright 1994 - . All rights reserved. The content (including but not limited to text, photo, multimedia information, etc) published in this site belongs to China Daily Information Co (CDIC). Without written authorization from CDIC, such content shall not be republished or used in any form. Note: Browsers with 1024*768 or higher resolution are suggested for this site. License for publishing multimedia online 0108263 Registration Number: 130349 About China Daily Advertise on Site Contact Us Job Offer Expat Employment FOLLOW US Copyright 1994 - . All rights reserved. The content (including but not limited to text, photo, multimedia information, etc) published in this site belongs to China Daily Information Co (CDIC). Without written authorization from CDIC, such content shall not be republished or used in any form. --> | 2026-01-13T09:29:32 |
https://chromewebstore.google.com/detail/category/detail/volume-master/detail/jetwriter-ai-reply-emails/detail/jetbrains-grazie-writing/detail/click-and-clean/mgngmngjioknlgjjaiiamcdbahombpfb | Chrome Web Store Skip to main content Chrome Web Store My extensions & themes Developer Dashboard Give feedback Sign in Discover Extensions Themes Welcome to Chrome Web Store Welcome to the Chrome Web Store Supercharge your browser with extensions and themes for Chrome See collection Favorites of 2025 Discover the standout AI extensions that made our year See collection Every day is Earth Day Plant trees, shop sustainably, and more See collection Adobe Photoshop Easily remove backgrounds, adjust colors and more. Plus, get 6 months free access to Photoshop web. 3.7 600K Users See details The future of writing Elevate your writing and create engaging and high-quality content effortlessly See collection 1 / 5 Top categories Shopping Entertainment Tools Art & Design Accessibility Top charts Trending Kami for Google Chrome™ Education 4.6 Average rating 4.6 out of 5 stars. Learn more about results and reviews. BetterCampus (prev. BetterCanvas) Education 4.9 Average rating 4.9 out of 5 stars. Learn more about results and reviews. Read&Write for Google Chrome™ Accessibility 3.4 Average rating 3.4 out of 5 stars. Learn more about results and reviews. See more Popular Volume Master Accessibility 4.8 Average rating 4.8 out of 5 stars. Learn more about results and reviews. Free VPN for Chrome - VPN Proxy VeePN Workflow & Planning 4.5 Average rating 4.5 out of 5 stars. Learn more about results and reviews. AdBlock — block ads across the web Workflow & Planning 4.5 Average rating 4.5 out of 5 stars. Learn more about results and reviews. See more New and notable Ad Block Wonder Privacy & Security 4.3 Average rating 4.3 out of 5 stars. Learn more about results and reviews. Smart popup blocker Tools 4.6 Average rating 4.6 out of 5 stars. Learn more about results and reviews. Manus AI Browser Operator Tools 4.5 Average rating 4.5 out of 5 stars. Learn more about results and reviews. See more Editors' Picks for you Handpicked by Chrome Editors See collection Extend your browser See more Discover a new level of convenience and customization with side panel extensions Chat with all AI models (Gemini, Claude, DeepSeek…) & AI Agents | AITOPIA 4.9 Average rating 4.9 out of 5 stars. Learn more about results and reviews. AI Agent Marketplace & AI Sidebar with all AI models (Gemini, Claude, DeepSeek & more) and hundreds of AI Agents Adobe Photoshop 3.7 Average rating 3.7 out of 5 stars. Learn more about results and reviews. Easily remove backgrounds, adjust colors and more. Plus, get 6 months free access to Photoshop web. BrowserGPT: ChatGPT Anywhere Powered by GPT 4 4.4 Average rating 4.4 out of 5 stars. Learn more about results and reviews. Write, reword, and translate 8x faster. Reply to emails in a click. Works on Google Docs, Gmail, YouTube, Twitter, Instagram, etc. Sidebar: ChatGPT, Bookmarks, GPT-4o | Meomni 4.8 Average rating 4.8 out of 5 stars. Learn more about results and reviews. Ultimate Sidebar ChatGPT Assistant, Bookmarks with AI, Calendar and Tasks Fleeting Notes 4.6 Average rating 4.6 out of 5 stars. Learn more about results and reviews. Quick notes from the browser to Obsidian Eclipse your screen Dim the lights with our dark mode selections See collection Chrome monthly spotlight Promising extensions to try out Web Highlights: PDF & Web Highlighter + Notes & AI Summary Productivity Highlighter & Annotation Tool for Websites & PDFs with AI Summary - free, easy to use, no sign-up required. Moonlight: AI Colleague for Research Papers Everything you need to read a paper: explanation, summary, translation, chat, and reference search. Reboost - Track Water Intake and Set Reminders Track your water intake and set custom reminders. Stay hydrated, stay on track, and never miss a break! ✨ YouTube Notes to Notion with Udemy, Coursera, BiliBili and more by Snipo Take YouTube notes directly to Notion, generate AI flashcards, capture screenshots, and sync learning courses with Notion Works with Gmail See more Boost your email productivity Boomerang for Gmail 4.2 Average rating 4.2 out of 5 stars. Learn more about results and reviews. Meeting scheduling and email management tool trusted by millions. Schedule meetings, track responses, send later, and more. Checker Plus for Gmail™ 4.7 Average rating 4.7 out of 5 stars. Learn more about results and reviews. Get notifications, read, listen to or delete emails without opening Gmail and easily manage multiple accounts. Email Tracker by Mailtrack® 4.4 Average rating 4.4 out of 5 stars. Learn more about results and reviews. Free, unlimited email tracker for Gmail, trusted by millions. Accurate, reliable, GDPR-compliant, and Google-audited. Streak CRM for Gmail 4.5 Average rating 4.5 out of 5 stars. Learn more about results and reviews. Manage sales and customer relationships directly inside Gmail. GMass: Powerful mail merge for Gmail 4.8 Average rating 4.8 out of 5 stars. Learn more about results and reviews. A powerful mass email and mail merge system for Gmail. Just for fun Bring some joy to your browser See collection Learn a new language See more Study while you browse Google Translate 4.2 Average rating 4.2 out of 5 stars. Learn more about results and reviews. View translations easily as you browse the web. By the Google Translate team. Rememberry - Translate and Memorize with Flashcards 4.6 Average rating 4.6 out of 5 stars. Learn more about results and reviews. Translate words while browsing and turn them into spaced repetition flashcards to build foreign language vocabulary. DeepL: translate and write with AI 4.7 Average rating 4.7 out of 5 stars. Learn more about results and reviews. Translate while you read and write with DeepL Translate, the world’s most accurate translator. Relingo - Master vocabulary while browsing websites and watching YouTube 4.6 Average rating 4.6 out of 5 stars. Learn more about results and reviews. Relingo extract words, full-text immersive translation while browsing. Also supports bilingual subtitles for Youtube, Netflix, etc. Readlang Web Reader 4.3 Average rating 4.3 out of 5 stars. Learn more about results and reviews. Read websites in the language you're learning, translate words you don't know, and we'll create flashcards to help you remember. Game on See more Beat boredom with bite-sized games in your browser BattleTabs 4.7 Average rating 4.7 out of 5 stars. Learn more about results and reviews. Multiplayer Battles in your New Tab Tiny Tycoon 4.7 Average rating 4.7 out of 5 stars. Learn more about results and reviews. Build a tiny tycoon on a tiny planet. Boxel 3D 4.6 Average rating 4.6 out of 5 stars. Learn more about results and reviews. Boxel 3D is a speedrunning game packed with challenging levels, custom skins, online multiplayer, and a creative level editor. Ice Dodo 4.6 Average rating 4.6 out of 5 stars. Learn more about results and reviews. Play 3D game easily by clicking the little icon at the top right corner of your browser. Boxel Golf 4.7 Average rating 4.7 out of 5 stars. Learn more about results and reviews. Boxel Golf is a multiplayer golf game packed with challenging courses, custom hats, and a powerful level builder. Work smarter, not harder with AI Automate tasks and stay focused and organized with AI-powered productivity extensions See collection For music lovers See more Equalizers, radios, playlists, and more Volume Master 4.8 Average rating 4.8 out of 5 stars. Learn more about results and reviews. Up to 600% volume boost Music Mode for YouTube™ 4.5 Average rating 4.5 out of 5 stars. Learn more about results and reviews. Hides the video and thumbnails on YouTube. Blocks the video keeping only the audio on YouTube Music. Smart Mute 4.5 Average rating 4.5 out of 5 stars. Learn more about results and reviews. Listen to audio one tab at a time. Modest Guitar | Columns for Ultimate-Guitar 4.8 Average rating 4.8 out of 5 stars. Learn more about results and reviews. Multiple columns and fullscreen for Ultimate-Guitar tabs Chrome Piano 4.5 Average rating 4.5 out of 5 stars. Learn more about results and reviews. Play the piano in your browser Google apps About Chrome Web Store Developer Dashboard Privacy Policy Terms of Service Help | 2026-01-13T09:29:32 |
https://docs.aws.amazon.com/pt_br/cost-management/latest/userguide/add-tags-to-dashboards.html | Adicionar etiquetas a painéis - AWS Gestão de custos Adicionar etiquetas a painéis - AWS Gestão de custos Documentação AWS Billing and Cost Management Manual do usuário As traduções são geradas por tradução automática. Em caso de conflito entre o conteúdo da tradução e da versão original em inglês, a versão em inglês prevalecerá. Adicionar etiquetas a painéis Etiquetas ajudam você a identificar, organizar e gerenciar seus painéis adicionando rótulos descritivos. Você pode marcar seus painéis para identificar qual departamento os criou, rastreá-los por projeto ou iniciativa, rotular sua finalidade ou marcá-los para diferentes ambientes. Por exemplo, você pode usar etiquetas como Departamento = Marketing ou Projeto = Otimização de Custo-2025 para categorizar seus painéis. Quando existem muitos painéis em sua organização, as etiquetas se tornam particularmente valiosas. Eles permitem filtrar e pesquisar painéis específicos, controlar o acesso por meio de políticas do IAM com base nos valores das etiquetas e rastrear painéis que atendem a propósitos semelhantes em equipes diferentes. Se você usa a AWS CLI ou o SDK, etiquetas também ajudam a gerenciar painéis relacionados como um grupo. Para adicionar etiquetas a um painel Abra o console de Gerenciamento de Faturamento e Custos da em https://console.aws.amazon.com/costmanagement/ . No painel de navegação, escolha Painéis . Selecione o tipo de painel que você deseja marcar. Escolha Ações e, em seguida, Gerenciar etiquetas na lista suspensa. Selecione Adicionar nova tag . Insira a chave e o valor (opcional) para a etiqueta. Selecione Adicionar nova tag para adicionar mais tags. O número máximo de tags que podem ser adicionadas é 50 Escolha Salvar alterações . Depois de salvar as alterações, as etiquetas são aplicadas ao seu painel e podem ser usadas para filtragem e controle de acesso. O Javascript está desativado ou não está disponível no seu navegador. Para usar a documentação da AWS, o Javascript deve estar ativado. Consulte as páginas de Ajuda do navegador para obter instruções. Convenções do documento Duplicar painéis Analisando seus custos e uso com o AWS Cost Explorer Essa página foi útil? - Sim Obrigado por nos informar que estamos fazendo um bom trabalho! Se tiver tempo, conte-nos sobre o que você gostou para que possamos melhorar ainda mais. Essa página foi útil? - Não Obrigado por nos informar que precisamos melhorar a página. Lamentamos ter decepcionado você. Se tiver tempo, conte-nos como podemos melhorar a documentação. | 2026-01-13T09:29:32 |
http://english.www.gov.cn/news/202512/15/content_WS693ff791c6d00ca5f9a081c2.html | Xi stresses strategic importance of work to raise minors' moral standards App HOME NEWS INSTITUTIONS POLICIES ARCHIVE 中文 HOME NEWS INSTITUTIONS POLICIES ARCHIVE 中文 Xi stresses strategic importance of work to raise minors' moral standards Updated: December 15, 2025 19:57 Xinhua BEIJING, Dec. 15 -- Chinese President Xi Jinping has stressed the work to raise the intellectual and moral standards of minors, noting that it should be carried out as a strategic and fundamental task. He also called for joint efforts to create a sound social environment for minors' healthy growth. Xi, also general secretary of the Communist Party of China (CPC) Central Committee and chairman of the Central Military Commission, made the remarks in a recent instruction on the issue. In the instruction, Xi underlined the importance of a collaborative education mechanism among schools, families and society in relevant work, to guide the minors to establish lofty ideals, practice core socialist values and develop good moral qualities and behavioral habits. Efforts should also be made to nurture a new generation of capable young people with sound moral grounding, intellectual ability, physical vigor, aesthetic sensibility and work skills, who will fully develop socialism and carry forward the socialist cause, according to Xi's instruction. Xi's instruction was conveyed at a symposium on raising the intellectual and moral standards of minors held in Beijing on Monday. Cai Qi, a member of the Standing Committee of the Political Bureau of the CPC Central Committee and a member of the CPC Central Committee Secretariat, attended the meeting and delivered a speech. Cai stressed the need to strengthen family education, make sustained efforts to provide children with high-quality cultural products and services, and improve minors' internet literacy. He also urged faster progress in the development of a mental health service system for minors, as well as stronger protection of minors and prevention of juvenile delinquency. The symposium was presided over by Li Shulei. Cai Qi, a member of the Standing Committee of the Political Bureau of the Communist Party of China (CPC) Central Committee and a member of the CPC Central Committee Secretariat, delivers a speech at a symposium on raising the intellectual and moral standards of minors in Beijing, capital of China, Dec. 15, 2025. An important instruction by Chinese President Xi Jinping, also general secretary of the CPC Central Committee and chairman of the Central Military Commission, was conveyed at the symposium. [Photo/Xinhua] Copyright© www.gov.cn | About us | Contact us Website Identification Code bm01000001 Registration Number: 05070218 All rights reserved. The content (including but not limited to text, photo, multimedia information, etc) published in this site belongs to www.gov.cn. Without written authorization from www.gov.cn, such content shall not be republished or used in any form. Mobile Desktop Copyright© www.gov.cn | Contact us Website Identification Code bm01000001 Registration Number: 05070218 | 2026-01-13T09:29:32 |
https://docs.aws.amazon.com/it_it/cost-management/latest/userguide/add-tags-to-dashboards.html | Aggiungere tag alle dashboard - AWS Gestione dei costi Aggiungere tag alle dashboard - AWS Gestione dei costi Documentazione AWS Billing and Cost Management Guida per l’utente Le traduzioni sono generate tramite traduzione automatica. In caso di conflitto tra il contenuto di una traduzione e la versione originale in Inglese, quest'ultima prevarrà. Aggiungere tag alle dashboard I tag ti aiutano a identificare, organizzare e gestire le dashboard aggiungendo etichette descrittive. Puoi etichettare le dashboard per identificare il reparto che le ha create, monitorarle per progetto o iniziativa, etichettarne lo scopo o contrassegnarle per ambienti diversi. Ad esempio, puoi utilizzare tag come Department = Marketing o Project = Cost-Optimization-2025 per classificare le tue dashboard. Quando l'organizzazione dispone di molte dashboard, i tag diventano particolarmente utili. Ti consentono di filtrare e cercare dashboard specifici, controllare l'accesso tramite policy IAM basate sui valori dei tag e tenere traccia delle dashboard che hanno scopi simili tra team diversi. Se utilizzi la AWS CLI o l'SDK, i tag ti aiutano anche a gestire i dashboard correlati come gruppo. Per aggiungere tag a una dashboard Apri la console di Fatturazione e Gestione dei costi all'indirizzo https://console.aws.amazon.com/costmanagement/ . Nel pannello di navigazione seleziona Dashboards (Pannelli di controllo). Seleziona la dashboard a cui desideri taggare. Scegli Azioni , quindi scegli Gestisci tag dall'elenco a discesa. Scegli Aggiungi nuovo tag . Inserisci la chiave e il valore (opzionale) per il tag. Scegli Aggiungi nuovo tag per aggiungere altri tag. Il numero massimo di tag che puoi aggiungere è 50 Scegli Save changes (Salva modifiche). Dopo aver salvato le modifiche, i tag vengono applicati alla dashboard e possono essere utilizzati per il filtraggio e il controllo degli accessi. JavaScript è disabilitato o non è disponibile nel tuo browser. Per usare la documentazione AWS, JavaScript deve essere abilitato. Consulta le pagine della guida del browser per le istruzioni. Convenzioni dei documenti Dashboard duplicati Analisi dei costi e dell'utilizzo con AWS Cost Explorer Questa pagina ti è stata utile? - Sì Grazie per averci comunicato che stiamo facendo un buon lavoro! Se hai un momento, ti invitiamo a dirci che cosa abbiamo fatto che ti è piaciuto così possiamo offrirti altri contenuti simili. Questa pagina ti è stata utile? - No Grazie per averci comunicato che questa pagina ha bisogno di essere modificata. Siamo spiacenti di non aver soddisfatto le tue esigenze. Se hai un momento, ti invitiamo a dirci come possiamo migliorare la documentazione. | 2026-01-13T09:29:32 |
https://chromewebstore.google.com/detail/category/detail/volume-master/detail/jetwriter-ai-reply-emails/collection/collection/get_started | Chrome Web Store Skip to main content Chrome Web Store My extensions & themes Developer Dashboard Give feedback Sign in Discover Extensions Themes Welcome to Chrome Web Store Welcome to the Chrome Web Store Supercharge your browser with extensions and themes for Chrome See collection Favorites of 2025 Discover the standout AI extensions that made our year See collection Every day is Earth Day Plant trees, shop sustainably, and more See collection Adobe Photoshop Easily remove backgrounds, adjust colors and more. Plus, get 6 months free access to Photoshop web. 3.7 600K Users See details The future of writing Elevate your writing and create engaging and high-quality content effortlessly See collection 1 / 5 Top categories Shopping Entertainment Tools Art & Design Accessibility Top charts Trending Kami for Google Chrome™ Education 4.6 Average rating 4.6 out of 5 stars. Learn more about results and reviews. BetterCampus (prev. BetterCanvas) Education 4.9 Average rating 4.9 out of 5 stars. Learn more about results and reviews. Read&Write for Google Chrome™ Accessibility 3.4 Average rating 3.4 out of 5 stars. Learn more about results and reviews. See more Popular Volume Master Accessibility 4.8 Average rating 4.8 out of 5 stars. Learn more about results and reviews. Free VPN for Chrome - VPN Proxy VeePN Workflow & Planning 4.5 Average rating 4.5 out of 5 stars. Learn more about results and reviews. AdBlock — block ads across the web Workflow & Planning 4.5 Average rating 4.5 out of 5 stars. Learn more about results and reviews. See more New and notable Ad Block Wonder Privacy & Security 4.3 Average rating 4.3 out of 5 stars. Learn more about results and reviews. Smart popup blocker Tools 4.6 Average rating 4.6 out of 5 stars. Learn more about results and reviews. Manus AI Browser Operator Tools 4.5 Average rating 4.5 out of 5 stars. Learn more about results and reviews. See more Editors' Picks for you Handpicked by Chrome Editors See collection Extend your browser See more Discover a new level of convenience and customization with side panel extensions Chat with all AI models (Gemini, Claude, DeepSeek…) & AI Agents | AITOPIA 4.9 Average rating 4.9 out of 5 stars. Learn more about results and reviews. AI Agent Marketplace & AI Sidebar with all AI models (Gemini, Claude, DeepSeek & more) and hundreds of AI Agents Adobe Photoshop 3.7 Average rating 3.7 out of 5 stars. Learn more about results and reviews. Easily remove backgrounds, adjust colors and more. Plus, get 6 months free access to Photoshop web. BrowserGPT: ChatGPT Anywhere Powered by GPT 4 4.4 Average rating 4.4 out of 5 stars. Learn more about results and reviews. Write, reword, and translate 8x faster. Reply to emails in a click. Works on Google Docs, Gmail, YouTube, Twitter, Instagram, etc. Sidebar: ChatGPT, Bookmarks, GPT-4o | Meomni 4.8 Average rating 4.8 out of 5 stars. Learn more about results and reviews. Ultimate Sidebar ChatGPT Assistant, Bookmarks with AI, Calendar and Tasks Fleeting Notes 4.6 Average rating 4.6 out of 5 stars. Learn more about results and reviews. Quick notes from the browser to Obsidian Eclipse your screen Dim the lights with our dark mode selections See collection Chrome monthly spotlight Promising extensions to try out Web Highlights: PDF & Web Highlighter + Notes & AI Summary Productivity Highlighter & Annotation Tool for Websites & PDFs with AI Summary - free, easy to use, no sign-up required. Moonlight: AI Colleague for Research Papers Everything you need to read a paper: explanation, summary, translation, chat, and reference search. Reboost - Track Water Intake and Set Reminders Track your water intake and set custom reminders. Stay hydrated, stay on track, and never miss a break! ✨ YouTube Notes to Notion with Udemy, Coursera, BiliBili and more by Snipo Take YouTube notes directly to Notion, generate AI flashcards, capture screenshots, and sync learning courses with Notion Works with Gmail See more Boost your email productivity Boomerang for Gmail 4.2 Average rating 4.2 out of 5 stars. Learn more about results and reviews. Meeting scheduling and email management tool trusted by millions. Schedule meetings, track responses, send later, and more. Checker Plus for Gmail™ 4.7 Average rating 4.7 out of 5 stars. Learn more about results and reviews. Get notifications, read, listen to or delete emails without opening Gmail and easily manage multiple accounts. Email Tracker by Mailtrack® 4.4 Average rating 4.4 out of 5 stars. Learn more about results and reviews. Free, unlimited email tracker for Gmail, trusted by millions. Accurate, reliable, GDPR-compliant, and Google-audited. Streak CRM for Gmail 4.5 Average rating 4.5 out of 5 stars. Learn more about results and reviews. Manage sales and customer relationships directly inside Gmail. GMass: Powerful mail merge for Gmail 4.8 Average rating 4.8 out of 5 stars. Learn more about results and reviews. A powerful mass email and mail merge system for Gmail. Just for fun Bring some joy to your browser See collection Learn a new language See more Study while you browse Google Translate 4.2 Average rating 4.2 out of 5 stars. Learn more about results and reviews. View translations easily as you browse the web. By the Google Translate team. Rememberry - Translate and Memorize with Flashcards 4.6 Average rating 4.6 out of 5 stars. Learn more about results and reviews. Translate words while browsing and turn them into spaced repetition flashcards to build foreign language vocabulary. DeepL: translate and write with AI 4.7 Average rating 4.7 out of 5 stars. Learn more about results and reviews. Translate while you read and write with DeepL Translate, the world’s most accurate translator. Relingo - Master vocabulary while browsing websites and watching YouTube 4.6 Average rating 4.6 out of 5 stars. Learn more about results and reviews. Relingo extract words, full-text immersive translation while browsing. Also supports bilingual subtitles for Youtube, Netflix, etc. Readlang Web Reader 4.3 Average rating 4.3 out of 5 stars. Learn more about results and reviews. Read websites in the language you're learning, translate words you don't know, and we'll create flashcards to help you remember. Game on See more Beat boredom with bite-sized games in your browser BattleTabs 4.7 Average rating 4.7 out of 5 stars. Learn more about results and reviews. Multiplayer Battles in your New Tab Tiny Tycoon 4.7 Average rating 4.7 out of 5 stars. Learn more about results and reviews. Build a tiny tycoon on a tiny planet. Boxel 3D 4.6 Average rating 4.6 out of 5 stars. Learn more about results and reviews. Boxel 3D is a speedrunning game packed with challenging levels, custom skins, online multiplayer, and a creative level editor. Ice Dodo 4.6 Average rating 4.6 out of 5 stars. Learn more about results and reviews. Play 3D game easily by clicking the little icon at the top right corner of your browser. Boxel Golf 4.7 Average rating 4.7 out of 5 stars. Learn more about results and reviews. Boxel Golf is a multiplayer golf game packed with challenging courses, custom hats, and a powerful level builder. Work smarter, not harder with AI Automate tasks and stay focused and organized with AI-powered productivity extensions See collection For music lovers See more Equalizers, radios, playlists, and more Volume Master 4.8 Average rating 4.8 out of 5 stars. Learn more about results and reviews. Up to 600% volume boost Music Mode for YouTube™ 4.5 Average rating 4.5 out of 5 stars. Learn more about results and reviews. Hides the video and thumbnails on YouTube. Blocks the video keeping only the audio on YouTube Music. Smart Mute 4.5 Average rating 4.5 out of 5 stars. Learn more about results and reviews. Listen to audio one tab at a time. Modest Guitar | Columns for Ultimate-Guitar 4.8 Average rating 4.8 out of 5 stars. Learn more about results and reviews. Multiple columns and fullscreen for Ultimate-Guitar tabs Chrome Piano 4.5 Average rating 4.5 out of 5 stars. Learn more about results and reviews. Play the piano in your browser Google apps About Chrome Web Store Developer Dashboard Privacy Policy Terms of Service Help | 2026-01-13T09:29:32 |
https://www.chinadaily.com.cn/a/202512/14/WS693ec288a310d6866eb2e870.html | Geminid meteor shower seen across China - Chinadaily.com.cn Search HOME CHINA WORLD BUSINESS LIFESTYLE CULTURE TRAVEL WATCHTHIS SPORTS OPINION REGIONAL FORUM NEWSPAPER MOBILE Home China China Photos Home / China / China Photos Geminid meteor shower seen across China Xinhua | Updated: 2025-12-14 21:58 Share Share - WeChat --> CLOSE This photo taken on Dec 14, 2025 shows the Geminid meteor shower in the sky over Yabuli town of Shangzhi city, Northeast China's Heilongjiang province. [Photo/Xinhua] BEIJING -- The Geminid meteor shower, one of the most spectacular meteor showers of the year, reached its peak on Sunday. --> 1 2 3 4 5 6 7 Next >>| --> 1/7 Next Photo Archives detailing crimes of Japanese unit released Remember history, cherish peace Wave of freezing weather brings snow to northern China IMF chief: China met the growth objective China's key economic tasks for 2026 Watch it again: Memorial Day for Nanjing Massacre Victims --> --> Top BACK TO THE TOP English 中文 HOME CHINA WORLD BUSINESS LIFESTYLE CULTURE TRAVEL VIDEO SPORTS OPINION REGIONAL NEWSPAPER China Daily PDF China Daily E-paper MOBILE Copyright 1994 - . All rights reserved. The content (including but not limited to text, photo, multimedia information, etc) published in this site belongs to China Daily Information Co (CDIC). Without written authorization from CDIC, such content shall not be republished or used in any form. Note: Browsers with 1024*768 or higher resolution are suggested for this site. License for publishing multimedia online 0108263 Registration Number: 130349 About China Daily Advertise on Site Contact Us Job Offer Expat Employment FOLLOW US Copyright 1994 - . All rights reserved. The content (including but not limited to text, photo, multimedia information, etc) published in this site belongs to China Daily Information Co (CDIC). Without written authorization from CDIC, such content shall not be republished or used in any form. --> | 2026-01-13T09:29:32 |
https://www.chinadaily.com.cn/sports/soccer | Soccer - Chinadaily.com.cn Search HOME CHINA WORLD BUSINESS LIFESTYLE CULTURE TRAVEL VIDEO SPORTS OPINION REGIONAL NEWSPAPER MOBILE Global Edition ASIA 中文 双语 Français HOME CHINA WORLD BUSINESS LIFESTYLE CULTURE TRAVEL VIDEO SPORTS OPINION REGIONAL NEWSPAPER China Daily PDF China Daily E-paper MOBILE Sports Soccer Basketball Volleyball Tennis Golf Track & field Swimming Home / Sports / Soccer Home Sports / Soccer China beats Australia in AFC U23 Asian Cup 2026-01-11 21:28 Fletcher left frustrated as United draws again, but praises Sesko brace 2026-01-09 09:40 China ties Iraq 0-0 in its U23 Asian Cup opening match 2026-01-09 00:27 China's women look to start year strongly, as preparations begin for Asian Cup 2026-01-08 09:59 Amorim axed after 14-month reign 2026-01-07 09:32 Reboot begins with hard work 2026-01-06 06:02 Guangdong wins 44th Guangdong-Hong Kong Cup in penalty shootout 2026-01-04 18:21 SW China's Village Super League kicks off 4th edition with record 137 teams 2026-01-04 16:06 China's national football team announces 26-man roster under new coach Shao 2026-01-01 15:34 Grassroots soccer captivates fans, bolsters economy 2025-12-29 06:56 Villa faces Chelsea test as Premier League title race heats up 2025-12-26 10:33 Stars from Manchester united in victory 2025-12-26 10:27 Kepa keeps Arsenal in cup contention 2025-12-25 10:06 Barcelona strengthens Liga lead at Villarreal, Atletico goes third 2025-12-23 09:50 Villa homes in on title dream 2025-12-23 09:49 The beautiful game's growth knows no bounds 2025-12-22 09:50 Three 'red cities' to launch cross-province soccer tournament in 2026 2025-12-19 20:23 World Cup winner to get $50m from richer prize pool 2025-12-19 09:40 Cherries leave sour taste with late draw 2025-12-17 09:27 Wuchuan Youth beat Shenzhen Yipingao to win soccer league championship 2025-12-15 21:37 1 2 3 4 5 6 7 8 9 10 Next >>| 1/286 Next Most Popular China ties Iraq 0-0 in its U23 Asian Cup opening match A learning curve Russian team wins Harbin International Ice Sculpture Competition Worldloppet ski season opens with Changchun cross-country event Women's half-marathon draws 20,000 runners to Guangzhou Picture perfect Highlights Venus still a force at 45, despite Auckland loss Reboot begins with hard work Russian team wins Harbin International Ice Sculpture Competition What's Hot Worldloppet ski season opens with Changchun cross-country event Special Chengdu World University Games Winter sports in China NHL plays in China Top BACK TO THE TOP English 中文 HOME CHINA WORLD BUSINESS LIFESTYLE CULTURE TRAVEL VIDEO SPORTS OPINION REGIONAL NEWSPAPER China Daily PDF China Daily E-paper MOBILE Copyright 1994 - . All rights reserved. The content (including but not limited to text, photo, multimedia information, etc) published in this site belongs to China Daily Information Co (CDIC). Without written authorization from CDIC, such content shall not be republished or used in any form. Note: Browsers with 1024*768 or higher resolution are suggested for this site. License for publishing multimedia online 0108263 Registration Number: 130349 About China Daily Advertise on Site Contact Us Job Offer Expat Employment FOLLOW US Copyright 1994 - . All rights reserved. The content (including but not limited to text, photo, multimedia information, etc) published in this site belongs to China Daily Information Co (CDIC). Without written authorization from CDIC, such content shall not be republished or used in any form. --> | 2026-01-13T09:29:32 |
http://groovy-lang.org/syntax.html#_single_line_comment | The Apache Groovy programming language - Syntax Socialize Discuss on the mailing-list Groovy on X Groovy on Bluesky Groovy on Mastodon Groovy on LinkedIn Events and conferences Source code on GitHub Report issues in Jira Stack Overflow questions Slack Community You are using an outdated browser. Please upgrade your browser to improve your experience. Apache Groovy™ Learn Documentation Download Support Contribute Ecosystem Blog posts Socialize Table of contents 1. Comments 1.1. Single-line comment 1.2. Multiline comment 1.3. Groovydoc comment 1.4. Shebang line 2. Keywords 3. Identifiers 3.1. Normal identifiers 3.2. Quoted identifiers 4. Strings 4.1. Single-quoted string 4.2. String concatenation 4.3. Triple-single-quoted string 4.3.1. Escaping special characters 4.3.2. Unicode escape sequence 4.4. Double-quoted string 4.4.1. String interpolation 4.4.2. Special case of interpolating closure expressions 4.4.3. Interoperability with Java 4.4.4. GString and String hashCodes 4.5. Triple-double-quoted string 4.6. Slashy string 4.6.1. Special cases 4.7. Dollar slashy string 4.8. String summary table 4.9. Characters 5. Numbers 5.1. Integral literals 5.1.1. Alternative non-base 10 representations Binary literal Octal literal Hexadecimal literal 5.2. Decimal literals 5.3. Underscore in literals 5.4. Number type suffixes 5.5. Math operations 5.5.1. The case of the division operator 5.5.2. The case of the power operator 6. Booleans 7. Lists 8. Arrays 8.1. Java-style array initialization 9. Maps Syntax This chapter covers the syntax of the Groovy programming language. The grammar of the language derives from the Java grammar, but enhances it with specific constructs for Groovy, and allows certain simplifications. 1. Comments 1.1. Single-line comment Single-line comments start with // and can be found at any position in the line. The characters following // , until the end of the line, are considered part of the comment. // a standalone single line comment println "hello" // a comment till the end of the line 1.2. Multiline comment A multiline comment starts with /* and can be found at any position in the line. The characters following /* will be considered part of the comment, including new line characters, up to the first */ closing the comment. Multiline comments can thus be put at the end of a statement, or even inside a statement. /* a standalone multiline comment spanning two lines */ println "hello" /* a multiline comment starting at the end of a statement */ println 1 /* one */ + 2 /* two */ 1.3. Groovydoc comment Similarly to multiline comments, Groovydoc comments are multiline, but start with /** and end with */ . Lines following the first Groovydoc comment line can optionally start with a star * . Those comments are associated with: type definitions (classes, interfaces, enums, annotations), fields and properties definitions methods definitions Although the compiler will not complain about Groovydoc comments not being associated with the above language elements, you should prepend those constructs with the comment right before it. /** * A Class description */ class Person { /** the name of the person */ String name /** * Creates a greeting method for a certain person. * * @param otherPerson the person to greet * @return a greeting message */ String greet(String otherPerson) { "Hello ${otherPerson}" } } Groovydoc follows the same conventions as Java’s own Javadoc. So you’ll be able to use the same tags as with Javadoc. In addition, Groovy supports Runtime Groovydoc since 3.0.0, i.e. Groovydoc can be retained at runtime. Runtime Groovydoc is disabled by default. It can be enabled by adding JVM option -Dgroovy.attach.runtime.groovydoc=true The Runtime Groovydoc starts with /**@ and ends with */ , for example: /**@ * Some class groovydoc for Foo */ class Foo { /**@ * Some method groovydoc for bar */ void bar() { } } assert Foo.class.groovydoc.content.contains('Some class groovydoc for Foo') (1) assert Foo.class.getMethod('bar', new Class[0]).groovydoc.content.contains('Some method groovydoc for bar') (2) 1 Get the runtime groovydoc for class Foo 2 Get the runtime groovydoc for method bar 1.4. Shebang line Beside the single-line comment, there is a special line comment, often called the shebang line understood by UNIX systems which allows scripts to be run directly from the command-line, provided you have installed the Groovy distribution and the groovy command is available on the PATH . #!/usr/bin/env groovy println "Hello from the shebang line" The # character must be the first character of the file. Any indentation would yield a compilation error. 2. Keywords Groovy has the following reserved keywords: Table 1. Reserved Keywords abstract assert break case catch class const continue def default do else enum extends final finally for goto if implements import instanceof interface native new null non-sealed package public protected private return static strictfp super switch synchronized this threadsafe throw throws transient try while Of these, const , goto , strictfp , and threadsafe are not currently in use. The reserved keywords can’t in general be used for variable, field and method names. A trick allows methods to be defined having the same name as a keyword by surrounding the name in quotes as shown in the following example: // reserved keywords can be used for method names if quoted def "abstract"() { true } // when calling such methods, the name must be qualified using "this." this.abstract() Using such names might be confusing and is often best to avoid. The trick is primarily intended to enable certain Java integration scenarios and certain DSL scenarios where having "verbs" and "nouns" with the same name as keywords may be desirable. In addition, Groovy has the following contextual keywords: Table 2. Contextual Keywords as in permits record sealed trait var yields These words are only keywords in certain contexts and can be more freely used in some places, in particular for variables, fields and method names. This extra lenience allows using method or variable names that were not keywords in earlier versions of Groovy or are not keywords in Java. Examples are shown here: // contextual keywords can be used for field and variable names def as = true assert as // contextual keywords can be used for method names def in() { true } // when calling such methods, the name only needs to be qualified using "this." in scenarios which would be ambiguous this.in() Groovy programmers familiar with these contextual keywords may still wish to avoid using those names unless there is a good reason to use such a name. The restrictions on reserved keywords also apply for the primitive types, the boolean literals and the null literal (all of which are discussed later): Table 3. Other reserved words null true false boolean char byte short int long float double While not recommended, the same trick as for reserved keywords can be used: def "null"() { true } // not recommended; potentially confusing assert this.null() // must be qualified Using such words as method names is potentially confusing and is often best to avoid, however, it might be useful for certain kinds of DSLs . 3. Identifiers 3.1. Normal identifiers Identifiers start with a letter, a dollar or an underscore. They cannot start with a number. A letter can be in the following ranges: 'a' to 'z' (lowercase ascii letter) 'A' to 'Z' (uppercase ascii letter) '\u00C0' to '\u00D6' '\u00D8' to '\u00F6' '\u00F8' to '\u00FF' '\u0100' to '\uFFFE' Then following characters can contain letters and numbers. Here are a few examples of valid identifiers (here, variable names): def name def item3 def with_underscore def $dollarStart But the following ones are invalid identifiers: def 3tier def a+b def a#b All keywords are also valid identifiers when following a dot: foo.as foo.assert foo.break foo.case foo.catch 3.2. Quoted identifiers Quoted identifiers appear after the dot of a dotted expression. For instance, the name part of the person.name expression can be quoted with person."name" or person.'name' . This is particularly interesting when certain identifiers contain illegal characters that are forbidden by the Java Language Specification, but which are allowed by Groovy when quoted. For example, characters like a dash, a space, an exclamation mark, etc. def map = [:] map."an identifier with a space and double quotes" = "ALLOWED" map.'with-dash-signs-and-single-quotes' = "ALLOWED" assert map."an identifier with a space and double quotes" == "ALLOWED" assert map.'with-dash-signs-and-single-quotes' == "ALLOWED" As we shall see in the following section on strings , Groovy provides different string literals. All kind of strings are actually allowed after the dot: map.'single quote' map."double quote" map.'''triple single quote''' map."""triple double quote""" map./slashy string/ map.$/dollar slashy string/$ There’s a difference between plain character strings and Groovy’s GStrings (interpolated strings), as in that the latter case, the interpolated values are inserted in the final string for evaluating the whole identifier: def firstname = "Homer" map."Simpson-${firstname}" = "Homer Simpson" assert map.'Simpson-Homer' == "Homer Simpson" 4. Strings Text literals are represented in the form of chain of characters called strings. Groovy lets you instantiate java.lang.String objects, as well as GStrings ( groovy.lang.GString ) which are also called interpolated strings in other programming languages. 4.1. Single-quoted string Single-quoted strings are a series of characters surrounded by single quotes: 'a single-quoted string' Single-quoted strings are plain java.lang.String and don’t support interpolation. 4.2. String concatenation All the Groovy strings can be concatenated with the + operator: assert 'ab' == 'a' + 'b' 4.3. Triple-single-quoted string Triple-single-quoted strings are a series of characters surrounded by triplets of single quotes: '''a triple-single-quoted string''' Triple-single-quoted strings are plain java.lang.String and don’t support interpolation. Triple-single-quoted strings may span multiple lines. The content of the string can cross line boundaries without the need to split the string in several pieces and without concatenation or newline escape characters: def aMultilineString = '''line one line two line three''' If your code is indented, for example in the body of the method of a class, your string will contain the whitespace of the indentation. The Groovy Development Kit contains methods for stripping out the indentation with the String#stripIndent() method, and with the String#stripMargin() method that takes a delimiter character to identify the text to remove from the beginning of a string. When creating a string as follows: def startingAndEndingWithANewline = ''' line one line two line three ''' You will notice that the resulting string contains a newline character as first character. It is possible to strip that character by escaping the newline with a backslash: def strippedFirstNewline = '''\ line one line two line three ''' assert !strippedFirstNewline.startsWith('\n') 4.3.1. Escaping special characters You can escape single quotes with the backslash character to avoid terminating the string literal: 'an escaped single quote: \' needs a backslash' And you can escape the escape character itself with a double backslash: 'an escaped escape character: \\ needs a double backslash' Some special characters also use the backslash as escape character: Escape sequence Character \b backspace \f formfeed \n newline \r carriage return \s single space \t tabulation \\ backslash \' single quote within a single-quoted string (and optional for triple-single-quoted and double-quoted strings) \" double quote within a double-quoted string (and optional for triple-double-quoted and single-quoted strings) We’ll see some more escaping details when it comes to other types of strings discussed later. 4.3.2. Unicode escape sequence For characters that are not present on your keyboard, you can use unicode escape sequences: a backslash, followed by 'u', then 4 hexadecimal digits. For example, the Euro currency symbol can be represented with: 'The Euro currency symbol: \u20AC' 4.4. Double-quoted string Double-quoted strings are a series of characters surrounded by double quotes: "a double-quoted string" Double-quoted strings are plain java.lang.String if there’s no interpolated expression, but are groovy.lang.GString instances if interpolation is present. To escape a double quote, you can use the backslash character: "A double quote: \"". 4.4.1. String interpolation Any Groovy expression can be interpolated in all string literals, apart from single and triple-single-quoted strings. Interpolation is the act of replacing a placeholder in the string with its value upon evaluation of the string. The placeholder expressions are surrounded by ${} . The curly braces may be omitted for unambiguous dotted expressions, i.e. we can use just a $ prefix in those cases. If the GString is ever passed to a method taking a String, the expression value inside the placeholder is evaluated to its string representation (by calling toString() on that expression) and the resulting String is passed to the method. Here, we have a string with a placeholder referencing a local variable: def name = 'Guillaume' // a plain string def greeting = "Hello ${name}" assert greeting.toString() == 'Hello Guillaume' Any Groovy expression is valid, as we can see in this example with an arithmetic expression: def sum = "The sum of 2 and 3 equals ${2 + 3}" assert sum.toString() == 'The sum of 2 and 3 equals 5' Not only are expressions allowed in between the ${} placeholder, but so are statements. However, a statement’s value is just null . So if several statements are inserted in that placeholder, the last one should somehow return a meaningful value to be inserted. For instance, "The sum of 1 and 2 is equal to ${def a = 1; def b = 2; a + b}" is supported and works as expected but a good practice is usually to stick to simple expressions inside GString placeholders. In addition to ${} placeholders, we can also use a lone $ sign prefixing a dotted expression: def person = [name: 'Guillaume', age: 36] assert "$person.name is $person.age years old" == 'Guillaume is 36 years old' But only dotted expressions of the form a.b , a.b.c , etc, are valid. Expressions containing parentheses like method calls, curly braces for closures, dots which aren’t part of a property expression or arithmetic operators would be invalid. Given the following variable definition of a number: def number = 3.14 The following statement will throw a groovy.lang.MissingPropertyException because Groovy believes you’re trying to access the toString property of that number, which doesn’t exist: shouldFail(MissingPropertyException) { println "$number.toString()" } You can think of "$number.toString()" as being interpreted by the parser as "${number.toString}()" . Similarly, if the expression is ambiguous, you need to keep the curly braces: String thing = 'treasure' assert 'The x-coordinate of the treasure is represented by treasure.x' == "The x-coordinate of the $thing is represented by $thing.x" // <= Not allowed: ambiguous!! assert 'The x-coordinate of the treasure is represented by treasure.x' == "The x-coordinate of the $thing is represented by ${thing}.x" // <= Curly braces required If you need to escape the $ or ${} placeholders in a GString so they appear as is without interpolation, you just need to use a \ backslash character to escape the dollar sign: assert '$5' == "\$5" assert '${name}' == "\${name}" 4.4.2. Special case of interpolating closure expressions So far, we’ve seen we could interpolate arbitrary expressions inside the ${} placeholder, but there is a special case and notation for closure expressions. When the placeholder contains an arrow, ${→} , the expression is actually a closure expression — you can think of it as a closure with a dollar prepended in front of it: def sParameterLessClosure = "1 + 2 == ${-> 3}" (1) assert sParameterLessClosure == '1 + 2 == 3' def sOneParamClosure = "1 + 2 == ${ w -> w << 3}" (2) assert sOneParamClosure == '1 + 2 == 3' 1 The closure is a parameterless closure which doesn’t take arguments. 2 Here, the closure takes a single java.io.StringWriter argument, to which you can append content with the << leftShift operator. In either case, both placeholders are embedded closures. In appearance, it looks like a more verbose way of defining expressions to be interpolated, but closures have an interesting advantage over mere expressions: lazy evaluation. Let’s consider the following sample: def number = 1 (1) def eagerGString = "value == ${number}" def lazyGString = "value == ${ -> number }" assert eagerGString == "value == 1" (2) assert lazyGString == "value == 1" (3) number = 2 (4) assert eagerGString == "value == 1" (5) assert lazyGString == "value == 2" (6) 1 We define a number variable containing 1 that we then interpolate within two GStrings, as an expression in eagerGString and as a closure in lazyGString . 2 We expect the resulting string to contain the same string value of 1 for eagerGString . 3 Similarly for lazyGString 4 Then we change the value of the variable to a new number 5 With a plain interpolated expression, the value was actually bound at the time of creation of the GString. 6 But with a closure expression, the closure is called upon each coercion of the GString into String, resulting in an updated string containing the new number value. An embedded closure expression taking more than one parameter will generate an exception at runtime. Only closures with zero or one parameter are allowed. 4.4.3. Interoperability with Java When a method (whether implemented in Java or Groovy) expects a java.lang.String , but we pass a groovy.lang.GString instance, the toString() method of the GString is automatically and transparently called. String takeString(String message) { (4) assert message instanceof String (5) return message } def message = "The message is ${'hello'}" (1) assert message instanceof GString (2) def result = takeString(message) (3) assert result instanceof String assert result == 'The message is hello' 1 We create a GString variable 2 We double-check it’s an instance of the GString 3 We then pass that GString to a method taking a String as parameter 4 The signature of the takeString() method explicitly says its sole parameter is a String 5 We also verify that the parameter is indeed a String and not a GString. 4.4.4. GString and String hashCodes Although interpolated strings can be used in lieu of plain Java strings, they differ with strings in a particular way: their hashCodes are different. Plain Java strings are immutable, whereas the resulting String representation of a GString can vary, depending on its interpolated values. Even for the same resulting string, GStrings and Strings don’t have the same hashCode. assert "one: ${1}".hashCode() != "one: 1".hashCode() GString and Strings having different hashCode values, using GString as Map keys should be avoided, especially if we try to retrieve an associated value with a String instead of a GString. def key = "a" def m = ["${key}": "letter ${key}"] (1) assert m["a"] == null (2) 1 The map is created with an initial pair whose key is a GString 2 When we try to fetch the value with a String key, we will not find it, as Strings and GString have different hashCode values 4.5. Triple-double-quoted string Triple-double-quoted strings behave like double-quoted strings, with the addition that they are multiline, like the triple-single-quoted strings. def name = 'Groovy' def template = """ Dear Mr ${name}, You're the winner of the lottery! Yours sincerly, Dave """ assert template.toString().contains('Groovy') Neither double quotes nor single quotes need be escaped in triple-double-quoted strings. 4.6. Slashy string Beyond the usual quoted strings, Groovy offers slashy strings, which use / as the opening and closing delimiter. Slashy strings are particularly useful for defining regular expressions and patterns, as there is no need to escape backslashes. Example of a slashy string: def fooPattern = /.*foo.*/ assert fooPattern == '.*foo.*' Only forward slashes need to be escaped with a backslash: def escapeSlash = /The character \/ is a forward slash/ assert escapeSlash == 'The character / is a forward slash' Slashy strings are multiline: def multilineSlashy = /one two three/ assert multilineSlashy.contains('\n') Slashy strings can be thought of as just another way to define a GString but with different escaping rules. They hence support interpolation: def color = 'blue' def interpolatedSlashy = /a ${color} car/ assert interpolatedSlashy == 'a blue car' 4.6.1. Special cases An empty slashy string cannot be represented with a double forward slash, as it’s understood by the Groovy parser as a line comment. That’s why the following assert would actually not compile as it would look like a non-terminated statement: assert '' == // As slashy strings were mostly designed to make regexp easier so a few things that are errors in GStrings like $() or $5 will work with slashy strings. Remember that escaping backslashes is not required. An alternative way of thinking of this is that in fact escaping is not supported. The slashy string /\t/ won’t contain a tab but instead a backslash followed by the character 't'. Escaping is only allowed for the slash character, i.e. /\/folder/ will be a slashy string containing '/folder' . A consequence of slash escaping is that a slashy string can’t end with a backslash. Otherwise that will escape the slashy string terminator. You can instead use a special trick, /ends with slash ${'\\'}/ . But best just avoid using a slashy string in such a case. 4.7. Dollar slashy string Dollar slashy strings are multiline GStrings delimited with an opening $/ and a closing /$ . The escaping character is the dollar sign, and it can escape another dollar, or a forward slash. Escaping for the dollar and forward slash characters is only needed where conflicts arise with the special use of those characters. The characters $foo would normally indicate a GString placeholder, so those four characters can be entered into a dollar slashy string by escaping the dollar, i.e. $$foo . Similarly, you will need to escape a dollar slashy closing delimiter if you want it to appear in your string. Here are a few examples: def name = "Guillaume" def date = "April, 1st" def dollarSlashy = $/ Hello $name, today we're ${date}. $ dollar sign $$ escaped dollar sign \ backslash / forward slash $/ escaped forward slash $$$/ escaped opening dollar slashy $/$$ escaped closing dollar slashy /$ assert [ 'Guillaume', 'April, 1st', '$ dollar sign', '$ escaped dollar sign', '\\ backslash', '/ forward slash', '/ escaped forward slash', '$/ escaped opening dollar slashy', '/$ escaped closing dollar slashy' ].every { dollarSlashy.contains(it) } It was created to overcome some of the limitations of the slashy string escaping rules. Use it when its escaping rules suit your string contents (typically if it has some slashes you don’t want to escape). 4.8. String summary table String name String syntax Interpolated Multiline Escape character Single-quoted '…​' \ Triple-single-quoted '''…​''' \ Double-quoted "…​" \ Triple-double-quoted """…​""" \ Slashy /…​/ \ Dollar slashy $/…​/$ $ 4.9. Characters Unlike Java, Groovy doesn’t have an explicit character literal. However, you can be explicit about making a Groovy string an actual character, by three different means: char c1 = 'A' (1) assert c1 instanceof Character def c2 = 'B' as char (2) assert c2 instanceof Character def c3 = (char)'C' (3) assert c3 instanceof Character 1 by being explicit when declaring a variable holding the character by specifying the char type 2 by using type coercion with the as operator 3 by using a cast to char operation The first option 1 is interesting when the character is held in a variable, while the other two ( 2 and 3 ) are more interesting when a char value must be passed as argument of a method call. 5. Numbers Groovy supports different kinds of integral literals and decimal literals, backed by the usual Number types of Java. 5.1. Integral literals The integral literal types are the same as in Java: byte char short int long java.math.BigInteger You can create integral numbers of those types with the following declarations: // primitive types byte b = 1 char c = 2 short s = 3 int i = 4 long l = 5 // infinite precision BigInteger bi = 6 If you use optional typing by using the def keyword, the type of the integral number will vary: it’ll adapt to the capacity of the type that can hold that number. For positive numbers: def a = 1 assert a instanceof Integer // Integer.MAX_VALUE def b = 2147483647 assert b instanceof Integer // Integer.MAX_VALUE + 1 def c = 2147483648 assert c instanceof Long // Long.MAX_VALUE def d = 9223372036854775807 assert d instanceof Long // Long.MAX_VALUE + 1 def e = 9223372036854775808 assert e instanceof BigInteger As well as for negative numbers: def na = -1 assert na instanceof Integer // Integer.MIN_VALUE def nb = -2147483648 assert nb instanceof Integer // Integer.MIN_VALUE - 1 def nc = -2147483649 assert nc instanceof Long // Long.MIN_VALUE def nd = -9223372036854775808 assert nd instanceof Long // Long.MIN_VALUE - 1 def ne = -9223372036854775809 assert ne instanceof BigInteger 5.1.1. Alternative non-base 10 representations Numbers can also be represented in binary, octal, hexadecimal and decimal bases. Binary literal Binary numbers start with a 0b prefix: int xInt = 0b10101111 assert xInt == 175 short xShort = 0b11001001 assert xShort == 201 as short byte xByte = 0b11 assert xByte == 3 as byte long xLong = 0b101101101101 assert xLong == 2925l BigInteger xBigInteger = 0b111100100001 assert xBigInteger == 3873g int xNegativeInt = -0b10101111 assert xNegativeInt == -175 Octal literal Octal numbers are specified in the typical format of 0 followed by octal digits. int xInt = 077 assert xInt == 63 short xShort = 011 assert xShort == 9 as short byte xByte = 032 assert xByte == 26 as byte long xLong = 0246 assert xLong == 166l BigInteger xBigInteger = 01111 assert xBigInteger == 585g int xNegativeInt = -077 assert xNegativeInt == -63 Hexadecimal literal Hexadecimal numbers are specified in the typical format of 0x followed by hex digits. int xInt = 0x77 assert xInt == 119 short xShort = 0xaa assert xShort == 170 as short byte xByte = 0x3a assert xByte == 58 as byte long xLong = 0xffff assert xLong == 65535l BigInteger xBigInteger = 0xaaaa assert xBigInteger == 43690g Double xDouble = new Double('0x1.0p0') assert xDouble == 1.0d int xNegativeInt = -0x77 assert xNegativeInt == -119 5.2. Decimal literals The decimal literal types are the same as in Java: float double java.math.BigDecimal You can create decimal numbers of those types with the following declarations: // primitive types float f = 1.234 double d = 2.345 // infinite precision BigDecimal bd = 3.456 Decimals can use exponents, with the e or E exponent letter, followed by an optional sign, and an integral number representing the exponent: assert 1e3 == 1_000.0 assert 2E4 == 20_000.0 assert 3e+1 == 30.0 assert 4E-2 == 0.04 assert 5e-1 == 0.5 Conveniently for exact decimal number calculations, Groovy chooses java.math.BigDecimal as its decimal number type. In addition, both float and double are supported, but require an explicit type declaration, type coercion or suffix. Even if BigDecimal is the default for decimal numbers, such literals are accepted in methods or closures taking float or double as parameter types. Decimal numbers can’t be represented using a binary, octal or hexadecimal representation. 5.3. Underscore in literals When writing long literal numbers, it’s harder on the eye to figure out how some numbers are grouped together, for example with groups of thousands, of words, etc. By allowing you to place underscore in number literals, it’s easier to spot those groups: long creditCardNumber = 1234_5678_9012_3456L long socialSecurityNumbers = 999_99_9999L double monetaryAmount = 12_345_132.12 long hexBytes = 0xFF_EC_DE_5E long hexWords = 0xFFEC_DE5E long maxLong = 0x7fff_ffff_ffff_ffffL long alsoMaxLong = 9_223_372_036_854_775_807L long bytes = 0b11010010_01101001_10010100_10010010 5.4. Number type suffixes We can force a number (including binary, octals and hexadecimals) to have a specific type by giving a suffix (see table below), either uppercase or lowercase. Type Suffix BigInteger G or g Long L or l Integer I or i BigDecimal G or g Double D or d Float F or f Examples: assert 42I == Integer.valueOf('42') assert 42i == Integer.valueOf('42') // lowercase i more readable assert 123L == Long.valueOf("123") // uppercase L more readable assert 2147483648 == Long.valueOf('2147483648') // Long type used, value too large for an Integer assert 456G == new BigInteger('456') assert 456g == new BigInteger('456') assert 123.45 == new BigDecimal('123.45') // default BigDecimal type used assert .321 == new BigDecimal('.321') assert 1.200065D == Double.valueOf('1.200065') assert 1.234F == Float.valueOf('1.234') assert 1.23E23D == Double.valueOf('1.23E23') assert 0b1111L.class == Long // binary assert 0xFFi.class == Integer // hexadecimal assert 034G.class == BigInteger // octal 5.5. Math operations Although operators are covered in more detail elsewhere, it’s important to discuss the behavior of math operations and what their resulting types are. Division and power binary operations aside (covered below), binary operations between byte , char , short and int result in int binary operations involving long with byte , char , short and int result in long binary operations involving BigInteger and any other integral type result in BigInteger binary operations involving BigDecimal with byte , char , short , int and BigInteger result in BigDecimal binary operations between float , double and BigDecimal result in double binary operations between two BigDecimal result in BigDecimal The following table summarizes those rules: byte char short int long BigInteger float double BigDecimal byte int int int int long BigInteger double double BigDecimal char int int int long BigInteger double double BigDecimal short int int long BigInteger double double BigDecimal int int long BigInteger double double BigDecimal long long BigInteger double double BigDecimal BigInteger BigInteger double double BigDecimal float double double double double double double BigDecimal BigDecimal Thanks to Groovy’s operator overloading, the usual arithmetic operators work as well with BigInteger and BigDecimal , unlike in Java where you have to use explicit methods for operating on those numbers. 5.5.1. The case of the division operator The division operators / (and /= for division and assignment) produce a double result if either operand is a float or double , and a BigDecimal result otherwise (when both operands are any combination of an integral type short , char , byte , int , long , BigInteger or BigDecimal ). BigDecimal division is performed with the divide() method if the division is exact (i.e. yielding a result that can be represented within the bounds of the same precision and scale), or using a MathContext with a precision of the maximum of the two operands' precision plus an extra precision of 10, and a scale of the maximum of 10 and the maximum of the operands' scale. For integer division like in Java, you should use the intdiv() method, as Groovy doesn’t provide a dedicated integer division operator symbol. 5.5.2. The case of the power operator The power operation is represented by the ** operator, with two parameters: the base and the exponent. The result of the power operation depends on its operands, and the result of the operation (in particular if the result can be represented as an integral value). The following rules are used by Groovy’s power operation to determine the resulting type: If the exponent is a decimal value if the result can be represented as an Integer , then return an Integer else if the result can be represented as a Long , then return a Long otherwise return a Double If the exponent is an integral value if the exponent is strictly negative, then return an Integer , Long or Double if the result value fits in that type if the exponent is positive or zero if the base is a BigDecimal , then return a BigDecimal result value if the base is a BigInteger , then return a BigInteger result value if the base is an Integer , then return an Integer if the result value fits in it, otherwise a BigInteger if the base is a Long , then return a Long if the result value fits in it, otherwise a BigInteger We can illustrate those rules with a few examples: // base and exponent are ints and the result can be represented by an Integer assert 2 ** 3 instanceof Integer // 8 assert 10 ** 9 instanceof Integer // 1_000_000_000 // the base is a long, so fit the result in a Long // (although it could have fit in an Integer) assert 5L ** 2 instanceof Long // 25 // the result can't be represented as an Integer or Long, so return a BigInteger assert 100 ** 10 instanceof BigInteger // 10e20 assert 1234 ** 123 instanceof BigInteger // 170515806212727042875... // the base is a BigDecimal and the exponent a negative int // but the result can be represented as an Integer assert 0.5 ** -2 instanceof Integer // 4 // the base is an int, and the exponent a negative float // but again, the result can be represented as an Integer assert 1 ** -0.3f instanceof Integer // 1 // the base is an int, and the exponent a negative int // but the result will be calculated as a Double // (both base and exponent are actually converted to doubles) assert 10 ** -1 instanceof Double // 0.1 // the base is a BigDecimal, and the exponent is an int, so return a BigDecimal assert 1.2 ** 10 instanceof BigDecimal // 6.1917364224 // the base is a float or double, and the exponent is an int // but the result can only be represented as a Double value assert 3.4f ** 5 instanceof Double // 454.35430372146965 assert 5.6d ** 2 instanceof Double // 31.359999999999996 // the exponent is a decimal value // and the result can only be represented as a Double value assert 7.8 ** 1.9 instanceof Double // 49.542708423868476 assert 2 ** 0.1f instanceof Double // 1.0717734636432956 6. Booleans Boolean is a special data type that is used to represent truth values: true and false . Use this data type for simple flags that track true/false conditions . Boolean values can be stored in variables, assigned into fields, just like any other data type: def myBooleanVariable = true boolean untypedBooleanVar = false booleanField = true true and false are the only two primitive boolean values. But more complex boolean expressions can be represented using logical operators . In addition, Groovy has special rules (often referred to as Groovy Truth ) for coercing non-boolean objects to a boolean value. 7. Lists Groovy uses a comma-separated list of values, surrounded by square brackets, to denote lists. Groovy lists are plain JDK java.util.List , as Groovy doesn’t define its own collection classes. The concrete list implementation used when defining list literals are java.util.ArrayList by default, unless you decide to specify otherwise, as we shall see later on. def numbers = [1, 2, 3] (1) assert numbers instanceof List (2) assert numbers.size() == 3 (3) 1 We define a list numbers delimited by commas and surrounded by square brackets, and we assign that list into a variable 2 The list is an instance of Java’s java.util.List interface 3 The size of the list can be queried with the size() method, and shows our list contains 3 elements In the above example, we used a homogeneous list, but you can also create lists containing values of heterogeneous types: def heterogeneous = [1, "a", true] (1) 1 Our list here contains a number, a string and a boolean value We mentioned that by default, list literals are actually instances of java.util.ArrayList , but it is possible to use a different backing type for our lists, thanks to using type coercion with the as operator, or with explicit type declaration for your variables: def arrayList = [1, 2, 3] assert arrayList instanceof java.util.ArrayList def linkedList = [2, 3, 4] as LinkedList (1) assert linkedList instanceof java.util.LinkedList LinkedList otherLinked = [3, 4, 5] (2) assert otherLinked instanceof java.util.LinkedList 1 We use coercion with the as operator to explicitly request a java.util.LinkedList implementation 2 We can say that the variable holding the list literal is of type java.util.LinkedList You can access elements of the list with the [] subscript operator (both for reading and setting values) with positive indices or negative indices to access elements from the end of the list, as well as with ranges, and use the << leftShift operator to append elements to a list: def letters = ['a', 'b', 'c', 'd'] assert letters[0] == 'a' (1) assert letters[1] == 'b' assert letters[-1] == 'd' (2) assert letters[-2] == 'c' letters[2] = 'C' (3) assert letters[2] == 'C' letters << 'e' (4) assert letters[ 4] == 'e' assert letters[-1] == 'e' assert letters[1, 3] == ['b', 'd'] (5) assert letters[2..4] == ['C', 'd', 'e'] (6) 1 Access the first element of the list (zero-based counting) 2 Access the last element of the list with a negative index: -1 is the first element from the end of the list 3 Use an assignment to set a new value for the third element of the list 4 Use the << leftShift operator to append an element at the end of the list 5 Access two elements at once, returning a new list containing those two elements 6 Use a range to access a range of values from the list, from a start to an end element position As lists can be heterogeneous in nature, lists can also contain other lists to create multidimensional lists: def multi = [[0, 1], [2, 3]] (1) assert multi[1][0] == 2 (2) 1 Define a list of numbers 2 Access the second element of the top-most list, and the first element of the inner list 8. Arrays Groovy reuses the list notation for arrays, but to make such literals arrays, you need to explicitly define the type of the array through coercion or type declaration. String[] arrStr = ['Ananas', 'Banana', 'Kiwi'] (1) assert arrStr instanceof String[] (2) assert !(arrStr instanceof List) def numArr = [1, 2, 3] as int[] (3) assert numArr instanceof int[] (4) assert numArr.size() == 3 1 Define an array of strings using explicit variable type declaration 2 Assert that we created an array of strings 3 Create an array of ints with the as operator 4 Assert that we created an array of primitive ints You can also create multi-dimensional arrays: def matrix3 = new Integer[3][3] (1) assert matrix3.size() == 3 Integer[][] matrix2 (2) matrix2 = [[1, 2], [3, 4]] assert matrix2 instanceof Integer[][] 1 You can define the bounds of a new array 2 Or declare an array without specifying its bounds Access to elements of an array follows the same notation as for lists: String[] names = ['Cédric', 'Guillaume', 'Jochen', 'Paul'] assert names[0] == 'Cédric' (1) names[2] = 'Blackdrag' (2) assert names[2] == 'Blackdrag' 1 Retrieve the first element of the array 2 Set the value of the third element of the array to a new value 8.1. Java-style array initialization Groovy has always supported literal list/array definitions using square brackets and has avoided Java-style curly braces so as not to conflict with closure definitions. In the case where the curly braces come immediately after an array type declaration however, there is no ambiguity with closure definitions, so Groovy 3 and above support that variant of the Java array initialization expression. Examples: def primes = new int[] {2, 3, 5, 7, 11} assert primes.size() == 5 && primes.sum() == 28 assert primes.class.name == '[I' def pets = new String[] {'cat', 'dog'} assert pets.size() == 2 && pets.sum() == 'catdog' assert pets.class.name == '[Ljava.lang.String;' // traditional Groovy alternative still supported String[] groovyBooks = [ 'Groovy in Action', 'Making Java Groovy' ] assert groovyBooks.every{ it.contains('Groovy') } 9. Maps Sometimes called dictionaries or associative arrays in other languages, Groovy features maps. Maps associate keys to values, separating keys and values with colons, and each key/value pairs with commas, and the whole keys and values surrounded by square brackets. def colors = [red: '#FF0000', green: '#00FF00', blue: '#0000FF'] (1) assert colors['red'] == '#FF0000' (2) assert colors.green == '#00FF00' (3) colors['pink'] = '#FF00FF' (4) colors.yellow = '#FFFF00' (5) assert colors.pink == '#FF00FF' assert colors['yellow'] == '#FFFF00' assert colors instanceof java.util.LinkedHashMap 1 We define a map of string color names, associated with their hexadecimal-coded html colors 2 We use the subscript notation to check the content associated with the red key 3 We can also use the property notation to assert the color green’s hexadecimal representation 4 Similarly, we can use the subscript notation to add a new key/value pair 5 Or the property notation, to add the yellow color When using names for the keys, we actually define string keys in the map. Groovy creates maps that are actually instances of java.util.LinkedHashMap . If you try to access a key which is not present in the map: assert colors.unknown == null def emptyMap = [:] assert emptyMap.anyKey == null You will retrieve a null result. In the examples above, we used string keys, but you can also use values of other types as keys: def numbers = [1: 'one', 2: 'two'] assert numbers[1] == 'one' Here, we used numbers as keys, as numbers can unambiguously be recognized as numbers, so Groovy will not create a string key like in our previous examples. But consider the case you want to pass a variable in lieu of the key, to have the value of that variable become the key: def key = 'name' def person = [key: 'Guillaume'] (1) assert !person.containsKey('name') (2) assert person.containsKey('key') (3) 1 The key associated with the 'Guillaume' name will actually be the "key" string, not the value associated with the key variable 2 The map doesn’t contain the 'name' key 3 Instead, the map contains a 'key' key You can also pass quoted strings as well as keys: ["name": "Guillaume"]. This is mandatory if your key string isn’t a valid identifier, for example if you wanted to create a string key containing a dash like in: ["street-name": "Main street"]. When you need to pass variable values as keys in your map definitions, you must surround the variable or expression with parentheses: person = [(key): 'Guillaume'] (1) assert person.containsKey('name') (2) assert !person.containsKey('key') (3) 1 This time, we surround the key variable with parentheses, to instruct the parser we are passing a variable rather than defining a string key 2 The map does contain the name key 3 But the map doesn’t contain the key key as before Groovy Learn Documentation Download Support Contribute Ecosystem Blog posts About Source code Security Books Thanks Sponsorship FAQ Search Socialize Discuss on the mailing-list Groovy on X Groovy on Bluesky Groovy on Mastodon Groovy on LinkedIn Events and conferences Source code on GitHub Report issues in Jira Stack Overflow questions Slack Community The Groovy programming language is supported by the Apache Software Foundation and the Groovy community. Apache, Apache Groovy, Groovy, and the ASF logo are either registered trademarks or trademarks of The Apache Software Foundation. © 2003-2025 the Apache Groovy project — Groovy is Open Source: license , privacy policy . | 2026-01-13T09:29:32 |
https://www.chinadaily.com.cn/sports/tennis | Tennis - Chinadaily.com.cn Search HOME CHINA WORLD BUSINESS LIFESTYLE CULTURE TRAVEL VIDEO SPORTS OPINION REGIONAL NEWSPAPER MOBILE Global Edition ASIA 中文 双语 Français HOME CHINA WORLD BUSINESS LIFESTYLE CULTURE TRAVEL VIDEO SPORTS OPINION REGIONAL NEWSPAPER China Daily PDF China Daily E-paper MOBILE Sports Soccer Basketball Volleyball Tennis Golf Track & field Swimming Home / Sports / Tennis Home Sports / Tennis Venus still a force at 45, despite Auckland loss 2026-01-08 10:12 Swiatek says women's tennis does not need 'Battle of the Sexes' 2026-01-05 11:28 Kyrgios prevails in 'Battle of the Sexes' 2025-12-30 08:57 Looking to make a powerful return 2025-12-29 10:33 'China Swing' proves to be an economic grand slam 2025-12-29 10:06 'Sincaraz' rivalry lights up men's game 2025-12-25 09:24 Federer elected to Hall of Fame in first year of eligibility 2025-11-24 10:49 Duo's dominance defines 2025 2025-11-24 10:12 Do not judge match by its scoreline, says Zverev 2025-11-14 09:42 Alcaraz moves within one win of year-end No 1 2025-11-13 09:41 Sinner sweeps aside ailing Auger-Aliassime in ATP Finals opener 2025-11-12 09:32 Jabeur announces pregnancy 2025-11-12 09:32 Dubai hosts 'Battle of the sexes' 3.0 2025-11-06 09:58 Sinner reclaims No 1 ranking 2025-11-04 09:46 Sinner's No 1 bid starts with 2nd-round win at Paris Masters 2025-10-31 09:50 Swiss cheers: Teen Fonseca celebrates biggest career title 2025-10-28 10:06 Record numbers attend thrilling Ningbo Open 2025 2025-10-21 21:09 Kazakhstan serves notice of its tennis ambitions 2025-10-21 09:28 Sinner defeats Alcaraz to defend his title at Saudi Six Kings Slam 2025-10-20 09:22 Serving up a masterpiece 2025-10-14 10:02 1 2 3 4 5 6 7 8 9 10 Next >>| 1/103 Next Most Popular China ties Iraq 0-0 in its U23 Asian Cup opening match A learning curve Russian team wins Harbin International Ice Sculpture Competition Worldloppet ski season opens with Changchun cross-country event Women's half-marathon draws 20,000 runners to Guangzhou Picture perfect Highlights Venus still a force at 45, despite Auckland loss Reboot begins with hard work Russian team wins Harbin International Ice Sculpture Competition What's Hot Worldloppet ski season opens with Changchun cross-country event Special Chengdu World University Games Winter sports in China NHL plays in China Top BACK TO THE TOP English 中文 HOME CHINA WORLD BUSINESS LIFESTYLE CULTURE TRAVEL VIDEO SPORTS OPINION REGIONAL NEWSPAPER China Daily PDF China Daily E-paper MOBILE Copyright 1994 - . All rights reserved. The content (including but not limited to text, photo, multimedia information, etc) published in this site belongs to China Daily Information Co (CDIC). Without written authorization from CDIC, such content shall not be republished or used in any form. Note: Browsers with 1024*768 or higher resolution are suggested for this site. License for publishing multimedia online 0108263 Registration Number: 130349 About China Daily Advertise on Site Contact Us Job Offer Expat Employment FOLLOW US Copyright 1994 - . All rights reserved. The content (including but not limited to text, photo, multimedia information, etc) published in this site belongs to China Daily Information Co (CDIC). Without written authorization from CDIC, such content shall not be republished or used in any form. --> | 2026-01-13T09:29:32 |
https://docs.aws.amazon.com/zh_tw/cost-management/latest/userguide/add-tags-to-dashboards.html | 將標籤新增至儀表板 - AWS 成本管理 將標籤新增至儀表板 - AWS 成本管理 文件 AWS Billing and Cost Management 使用者指南 本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。 將標籤新增至儀表板 標籤可協助您透過新增描述性標籤來識別、組織和管理儀表板。您可以標記儀表板,以識別建立儀表板的部門、依專案或計畫追蹤儀表板、標記儀表板的目的,或針對不同的環境標記儀表板。例如,您可以使用 Department = Marketing 或 Project = Cost-Optimization-2025 等標籤來分類儀表板。 當您的組織有許多儀表板時,標籤會變得特別有價值。它們可讓您篩選和搜尋特定儀表板、根據標籤值透過 IAM 政策控制存取權,以及追蹤跨不同團隊提供類似用途的儀表板。如果您使用 AWS CLI 或 SDK,標籤也會協助您以群組形式管理相關的儀表板。 將標籤新增至儀表板 開啟「帳單和成本管理」主控台,網址為 https://console.aws.amazon.com/costmanagement/ 。 在導覽窗格中,選擇 Dashboards (儀表板)。 選取您要標記的儀表板。 選擇 動作 ,然後從下拉式清單中選擇 管理標籤 。 選擇 Add new tag (新增標籤) 。 輸入標籤的索引鍵和值 (選用)。 選擇 新增標籤 以新增其他標籤。您可以新增的標籤數量上限為 50 選擇 儲存變更 。 儲存變更後,標籤會套用至儀表板,並可用於篩選和存取控制。 您的瀏覽器已停用或無法使用 Javascript。 您必須啟用 Javascript,才能使用 AWS 文件。請參閱您的瀏覽器說明頁以取得說明。 文件慣用形式 複製儀表板 使用 AWS Cost Explorer 分析您的成本和用量 此頁面是否有幫助? - 是 感謝您,讓我們知道我們做得很好! 若您有空,歡迎您告知我們值得讚許的地方,這樣才能保持良好服務。 此頁面是否有幫助? - 否 感謝讓我們知道此頁面仍須改善。很抱歉,讓您失望。 若您有空,歡迎您提供改善文件的方式。 | 2026-01-13T09:29:32 |
https://www.atlassian.com/software/jira/templates/it-operations | IT Operations Templates | Jira Template Library | Atlassian Close View this page in your language ? All languages Choose your language 中文 Deutsch English Español Français Italiano 한국어 Nederlands 日本語 Português Pусский Polski Get it free Features All Features Rovo in Jira Back Solutions Teams Use cases Company size Teams Marketing Engineering Design Operations IT Use cases Getting started Planning Campaign Management Agile Project Management Program Management Company size Enterprise Back Product guide Templates Templates All Templates Software Development Marketing Design Sales Operations Service Management HR Legal IT Operations Finance Jira Service Management templates Back Pricing More + Less - Get it free Back Get it free Jira Templates Open and close the navigation menu Categories Software development Marketing Design Sales Operations Service management HR Legal IT Operations Finance Project Management Templates Categories Software development Marketing Design Sales Operations Service management HR Legal IT Operations Finance Project Management Templates IT operations templates Connect ops managers, devs, and site reliability engineers with Jira Service management. Empower teams with full context around changes and bring them together to resolve incidents when they happen. IT service management Intake requests, set up alerts, raise incidents, and fix issues quickly. Advanced IT service management Incident, change, and problem management with ITSM best practices. Customer service management Deliver great service experiences for your external customers. Analytics service management Manage employee requests for the data and insights they need. Successful teams use IT operations templates "The organized workflows and integrations between Jira Service Management and other products make it much easier for engineers. They are less tired and enjoy the work more." Roman Bugaev Chief Technology Officer, Flo IT operations resources Jira Service Management for IT Ops An easy-to-use solution that brings software development and IT onto the same platform to deliver and manage services. Learn more Jira Service Management product guide How to use Jira Service Management: guides, tutorials, and demos. Review the guide Jira Service Management demo Choose specific features you’re interested in and we’ll personalize a demo for you. Watch the demo Company Careers Events Blogs Investor Relations Atlassian Foundation Press kit Contact us products Rovo Jira Jira Align Jira Service Management Confluence Loom Trello Bitbucket See all products Resources Technical support Purchasing & licensing Atlassian Community Knowledge base Marketplace My account Create support ticket Learn Partners Training & certification Documentation Developer resources Enterprise services See all resources Copyright © 2025 Atlassian Privacy Policy Terms Impressum Choose language Deutsch English Español Français Italiano 한국어 Nederlands 日本語 Polski Português русский 中文 | 2026-01-13T09:29:32 |
https://www.atlassian.com/software/jira/templates/legal | Legal Templates | Jira Template Library | Atlassian Close View this page in your language ? All languages Choose your language 中文 Deutsch English Español Français Italiano 한국어 Nederlands 日本語 Português Pусский Polski Get it free Features All Features Rovo in Jira Back Solutions Teams Use cases Company size Teams Marketing Engineering Design Operations IT Use cases Getting started Planning Campaign Management Agile Project Management Program Management Company size Enterprise Back Product guide Templates Templates All Templates Software Development Marketing Design Sales Operations Service Management HR Legal IT Operations Finance Jira Service Management templates Back Pricing More + Less - Get it free Back Get it free Jira Templates Open and close the navigation menu Categories Software development Marketing Design Sales Operations Service management HR Legal IT Operations Finance Project Management Templates Categories Software development Marketing Design Sales Operations Service management HR Legal IT Operations Finance Project Management Templates Legal templates Keep your legal teams aligned with Jira Work Management. With pre-built, customizable templates for legal teams, it’s easy to get started. Project management Manage activities for completing a business project. Legal service management Manage and track all your contracts and legal requests. IP infringement Simplify IP infringement claims from start to finish. Legal resources Jira for legal teams Protect your company and the people within it. Learn more about how Jira Work Management helps streamline your work. Learn more Put your projects on autopilot Focus on what matters and automate the rest. Create your team's custom rules or get started quickly with pre-made automations. Explore automations Plug in to your favorite tools Leverage 500+ integrations to work seamlessly, and 3000+ other extensions to craft your team’s perfect process. Explore app marketplace Company Careers Events Blogs Investor Relations Atlassian Foundation Press kit Contact us products Rovo Jira Jira Align Jira Service Management Confluence Loom Trello Bitbucket See all products Resources Technical support Purchasing & licensing Atlassian Community Knowledge base Marketplace My account Create support ticket Learn Partners Training & certification Documentation Developer resources Enterprise services See all resources Copyright © 2025 Atlassian Privacy Policy Terms Impressum Choose language Deutsch English Español Français Italiano 한국어 Nederlands 日本語 Polski Português русский 中文 | 2026-01-13T09:29:32 |
https://giantrabbit.com/our-work?client=umoja | Our Work | Giant Rabbit Skip to main content Menu Close Main navigation Our Services Our Work About Us Strategy Design Development CRM Selection & Data Migration Fundraising & User Analytics Drupal 7 Upgrades to Backdrop CMS Project Rescues Managed Hosting Support & Maintenance Security  All Arts & Culture Education Environment Health Human Rights Social Justice Technology & Privacy  About Giant Rabbit The Team Jobs Contact Us  Our Work Our clients are fighting for public health, access to abortion, and LGBTQ+ rights. They're going to court on behalf of asylum-seekers and promoting human rights around the world. We support organizations that fight climate change, work for environmental conservation, and warn people about the risks of avalanches. Our clients are also working theaters, performing arts organizations, museums, and cultural institutions. Defending human rights at home and abroad. Partner Since 2018 Center for Gender and Refugee Studies Partner Since 2022 Family Violence Appellate Project Partner Since 2013 Front Line Defenders Partner Since 2022 Human Rights First Partner Since 2022 Justice Action Center Partner Since 2016 National Network of Abortion Funds (NNAF) Partner Since 2020 Observatory for the Protection of Human Rights Defenders Partner Since 2022 Youth Law Center Working toward a healthier future. Partner Since 2019 American Academy of Pediatrics California Chapter 1 Partner Since 2022 Advancing New Standards in Reproductive Health (ANSIRH) Partner Since 2023 Beyond the Pill Partner Since 2015 Cutaneous Lymphoma Foundation Partner Since 2020 Farmers Market Coalition Partner Since 2021 HealthRIGHT 360 Partner Since 2019 Ibis Reproductive Health Services Partner Since 2020 Mandela Partners Protecting the environment and fighting climate change. Partner From 2022 To 2023 Audubon Canyon Ranch Partner Since 2017 Ecology Center Partner Since 2014 Edible Schoolyard Project Partner Since 2007 eLock Technologies Partner Since 2022 Environmental Grantmakers Association Partner Since 2019 Highstead Partner Since 2020 John Muir Land Trust Partner Since 2022 Just Zero Partner Since 2014 Leave No Trace Partner Since 2020 Northwest Avalanche Center (NWAC) Partner Since 2023 One Tree Planted Partner Since 2021 Payette Avalanche Center Partner Since 2022 Sempervirens Partner Since 2019 Sierra Avalanche Center Partner Since 2014 The Trust For Public Land Partner Since 2022 Utah Avalanche Center Working for social and economic justice for all. Partner Since 2021 A New Way of Life Partner Since 2022 Center for Constitutional Rights Partner Since 2021 Center for WorkLife Law Partner Since 2021 Common Cause Partner Since 2010 CompassPoint Partner Since 2021 Equality Action Center Partner Since 2018 Keshet Partner Since 2024 Labor Notes Partner Since 2022 Legal Link Partner Since 2022 Mirror Memoirs Partner Since 2013 Unbound Philanthropy Partner Since 2018 Migrant Justice Building connection through arts, culture, and food. Partner Since 2013 18 Reasons Partner Since 2021 Artists Communities Alliance Partner Since 2019 Authors Alliance Partner Since 2018 Company One Theatre Partner Since 2017 Howlround Theatre Commons Partner Since 2023 Lighthouse Writers Workshop Partner Since 2023 Museo de las Americas Partner Since 2013 Sacred Lands Film Project Improving the quality and accessibility of education. Partner Since 2022 Academy College Prep Partner From 2017 To 2022 Bellwether Education Partner Since 2020 California Community Colleges Transfer Guarantee Pathway to Historically Black Colleges and Universities Partner From 2019 To 2020 The College of Business at Oregon State University Partner Since 2011 Ignited Partner From 2018 To 2022 Maker Ed Partner Since 2014 myShakespeare Partner Since 2019 Umoja Community Education Foundation Using technology for good and defending digital rights and privacy. Partner Since 2014 Electronic Frontier Foundation Partner Since 2019 FreeBSD Foundation Partner From 2015 To 2016 Internet Archive Partner Since 2012 Society of Motion Picture & Television Engineers (SMPTE) Partner From 2013 To 2021 The TOR Project Partner Since 2014 USENIX Partner Since 2020 Women's Audio Mission Partner From 2013 To 2015 Wikimedia Foundation Non-profit Sectors Human Rights Health Environment Social Justice Arts & Culture Education Technology & Privacy ❮ How can we help? Get in touch Giant Rabbit LLC 415.355.4211 info@giantrabbit.com Copyright © 2018-2025 by Giant Rabbit LLC. Artwork by RBlack . | Read our privacy policy . | 2026-01-13T09:29:32 |
https://www.chinadaily.com.cn/china/coverstory | Cover Story - Chinadaily.com.cn Search HOME CHINA WORLD BUSINESS LIFESTYLE CULTURE TRAVEL VIDEO SPORTS OPINION REGIONAL NEWSPAPER MOBILE Global Edition ASIA 中文 双语 Français HOME CHINA WORLD BUSINESS LIFESTYLE CULTURE TRAVEL VIDEO SPORTS OPINION REGIONAL NEWSPAPER China Daily PDF China Daily E-paper MOBILE China News Society Innovation HK/Macao Cross-Strait Cover Story Photo Environment Health Military Video Home / China / Cover Story Home China Cover Story Chinese solution provides 'early warnings for all' 2026-01-13 08:53 Choir gives rural kids pluck to pursue dreams 2026-01-09 08:48 Data drives digital border security 2026-01-06 08:59 Turning nation's aging challenge into opportunity 2025-12-25 07:22 Struggling patient breathes easier after critical surgery 2025-12-16 08:44 Salt of the earth 2025-12-12 08:53 Cross-border rail rallies regional connectivity 2025-12-11 09:13 High-skilled generation 2025-12-09 08:53 Productive inclusion 2025-12-04 08:57 Museums showcase shared Chinese identity 2025-11-26 09:00 Paired support sends neonatal care to Nagqu 2025-11-21 09:02 Fitness training at your doorstep 2025-11-07 08:56 Graduates diversify career paths 2025-11-06 08:46 Global geopark in Tanzania revived with Chinese aid 2025-10-23 09:19 Shandong county customizes approach to elderly care 2025-10-17 08:58 Xinjiang encourages kids to get excited about science 2025-10-10 09:10 Refined legal services streamline border trade 2025-09-29 09:10 Attempts to rewrite history will never tear cultural roots 2025-09-26 08:51 Engineer empowers locals at Angolan hydropower project 2025-09-23 08:56 Organic farming transforms poor village's fortunes 2025-09-15 07:40 1 2 3 4 5 6 7 8 9 10 Next >>| 1/34 Next --> Latest China launches new AI model for agriculture China introduces national standard for valuing terrestrial ecosystems Government agencies announce regulations of online hiring information Ministry pledges to continue solid waste disposal crackdown Shandong upgrades ancient canal shipping with smart tech and cleaner ships Night view of Central Street in Harbin Exclusive Salute to everyday heroes A tech pro's lens on AI development Chinese AI company to showcase the warmth of technology at US exhibition Newsmaker Chinese couple turns 100,000 photos of Great Wall into a museum Beating the drum of heritage preservation Ten photos you don't wanna miss Ten photos from across China: Jan 2 - 8 Special Coverage Live: Hong Kong residential area fire 4th Plenary Session of the 20th CPC Central Committee From Qiushi Boosting High-Quality Belt and Road Cooperation Through Rigorous and Sustained Efforts China’s Hydropower: Empowering a Clean and Beautiful World Top BACK TO THE TOP English 中文 HOME CHINA WORLD BUSINESS LIFESTYLE CULTURE TRAVEL VIDEO SPORTS OPINION REGIONAL NEWSPAPER China Daily PDF China Daily E-paper MOBILE Copyright 1994 - . All rights reserved. The content (including but not limited to text, photo, multimedia information, etc) published in this site belongs to China Daily Information Co (CDIC). Without written authorization from CDIC, such content shall not be republished or used in any form. Note: Browsers with 1024*768 or higher resolution are suggested for this site. License for publishing multimedia online 0108263 Registration Number: 130349 About China Daily Advertise on Site Contact Us Job Offer Expat Employment FOLLOW US Copyright 1994 - . All rights reserved. The content (including but not limited to text, photo, multimedia information, etc) published in this site belongs to China Daily Information Co (CDIC). Without written authorization from CDIC, such content shall not be republished or used in any form. --> | 2026-01-13T09:29:32 |
http://groovy-lang.org/syntax.html#_java_style_array_initialization | The Apache Groovy programming language - Syntax Socialize Discuss on the mailing-list Groovy on X Groovy on Bluesky Groovy on Mastodon Groovy on LinkedIn Events and conferences Source code on GitHub Report issues in Jira Stack Overflow questions Slack Community You are using an outdated browser. Please upgrade your browser to improve your experience. Apache Groovy™ Learn Documentation Download Support Contribute Ecosystem Blog posts Socialize Table of contents 1. Comments 1.1. Single-line comment 1.2. Multiline comment 1.3. Groovydoc comment 1.4. Shebang line 2. Keywords 3. Identifiers 3.1. Normal identifiers 3.2. Quoted identifiers 4. Strings 4.1. Single-quoted string 4.2. String concatenation 4.3. Triple-single-quoted string 4.3.1. Escaping special characters 4.3.2. Unicode escape sequence 4.4. Double-quoted string 4.4.1. String interpolation 4.4.2. Special case of interpolating closure expressions 4.4.3. Interoperability with Java 4.4.4. GString and String hashCodes 4.5. Triple-double-quoted string 4.6. Slashy string 4.6.1. Special cases 4.7. Dollar slashy string 4.8. String summary table 4.9. Characters 5. Numbers 5.1. Integral literals 5.1.1. Alternative non-base 10 representations Binary literal Octal literal Hexadecimal literal 5.2. Decimal literals 5.3. Underscore in literals 5.4. Number type suffixes 5.5. Math operations 5.5.1. The case of the division operator 5.5.2. The case of the power operator 6. Booleans 7. Lists 8. Arrays 8.1. Java-style array initialization 9. Maps Syntax This chapter covers the syntax of the Groovy programming language. The grammar of the language derives from the Java grammar, but enhances it with specific constructs for Groovy, and allows certain simplifications. 1. Comments 1.1. Single-line comment Single-line comments start with // and can be found at any position in the line. The characters following // , until the end of the line, are considered part of the comment. // a standalone single line comment println "hello" // a comment till the end of the line 1.2. Multiline comment A multiline comment starts with /* and can be found at any position in the line. The characters following /* will be considered part of the comment, including new line characters, up to the first */ closing the comment. Multiline comments can thus be put at the end of a statement, or even inside a statement. /* a standalone multiline comment spanning two lines */ println "hello" /* a multiline comment starting at the end of a statement */ println 1 /* one */ + 2 /* two */ 1.3. Groovydoc comment Similarly to multiline comments, Groovydoc comments are multiline, but start with /** and end with */ . Lines following the first Groovydoc comment line can optionally start with a star * . Those comments are associated with: type definitions (classes, interfaces, enums, annotations), fields and properties definitions methods definitions Although the compiler will not complain about Groovydoc comments not being associated with the above language elements, you should prepend those constructs with the comment right before it. /** * A Class description */ class Person { /** the name of the person */ String name /** * Creates a greeting method for a certain person. * * @param otherPerson the person to greet * @return a greeting message */ String greet(String otherPerson) { "Hello ${otherPerson}" } } Groovydoc follows the same conventions as Java’s own Javadoc. So you’ll be able to use the same tags as with Javadoc. In addition, Groovy supports Runtime Groovydoc since 3.0.0, i.e. Groovydoc can be retained at runtime. Runtime Groovydoc is disabled by default. It can be enabled by adding JVM option -Dgroovy.attach.runtime.groovydoc=true The Runtime Groovydoc starts with /**@ and ends with */ , for example: /**@ * Some class groovydoc for Foo */ class Foo { /**@ * Some method groovydoc for bar */ void bar() { } } assert Foo.class.groovydoc.content.contains('Some class groovydoc for Foo') (1) assert Foo.class.getMethod('bar', new Class[0]).groovydoc.content.contains('Some method groovydoc for bar') (2) 1 Get the runtime groovydoc for class Foo 2 Get the runtime groovydoc for method bar 1.4. Shebang line Beside the single-line comment, there is a special line comment, often called the shebang line understood by UNIX systems which allows scripts to be run directly from the command-line, provided you have installed the Groovy distribution and the groovy command is available on the PATH . #!/usr/bin/env groovy println "Hello from the shebang line" The # character must be the first character of the file. Any indentation would yield a compilation error. 2. Keywords Groovy has the following reserved keywords: Table 1. Reserved Keywords abstract assert break case catch class const continue def default do else enum extends final finally for goto if implements import instanceof interface native new null non-sealed package public protected private return static strictfp super switch synchronized this threadsafe throw throws transient try while Of these, const , goto , strictfp , and threadsafe are not currently in use. The reserved keywords can’t in general be used for variable, field and method names. A trick allows methods to be defined having the same name as a keyword by surrounding the name in quotes as shown in the following example: // reserved keywords can be used for method names if quoted def "abstract"() { true } // when calling such methods, the name must be qualified using "this." this.abstract() Using such names might be confusing and is often best to avoid. The trick is primarily intended to enable certain Java integration scenarios and certain DSL scenarios where having "verbs" and "nouns" with the same name as keywords may be desirable. In addition, Groovy has the following contextual keywords: Table 2. Contextual Keywords as in permits record sealed trait var yields These words are only keywords in certain contexts and can be more freely used in some places, in particular for variables, fields and method names. This extra lenience allows using method or variable names that were not keywords in earlier versions of Groovy or are not keywords in Java. Examples are shown here: // contextual keywords can be used for field and variable names def as = true assert as // contextual keywords can be used for method names def in() { true } // when calling such methods, the name only needs to be qualified using "this." in scenarios which would be ambiguous this.in() Groovy programmers familiar with these contextual keywords may still wish to avoid using those names unless there is a good reason to use such a name. The restrictions on reserved keywords also apply for the primitive types, the boolean literals and the null literal (all of which are discussed later): Table 3. Other reserved words null true false boolean char byte short int long float double While not recommended, the same trick as for reserved keywords can be used: def "null"() { true } // not recommended; potentially confusing assert this.null() // must be qualified Using such words as method names is potentially confusing and is often best to avoid, however, it might be useful for certain kinds of DSLs . 3. Identifiers 3.1. Normal identifiers Identifiers start with a letter, a dollar or an underscore. They cannot start with a number. A letter can be in the following ranges: 'a' to 'z' (lowercase ascii letter) 'A' to 'Z' (uppercase ascii letter) '\u00C0' to '\u00D6' '\u00D8' to '\u00F6' '\u00F8' to '\u00FF' '\u0100' to '\uFFFE' Then following characters can contain letters and numbers. Here are a few examples of valid identifiers (here, variable names): def name def item3 def with_underscore def $dollarStart But the following ones are invalid identifiers: def 3tier def a+b def a#b All keywords are also valid identifiers when following a dot: foo.as foo.assert foo.break foo.case foo.catch 3.2. Quoted identifiers Quoted identifiers appear after the dot of a dotted expression. For instance, the name part of the person.name expression can be quoted with person."name" or person.'name' . This is particularly interesting when certain identifiers contain illegal characters that are forbidden by the Java Language Specification, but which are allowed by Groovy when quoted. For example, characters like a dash, a space, an exclamation mark, etc. def map = [:] map."an identifier with a space and double quotes" = "ALLOWED" map.'with-dash-signs-and-single-quotes' = "ALLOWED" assert map."an identifier with a space and double quotes" == "ALLOWED" assert map.'with-dash-signs-and-single-quotes' == "ALLOWED" As we shall see in the following section on strings , Groovy provides different string literals. All kind of strings are actually allowed after the dot: map.'single quote' map."double quote" map.'''triple single quote''' map."""triple double quote""" map./slashy string/ map.$/dollar slashy string/$ There’s a difference between plain character strings and Groovy’s GStrings (interpolated strings), as in that the latter case, the interpolated values are inserted in the final string for evaluating the whole identifier: def firstname = "Homer" map."Simpson-${firstname}" = "Homer Simpson" assert map.'Simpson-Homer' == "Homer Simpson" 4. Strings Text literals are represented in the form of chain of characters called strings. Groovy lets you instantiate java.lang.String objects, as well as GStrings ( groovy.lang.GString ) which are also called interpolated strings in other programming languages. 4.1. Single-quoted string Single-quoted strings are a series of characters surrounded by single quotes: 'a single-quoted string' Single-quoted strings are plain java.lang.String and don’t support interpolation. 4.2. String concatenation All the Groovy strings can be concatenated with the + operator: assert 'ab' == 'a' + 'b' 4.3. Triple-single-quoted string Triple-single-quoted strings are a series of characters surrounded by triplets of single quotes: '''a triple-single-quoted string''' Triple-single-quoted strings are plain java.lang.String and don’t support interpolation. Triple-single-quoted strings may span multiple lines. The content of the string can cross line boundaries without the need to split the string in several pieces and without concatenation or newline escape characters: def aMultilineString = '''line one line two line three''' If your code is indented, for example in the body of the method of a class, your string will contain the whitespace of the indentation. The Groovy Development Kit contains methods for stripping out the indentation with the String#stripIndent() method, and with the String#stripMargin() method that takes a delimiter character to identify the text to remove from the beginning of a string. When creating a string as follows: def startingAndEndingWithANewline = ''' line one line two line three ''' You will notice that the resulting string contains a newline character as first character. It is possible to strip that character by escaping the newline with a backslash: def strippedFirstNewline = '''\ line one line two line three ''' assert !strippedFirstNewline.startsWith('\n') 4.3.1. Escaping special characters You can escape single quotes with the backslash character to avoid terminating the string literal: 'an escaped single quote: \' needs a backslash' And you can escape the escape character itself with a double backslash: 'an escaped escape character: \\ needs a double backslash' Some special characters also use the backslash as escape character: Escape sequence Character \b backspace \f formfeed \n newline \r carriage return \s single space \t tabulation \\ backslash \' single quote within a single-quoted string (and optional for triple-single-quoted and double-quoted strings) \" double quote within a double-quoted string (and optional for triple-double-quoted and single-quoted strings) We’ll see some more escaping details when it comes to other types of strings discussed later. 4.3.2. Unicode escape sequence For characters that are not present on your keyboard, you can use unicode escape sequences: a backslash, followed by 'u', then 4 hexadecimal digits. For example, the Euro currency symbol can be represented with: 'The Euro currency symbol: \u20AC' 4.4. Double-quoted string Double-quoted strings are a series of characters surrounded by double quotes: "a double-quoted string" Double-quoted strings are plain java.lang.String if there’s no interpolated expression, but are groovy.lang.GString instances if interpolation is present. To escape a double quote, you can use the backslash character: "A double quote: \"". 4.4.1. String interpolation Any Groovy expression can be interpolated in all string literals, apart from single and triple-single-quoted strings. Interpolation is the act of replacing a placeholder in the string with its value upon evaluation of the string. The placeholder expressions are surrounded by ${} . The curly braces may be omitted for unambiguous dotted expressions, i.e. we can use just a $ prefix in those cases. If the GString is ever passed to a method taking a String, the expression value inside the placeholder is evaluated to its string representation (by calling toString() on that expression) and the resulting String is passed to the method. Here, we have a string with a placeholder referencing a local variable: def name = 'Guillaume' // a plain string def greeting = "Hello ${name}" assert greeting.toString() == 'Hello Guillaume' Any Groovy expression is valid, as we can see in this example with an arithmetic expression: def sum = "The sum of 2 and 3 equals ${2 + 3}" assert sum.toString() == 'The sum of 2 and 3 equals 5' Not only are expressions allowed in between the ${} placeholder, but so are statements. However, a statement’s value is just null . So if several statements are inserted in that placeholder, the last one should somehow return a meaningful value to be inserted. For instance, "The sum of 1 and 2 is equal to ${def a = 1; def b = 2; a + b}" is supported and works as expected but a good practice is usually to stick to simple expressions inside GString placeholders. In addition to ${} placeholders, we can also use a lone $ sign prefixing a dotted expression: def person = [name: 'Guillaume', age: 36] assert "$person.name is $person.age years old" == 'Guillaume is 36 years old' But only dotted expressions of the form a.b , a.b.c , etc, are valid. Expressions containing parentheses like method calls, curly braces for closures, dots which aren’t part of a property expression or arithmetic operators would be invalid. Given the following variable definition of a number: def number = 3.14 The following statement will throw a groovy.lang.MissingPropertyException because Groovy believes you’re trying to access the toString property of that number, which doesn’t exist: shouldFail(MissingPropertyException) { println "$number.toString()" } You can think of "$number.toString()" as being interpreted by the parser as "${number.toString}()" . Similarly, if the expression is ambiguous, you need to keep the curly braces: String thing = 'treasure' assert 'The x-coordinate of the treasure is represented by treasure.x' == "The x-coordinate of the $thing is represented by $thing.x" // <= Not allowed: ambiguous!! assert 'The x-coordinate of the treasure is represented by treasure.x' == "The x-coordinate of the $thing is represented by ${thing}.x" // <= Curly braces required If you need to escape the $ or ${} placeholders in a GString so they appear as is without interpolation, you just need to use a \ backslash character to escape the dollar sign: assert '$5' == "\$5" assert '${name}' == "\${name}" 4.4.2. Special case of interpolating closure expressions So far, we’ve seen we could interpolate arbitrary expressions inside the ${} placeholder, but there is a special case and notation for closure expressions. When the placeholder contains an arrow, ${→} , the expression is actually a closure expression — you can think of it as a closure with a dollar prepended in front of it: def sParameterLessClosure = "1 + 2 == ${-> 3}" (1) assert sParameterLessClosure == '1 + 2 == 3' def sOneParamClosure = "1 + 2 == ${ w -> w << 3}" (2) assert sOneParamClosure == '1 + 2 == 3' 1 The closure is a parameterless closure which doesn’t take arguments. 2 Here, the closure takes a single java.io.StringWriter argument, to which you can append content with the << leftShift operator. In either case, both placeholders are embedded closures. In appearance, it looks like a more verbose way of defining expressions to be interpolated, but closures have an interesting advantage over mere expressions: lazy evaluation. Let’s consider the following sample: def number = 1 (1) def eagerGString = "value == ${number}" def lazyGString = "value == ${ -> number }" assert eagerGString == "value == 1" (2) assert lazyGString == "value == 1" (3) number = 2 (4) assert eagerGString == "value == 1" (5) assert lazyGString == "value == 2" (6) 1 We define a number variable containing 1 that we then interpolate within two GStrings, as an expression in eagerGString and as a closure in lazyGString . 2 We expect the resulting string to contain the same string value of 1 for eagerGString . 3 Similarly for lazyGString 4 Then we change the value of the variable to a new number 5 With a plain interpolated expression, the value was actually bound at the time of creation of the GString. 6 But with a closure expression, the closure is called upon each coercion of the GString into String, resulting in an updated string containing the new number value. An embedded closure expression taking more than one parameter will generate an exception at runtime. Only closures with zero or one parameter are allowed. 4.4.3. Interoperability with Java When a method (whether implemented in Java or Groovy) expects a java.lang.String , but we pass a groovy.lang.GString instance, the toString() method of the GString is automatically and transparently called. String takeString(String message) { (4) assert message instanceof String (5) return message } def message = "The message is ${'hello'}" (1) assert message instanceof GString (2) def result = takeString(message) (3) assert result instanceof String assert result == 'The message is hello' 1 We create a GString variable 2 We double-check it’s an instance of the GString 3 We then pass that GString to a method taking a String as parameter 4 The signature of the takeString() method explicitly says its sole parameter is a String 5 We also verify that the parameter is indeed a String and not a GString. 4.4.4. GString and String hashCodes Although interpolated strings can be used in lieu of plain Java strings, they differ with strings in a particular way: their hashCodes are different. Plain Java strings are immutable, whereas the resulting String representation of a GString can vary, depending on its interpolated values. Even for the same resulting string, GStrings and Strings don’t have the same hashCode. assert "one: ${1}".hashCode() != "one: 1".hashCode() GString and Strings having different hashCode values, using GString as Map keys should be avoided, especially if we try to retrieve an associated value with a String instead of a GString. def key = "a" def m = ["${key}": "letter ${key}"] (1) assert m["a"] == null (2) 1 The map is created with an initial pair whose key is a GString 2 When we try to fetch the value with a String key, we will not find it, as Strings and GString have different hashCode values 4.5. Triple-double-quoted string Triple-double-quoted strings behave like double-quoted strings, with the addition that they are multiline, like the triple-single-quoted strings. def name = 'Groovy' def template = """ Dear Mr ${name}, You're the winner of the lottery! Yours sincerly, Dave """ assert template.toString().contains('Groovy') Neither double quotes nor single quotes need be escaped in triple-double-quoted strings. 4.6. Slashy string Beyond the usual quoted strings, Groovy offers slashy strings, which use / as the opening and closing delimiter. Slashy strings are particularly useful for defining regular expressions and patterns, as there is no need to escape backslashes. Example of a slashy string: def fooPattern = /.*foo.*/ assert fooPattern == '.*foo.*' Only forward slashes need to be escaped with a backslash: def escapeSlash = /The character \/ is a forward slash/ assert escapeSlash == 'The character / is a forward slash' Slashy strings are multiline: def multilineSlashy = /one two three/ assert multilineSlashy.contains('\n') Slashy strings can be thought of as just another way to define a GString but with different escaping rules. They hence support interpolation: def color = 'blue' def interpolatedSlashy = /a ${color} car/ assert interpolatedSlashy == 'a blue car' 4.6.1. Special cases An empty slashy string cannot be represented with a double forward slash, as it’s understood by the Groovy parser as a line comment. That’s why the following assert would actually not compile as it would look like a non-terminated statement: assert '' == // As slashy strings were mostly designed to make regexp easier so a few things that are errors in GStrings like $() or $5 will work with slashy strings. Remember that escaping backslashes is not required. An alternative way of thinking of this is that in fact escaping is not supported. The slashy string /\t/ won’t contain a tab but instead a backslash followed by the character 't'. Escaping is only allowed for the slash character, i.e. /\/folder/ will be a slashy string containing '/folder' . A consequence of slash escaping is that a slashy string can’t end with a backslash. Otherwise that will escape the slashy string terminator. You can instead use a special trick, /ends with slash ${'\\'}/ . But best just avoid using a slashy string in such a case. 4.7. Dollar slashy string Dollar slashy strings are multiline GStrings delimited with an opening $/ and a closing /$ . The escaping character is the dollar sign, and it can escape another dollar, or a forward slash. Escaping for the dollar and forward slash characters is only needed where conflicts arise with the special use of those characters. The characters $foo would normally indicate a GString placeholder, so those four characters can be entered into a dollar slashy string by escaping the dollar, i.e. $$foo . Similarly, you will need to escape a dollar slashy closing delimiter if you want it to appear in your string. Here are a few examples: def name = "Guillaume" def date = "April, 1st" def dollarSlashy = $/ Hello $name, today we're ${date}. $ dollar sign $$ escaped dollar sign \ backslash / forward slash $/ escaped forward slash $$$/ escaped opening dollar slashy $/$$ escaped closing dollar slashy /$ assert [ 'Guillaume', 'April, 1st', '$ dollar sign', '$ escaped dollar sign', '\\ backslash', '/ forward slash', '/ escaped forward slash', '$/ escaped opening dollar slashy', '/$ escaped closing dollar slashy' ].every { dollarSlashy.contains(it) } It was created to overcome some of the limitations of the slashy string escaping rules. Use it when its escaping rules suit your string contents (typically if it has some slashes you don’t want to escape). 4.8. String summary table String name String syntax Interpolated Multiline Escape character Single-quoted '…​' \ Triple-single-quoted '''…​''' \ Double-quoted "…​" \ Triple-double-quoted """…​""" \ Slashy /…​/ \ Dollar slashy $/…​/$ $ 4.9. Characters Unlike Java, Groovy doesn’t have an explicit character literal. However, you can be explicit about making a Groovy string an actual character, by three different means: char c1 = 'A' (1) assert c1 instanceof Character def c2 = 'B' as char (2) assert c2 instanceof Character def c3 = (char)'C' (3) assert c3 instanceof Character 1 by being explicit when declaring a variable holding the character by specifying the char type 2 by using type coercion with the as operator 3 by using a cast to char operation The first option 1 is interesting when the character is held in a variable, while the other two ( 2 and 3 ) are more interesting when a char value must be passed as argument of a method call. 5. Numbers Groovy supports different kinds of integral literals and decimal literals, backed by the usual Number types of Java. 5.1. Integral literals The integral literal types are the same as in Java: byte char short int long java.math.BigInteger You can create integral numbers of those types with the following declarations: // primitive types byte b = 1 char c = 2 short s = 3 int i = 4 long l = 5 // infinite precision BigInteger bi = 6 If you use optional typing by using the def keyword, the type of the integral number will vary: it’ll adapt to the capacity of the type that can hold that number. For positive numbers: def a = 1 assert a instanceof Integer // Integer.MAX_VALUE def b = 2147483647 assert b instanceof Integer // Integer.MAX_VALUE + 1 def c = 2147483648 assert c instanceof Long // Long.MAX_VALUE def d = 9223372036854775807 assert d instanceof Long // Long.MAX_VALUE + 1 def e = 9223372036854775808 assert e instanceof BigInteger As well as for negative numbers: def na = -1 assert na instanceof Integer // Integer.MIN_VALUE def nb = -2147483648 assert nb instanceof Integer // Integer.MIN_VALUE - 1 def nc = -2147483649 assert nc instanceof Long // Long.MIN_VALUE def nd = -9223372036854775808 assert nd instanceof Long // Long.MIN_VALUE - 1 def ne = -9223372036854775809 assert ne instanceof BigInteger 5.1.1. Alternative non-base 10 representations Numbers can also be represented in binary, octal, hexadecimal and decimal bases. Binary literal Binary numbers start with a 0b prefix: int xInt = 0b10101111 assert xInt == 175 short xShort = 0b11001001 assert xShort == 201 as short byte xByte = 0b11 assert xByte == 3 as byte long xLong = 0b101101101101 assert xLong == 2925l BigInteger xBigInteger = 0b111100100001 assert xBigInteger == 3873g int xNegativeInt = -0b10101111 assert xNegativeInt == -175 Octal literal Octal numbers are specified in the typical format of 0 followed by octal digits. int xInt = 077 assert xInt == 63 short xShort = 011 assert xShort == 9 as short byte xByte = 032 assert xByte == 26 as byte long xLong = 0246 assert xLong == 166l BigInteger xBigInteger = 01111 assert xBigInteger == 585g int xNegativeInt = -077 assert xNegativeInt == -63 Hexadecimal literal Hexadecimal numbers are specified in the typical format of 0x followed by hex digits. int xInt = 0x77 assert xInt == 119 short xShort = 0xaa assert xShort == 170 as short byte xByte = 0x3a assert xByte == 58 as byte long xLong = 0xffff assert xLong == 65535l BigInteger xBigInteger = 0xaaaa assert xBigInteger == 43690g Double xDouble = new Double('0x1.0p0') assert xDouble == 1.0d int xNegativeInt = -0x77 assert xNegativeInt == -119 5.2. Decimal literals The decimal literal types are the same as in Java: float double java.math.BigDecimal You can create decimal numbers of those types with the following declarations: // primitive types float f = 1.234 double d = 2.345 // infinite precision BigDecimal bd = 3.456 Decimals can use exponents, with the e or E exponent letter, followed by an optional sign, and an integral number representing the exponent: assert 1e3 == 1_000.0 assert 2E4 == 20_000.0 assert 3e+1 == 30.0 assert 4E-2 == 0.04 assert 5e-1 == 0.5 Conveniently for exact decimal number calculations, Groovy chooses java.math.BigDecimal as its decimal number type. In addition, both float and double are supported, but require an explicit type declaration, type coercion or suffix. Even if BigDecimal is the default for decimal numbers, such literals are accepted in methods or closures taking float or double as parameter types. Decimal numbers can’t be represented using a binary, octal or hexadecimal representation. 5.3. Underscore in literals When writing long literal numbers, it’s harder on the eye to figure out how some numbers are grouped together, for example with groups of thousands, of words, etc. By allowing you to place underscore in number literals, it’s easier to spot those groups: long creditCardNumber = 1234_5678_9012_3456L long socialSecurityNumbers = 999_99_9999L double monetaryAmount = 12_345_132.12 long hexBytes = 0xFF_EC_DE_5E long hexWords = 0xFFEC_DE5E long maxLong = 0x7fff_ffff_ffff_ffffL long alsoMaxLong = 9_223_372_036_854_775_807L long bytes = 0b11010010_01101001_10010100_10010010 5.4. Number type suffixes We can force a number (including binary, octals and hexadecimals) to have a specific type by giving a suffix (see table below), either uppercase or lowercase. Type Suffix BigInteger G or g Long L or l Integer I or i BigDecimal G or g Double D or d Float F or f Examples: assert 42I == Integer.valueOf('42') assert 42i == Integer.valueOf('42') // lowercase i more readable assert 123L == Long.valueOf("123") // uppercase L more readable assert 2147483648 == Long.valueOf('2147483648') // Long type used, value too large for an Integer assert 456G == new BigInteger('456') assert 456g == new BigInteger('456') assert 123.45 == new BigDecimal('123.45') // default BigDecimal type used assert .321 == new BigDecimal('.321') assert 1.200065D == Double.valueOf('1.200065') assert 1.234F == Float.valueOf('1.234') assert 1.23E23D == Double.valueOf('1.23E23') assert 0b1111L.class == Long // binary assert 0xFFi.class == Integer // hexadecimal assert 034G.class == BigInteger // octal 5.5. Math operations Although operators are covered in more detail elsewhere, it’s important to discuss the behavior of math operations and what their resulting types are. Division and power binary operations aside (covered below), binary operations between byte , char , short and int result in int binary operations involving long with byte , char , short and int result in long binary operations involving BigInteger and any other integral type result in BigInteger binary operations involving BigDecimal with byte , char , short , int and BigInteger result in BigDecimal binary operations between float , double and BigDecimal result in double binary operations between two BigDecimal result in BigDecimal The following table summarizes those rules: byte char short int long BigInteger float double BigDecimal byte int int int int long BigInteger double double BigDecimal char int int int long BigInteger double double BigDecimal short int int long BigInteger double double BigDecimal int int long BigInteger double double BigDecimal long long BigInteger double double BigDecimal BigInteger BigInteger double double BigDecimal float double double double double double double BigDecimal BigDecimal Thanks to Groovy’s operator overloading, the usual arithmetic operators work as well with BigInteger and BigDecimal , unlike in Java where you have to use explicit methods for operating on those numbers. 5.5.1. The case of the division operator The division operators / (and /= for division and assignment) produce a double result if either operand is a float or double , and a BigDecimal result otherwise (when both operands are any combination of an integral type short , char , byte , int , long , BigInteger or BigDecimal ). BigDecimal division is performed with the divide() method if the division is exact (i.e. yielding a result that can be represented within the bounds of the same precision and scale), or using a MathContext with a precision of the maximum of the two operands' precision plus an extra precision of 10, and a scale of the maximum of 10 and the maximum of the operands' scale. For integer division like in Java, you should use the intdiv() method, as Groovy doesn’t provide a dedicated integer division operator symbol. 5.5.2. The case of the power operator The power operation is represented by the ** operator, with two parameters: the base and the exponent. The result of the power operation depends on its operands, and the result of the operation (in particular if the result can be represented as an integral value). The following rules are used by Groovy’s power operation to determine the resulting type: If the exponent is a decimal value if the result can be represented as an Integer , then return an Integer else if the result can be represented as a Long , then return a Long otherwise return a Double If the exponent is an integral value if the exponent is strictly negative, then return an Integer , Long or Double if the result value fits in that type if the exponent is positive or zero if the base is a BigDecimal , then return a BigDecimal result value if the base is a BigInteger , then return a BigInteger result value if the base is an Integer , then return an Integer if the result value fits in it, otherwise a BigInteger if the base is a Long , then return a Long if the result value fits in it, otherwise a BigInteger We can illustrate those rules with a few examples: // base and exponent are ints and the result can be represented by an Integer assert 2 ** 3 instanceof Integer // 8 assert 10 ** 9 instanceof Integer // 1_000_000_000 // the base is a long, so fit the result in a Long // (although it could have fit in an Integer) assert 5L ** 2 instanceof Long // 25 // the result can't be represented as an Integer or Long, so return a BigInteger assert 100 ** 10 instanceof BigInteger // 10e20 assert 1234 ** 123 instanceof BigInteger // 170515806212727042875... // the base is a BigDecimal and the exponent a negative int // but the result can be represented as an Integer assert 0.5 ** -2 instanceof Integer // 4 // the base is an int, and the exponent a negative float // but again, the result can be represented as an Integer assert 1 ** -0.3f instanceof Integer // 1 // the base is an int, and the exponent a negative int // but the result will be calculated as a Double // (both base and exponent are actually converted to doubles) assert 10 ** -1 instanceof Double // 0.1 // the base is a BigDecimal, and the exponent is an int, so return a BigDecimal assert 1.2 ** 10 instanceof BigDecimal // 6.1917364224 // the base is a float or double, and the exponent is an int // but the result can only be represented as a Double value assert 3.4f ** 5 instanceof Double // 454.35430372146965 assert 5.6d ** 2 instanceof Double // 31.359999999999996 // the exponent is a decimal value // and the result can only be represented as a Double value assert 7.8 ** 1.9 instanceof Double // 49.542708423868476 assert 2 ** 0.1f instanceof Double // 1.0717734636432956 6. Booleans Boolean is a special data type that is used to represent truth values: true and false . Use this data type for simple flags that track true/false conditions . Boolean values can be stored in variables, assigned into fields, just like any other data type: def myBooleanVariable = true boolean untypedBooleanVar = false booleanField = true true and false are the only two primitive boolean values. But more complex boolean expressions can be represented using logical operators . In addition, Groovy has special rules (often referred to as Groovy Truth ) for coercing non-boolean objects to a boolean value. 7. Lists Groovy uses a comma-separated list of values, surrounded by square brackets, to denote lists. Groovy lists are plain JDK java.util.List , as Groovy doesn’t define its own collection classes. The concrete list implementation used when defining list literals are java.util.ArrayList by default, unless you decide to specify otherwise, as we shall see later on. def numbers = [1, 2, 3] (1) assert numbers instanceof List (2) assert numbers.size() == 3 (3) 1 We define a list numbers delimited by commas and surrounded by square brackets, and we assign that list into a variable 2 The list is an instance of Java’s java.util.List interface 3 The size of the list can be queried with the size() method, and shows our list contains 3 elements In the above example, we used a homogeneous list, but you can also create lists containing values of heterogeneous types: def heterogeneous = [1, "a", true] (1) 1 Our list here contains a number, a string and a boolean value We mentioned that by default, list literals are actually instances of java.util.ArrayList , but it is possible to use a different backing type for our lists, thanks to using type coercion with the as operator, or with explicit type declaration for your variables: def arrayList = [1, 2, 3] assert arrayList instanceof java.util.ArrayList def linkedList = [2, 3, 4] as LinkedList (1) assert linkedList instanceof java.util.LinkedList LinkedList otherLinked = [3, 4, 5] (2) assert otherLinked instanceof java.util.LinkedList 1 We use coercion with the as operator to explicitly request a java.util.LinkedList implementation 2 We can say that the variable holding the list literal is of type java.util.LinkedList You can access elements of the list with the [] subscript operator (both for reading and setting values) with positive indices or negative indices to access elements from the end of the list, as well as with ranges, and use the << leftShift operator to append elements to a list: def letters = ['a', 'b', 'c', 'd'] assert letters[0] == 'a' (1) assert letters[1] == 'b' assert letters[-1] == 'd' (2) assert letters[-2] == 'c' letters[2] = 'C' (3) assert letters[2] == 'C' letters << 'e' (4) assert letters[ 4] == 'e' assert letters[-1] == 'e' assert letters[1, 3] == ['b', 'd'] (5) assert letters[2..4] == ['C', 'd', 'e'] (6) 1 Access the first element of the list (zero-based counting) 2 Access the last element of the list with a negative index: -1 is the first element from the end of the list 3 Use an assignment to set a new value for the third element of the list 4 Use the << leftShift operator to append an element at the end of the list 5 Access two elements at once, returning a new list containing those two elements 6 Use a range to access a range of values from the list, from a start to an end element position As lists can be heterogeneous in nature, lists can also contain other lists to create multidimensional lists: def multi = [[0, 1], [2, 3]] (1) assert multi[1][0] == 2 (2) 1 Define a list of numbers 2 Access the second element of the top-most list, and the first element of the inner list 8. Arrays Groovy reuses the list notation for arrays, but to make such literals arrays, you need to explicitly define the type of the array through coercion or type declaration. String[] arrStr = ['Ananas', 'Banana', 'Kiwi'] (1) assert arrStr instanceof String[] (2) assert !(arrStr instanceof List) def numArr = [1, 2, 3] as int[] (3) assert numArr instanceof int[] (4) assert numArr.size() == 3 1 Define an array of strings using explicit variable type declaration 2 Assert that we created an array of strings 3 Create an array of ints with the as operator 4 Assert that we created an array of primitive ints You can also create multi-dimensional arrays: def matrix3 = new Integer[3][3] (1) assert matrix3.size() == 3 Integer[][] matrix2 (2) matrix2 = [[1, 2], [3, 4]] assert matrix2 instanceof Integer[][] 1 You can define the bounds of a new array 2 Or declare an array without specifying its bounds Access to elements of an array follows the same notation as for lists: String[] names = ['Cédric', 'Guillaume', 'Jochen', 'Paul'] assert names[0] == 'Cédric' (1) names[2] = 'Blackdrag' (2) assert names[2] == 'Blackdrag' 1 Retrieve the first element of the array 2 Set the value of the third element of the array to a new value 8.1. Java-style array initialization Groovy has always supported literal list/array definitions using square brackets and has avoided Java-style curly braces so as not to conflict with closure definitions. In the case where the curly braces come immediately after an array type declaration however, there is no ambiguity with closure definitions, so Groovy 3 and above support that variant of the Java array initialization expression. Examples: def primes = new int[] {2, 3, 5, 7, 11} assert primes.size() == 5 && primes.sum() == 28 assert primes.class.name == '[I' def pets = new String[] {'cat', 'dog'} assert pets.size() == 2 && pets.sum() == 'catdog' assert pets.class.name == '[Ljava.lang.String;' // traditional Groovy alternative still supported String[] groovyBooks = [ 'Groovy in Action', 'Making Java Groovy' ] assert groovyBooks.every{ it.contains('Groovy') } 9. Maps Sometimes called dictionaries or associative arrays in other languages, Groovy features maps. Maps associate keys to values, separating keys and values with colons, and each key/value pairs with commas, and the whole keys and values surrounded by square brackets. def colors = [red: '#FF0000', green: '#00FF00', blue: '#0000FF'] (1) assert colors['red'] == '#FF0000' (2) assert colors.green == '#00FF00' (3) colors['pink'] = '#FF00FF' (4) colors.yellow = '#FFFF00' (5) assert colors.pink == '#FF00FF' assert colors['yellow'] == '#FFFF00' assert colors instanceof java.util.LinkedHashMap 1 We define a map of string color names, associated with their hexadecimal-coded html colors 2 We use the subscript notation to check the content associated with the red key 3 We can also use the property notation to assert the color green’s hexadecimal representation 4 Similarly, we can use the subscript notation to add a new key/value pair 5 Or the property notation, to add the yellow color When using names for the keys, we actually define string keys in the map. Groovy creates maps that are actually instances of java.util.LinkedHashMap . If you try to access a key which is not present in the map: assert colors.unknown == null def emptyMap = [:] assert emptyMap.anyKey == null You will retrieve a null result. In the examples above, we used string keys, but you can also use values of other types as keys: def numbers = [1: 'one', 2: 'two'] assert numbers[1] == 'one' Here, we used numbers as keys, as numbers can unambiguously be recognized as numbers, so Groovy will not create a string key like in our previous examples. But consider the case you want to pass a variable in lieu of the key, to have the value of that variable become the key: def key = 'name' def person = [key: 'Guillaume'] (1) assert !person.containsKey('name') (2) assert person.containsKey('key') (3) 1 The key associated with the 'Guillaume' name will actually be the "key" string, not the value associated with the key variable 2 The map doesn’t contain the 'name' key 3 Instead, the map contains a 'key' key You can also pass quoted strings as well as keys: ["name": "Guillaume"]. This is mandatory if your key string isn’t a valid identifier, for example if you wanted to create a string key containing a dash like in: ["street-name": "Main street"]. When you need to pass variable values as keys in your map definitions, you must surround the variable or expression with parentheses: person = [(key): 'Guillaume'] (1) assert person.containsKey('name') (2) assert !person.containsKey('key') (3) 1 This time, we surround the key variable with parentheses, to instruct the parser we are passing a variable rather than defining a string key 2 The map does contain the name key 3 But the map doesn’t contain the key key as before Groovy Learn Documentation Download Support Contribute Ecosystem Blog posts About Source code Security Books Thanks Sponsorship FAQ Search Socialize Discuss on the mailing-list Groovy on X Groovy on Bluesky Groovy on Mastodon Groovy on LinkedIn Events and conferences Source code on GitHub Report issues in Jira Stack Overflow questions Slack Community The Groovy programming language is supported by the Apache Software Foundation and the Groovy community. Apache, Apache Groovy, Groovy, and the ASF logo are either registered trademarks or trademarks of The Apache Software Foundation. © 2003-2025 the Apache Groovy project — Groovy is Open Source: license , privacy policy . | 2026-01-13T09:29:32 |
http://groovy-lang.org/syntax.html#_comments | The Apache Groovy programming language - Syntax Socialize Discuss on the mailing-list Groovy on X Groovy on Bluesky Groovy on Mastodon Groovy on LinkedIn Events and conferences Source code on GitHub Report issues in Jira Stack Overflow questions Slack Community You are using an outdated browser. Please upgrade your browser to improve your experience. Apache Groovy™ Learn Documentation Download Support Contribute Ecosystem Blog posts Socialize Table of contents 1. Comments 1.1. Single-line comment 1.2. Multiline comment 1.3. Groovydoc comment 1.4. Shebang line 2. Keywords 3. Identifiers 3.1. Normal identifiers 3.2. Quoted identifiers 4. Strings 4.1. Single-quoted string 4.2. String concatenation 4.3. Triple-single-quoted string 4.3.1. Escaping special characters 4.3.2. Unicode escape sequence 4.4. Double-quoted string 4.4.1. String interpolation 4.4.2. Special case of interpolating closure expressions 4.4.3. Interoperability with Java 4.4.4. GString and String hashCodes 4.5. Triple-double-quoted string 4.6. Slashy string 4.6.1. Special cases 4.7. Dollar slashy string 4.8. String summary table 4.9. Characters 5. Numbers 5.1. Integral literals 5.1.1. Alternative non-base 10 representations Binary literal Octal literal Hexadecimal literal 5.2. Decimal literals 5.3. Underscore in literals 5.4. Number type suffixes 5.5. Math operations 5.5.1. The case of the division operator 5.5.2. The case of the power operator 6. Booleans 7. Lists 8. Arrays 8.1. Java-style array initialization 9. Maps Syntax This chapter covers the syntax of the Groovy programming language. The grammar of the language derives from the Java grammar, but enhances it with specific constructs for Groovy, and allows certain simplifications. 1. Comments 1.1. Single-line comment Single-line comments start with // and can be found at any position in the line. The characters following // , until the end of the line, are considered part of the comment. // a standalone single line comment println "hello" // a comment till the end of the line 1.2. Multiline comment A multiline comment starts with /* and can be found at any position in the line. The characters following /* will be considered part of the comment, including new line characters, up to the first */ closing the comment. Multiline comments can thus be put at the end of a statement, or even inside a statement. /* a standalone multiline comment spanning two lines */ println "hello" /* a multiline comment starting at the end of a statement */ println 1 /* one */ + 2 /* two */ 1.3. Groovydoc comment Similarly to multiline comments, Groovydoc comments are multiline, but start with /** and end with */ . Lines following the first Groovydoc comment line can optionally start with a star * . Those comments are associated with: type definitions (classes, interfaces, enums, annotations), fields and properties definitions methods definitions Although the compiler will not complain about Groovydoc comments not being associated with the above language elements, you should prepend those constructs with the comment right before it. /** * A Class description */ class Person { /** the name of the person */ String name /** * Creates a greeting method for a certain person. * * @param otherPerson the person to greet * @return a greeting message */ String greet(String otherPerson) { "Hello ${otherPerson}" } } Groovydoc follows the same conventions as Java’s own Javadoc. So you’ll be able to use the same tags as with Javadoc. In addition, Groovy supports Runtime Groovydoc since 3.0.0, i.e. Groovydoc can be retained at runtime. Runtime Groovydoc is disabled by default. It can be enabled by adding JVM option -Dgroovy.attach.runtime.groovydoc=true The Runtime Groovydoc starts with /**@ and ends with */ , for example: /**@ * Some class groovydoc for Foo */ class Foo { /**@ * Some method groovydoc for bar */ void bar() { } } assert Foo.class.groovydoc.content.contains('Some class groovydoc for Foo') (1) assert Foo.class.getMethod('bar', new Class[0]).groovydoc.content.contains('Some method groovydoc for bar') (2) 1 Get the runtime groovydoc for class Foo 2 Get the runtime groovydoc for method bar 1.4. Shebang line Beside the single-line comment, there is a special line comment, often called the shebang line understood by UNIX systems which allows scripts to be run directly from the command-line, provided you have installed the Groovy distribution and the groovy command is available on the PATH . #!/usr/bin/env groovy println "Hello from the shebang line" The # character must be the first character of the file. Any indentation would yield a compilation error. 2. Keywords Groovy has the following reserved keywords: Table 1. Reserved Keywords abstract assert break case catch class const continue def default do else enum extends final finally for goto if implements import instanceof interface native new null non-sealed package public protected private return static strictfp super switch synchronized this threadsafe throw throws transient try while Of these, const , goto , strictfp , and threadsafe are not currently in use. The reserved keywords can’t in general be used for variable, field and method names. A trick allows methods to be defined having the same name as a keyword by surrounding the name in quotes as shown in the following example: // reserved keywords can be used for method names if quoted def "abstract"() { true } // when calling such methods, the name must be qualified using "this." this.abstract() Using such names might be confusing and is often best to avoid. The trick is primarily intended to enable certain Java integration scenarios and certain DSL scenarios where having "verbs" and "nouns" with the same name as keywords may be desirable. In addition, Groovy has the following contextual keywords: Table 2. Contextual Keywords as in permits record sealed trait var yields These words are only keywords in certain contexts and can be more freely used in some places, in particular for variables, fields and method names. This extra lenience allows using method or variable names that were not keywords in earlier versions of Groovy or are not keywords in Java. Examples are shown here: // contextual keywords can be used for field and variable names def as = true assert as // contextual keywords can be used for method names def in() { true } // when calling such methods, the name only needs to be qualified using "this." in scenarios which would be ambiguous this.in() Groovy programmers familiar with these contextual keywords may still wish to avoid using those names unless there is a good reason to use such a name. The restrictions on reserved keywords also apply for the primitive types, the boolean literals and the null literal (all of which are discussed later): Table 3. Other reserved words null true false boolean char byte short int long float double While not recommended, the same trick as for reserved keywords can be used: def "null"() { true } // not recommended; potentially confusing assert this.null() // must be qualified Using such words as method names is potentially confusing and is often best to avoid, however, it might be useful for certain kinds of DSLs . 3. Identifiers 3.1. Normal identifiers Identifiers start with a letter, a dollar or an underscore. They cannot start with a number. A letter can be in the following ranges: 'a' to 'z' (lowercase ascii letter) 'A' to 'Z' (uppercase ascii letter) '\u00C0' to '\u00D6' '\u00D8' to '\u00F6' '\u00F8' to '\u00FF' '\u0100' to '\uFFFE' Then following characters can contain letters and numbers. Here are a few examples of valid identifiers (here, variable names): def name def item3 def with_underscore def $dollarStart But the following ones are invalid identifiers: def 3tier def a+b def a#b All keywords are also valid identifiers when following a dot: foo.as foo.assert foo.break foo.case foo.catch 3.2. Quoted identifiers Quoted identifiers appear after the dot of a dotted expression. For instance, the name part of the person.name expression can be quoted with person."name" or person.'name' . This is particularly interesting when certain identifiers contain illegal characters that are forbidden by the Java Language Specification, but which are allowed by Groovy when quoted. For example, characters like a dash, a space, an exclamation mark, etc. def map = [:] map."an identifier with a space and double quotes" = "ALLOWED" map.'with-dash-signs-and-single-quotes' = "ALLOWED" assert map."an identifier with a space and double quotes" == "ALLOWED" assert map.'with-dash-signs-and-single-quotes' == "ALLOWED" As we shall see in the following section on strings , Groovy provides different string literals. All kind of strings are actually allowed after the dot: map.'single quote' map."double quote" map.'''triple single quote''' map."""triple double quote""" map./slashy string/ map.$/dollar slashy string/$ There’s a difference between plain character strings and Groovy’s GStrings (interpolated strings), as in that the latter case, the interpolated values are inserted in the final string for evaluating the whole identifier: def firstname = "Homer" map."Simpson-${firstname}" = "Homer Simpson" assert map.'Simpson-Homer' == "Homer Simpson" 4. Strings Text literals are represented in the form of chain of characters called strings. Groovy lets you instantiate java.lang.String objects, as well as GStrings ( groovy.lang.GString ) which are also called interpolated strings in other programming languages. 4.1. Single-quoted string Single-quoted strings are a series of characters surrounded by single quotes: 'a single-quoted string' Single-quoted strings are plain java.lang.String and don’t support interpolation. 4.2. String concatenation All the Groovy strings can be concatenated with the + operator: assert 'ab' == 'a' + 'b' 4.3. Triple-single-quoted string Triple-single-quoted strings are a series of characters surrounded by triplets of single quotes: '''a triple-single-quoted string''' Triple-single-quoted strings are plain java.lang.String and don’t support interpolation. Triple-single-quoted strings may span multiple lines. The content of the string can cross line boundaries without the need to split the string in several pieces and without concatenation or newline escape characters: def aMultilineString = '''line one line two line three''' If your code is indented, for example in the body of the method of a class, your string will contain the whitespace of the indentation. The Groovy Development Kit contains methods for stripping out the indentation with the String#stripIndent() method, and with the String#stripMargin() method that takes a delimiter character to identify the text to remove from the beginning of a string. When creating a string as follows: def startingAndEndingWithANewline = ''' line one line two line three ''' You will notice that the resulting string contains a newline character as first character. It is possible to strip that character by escaping the newline with a backslash: def strippedFirstNewline = '''\ line one line two line three ''' assert !strippedFirstNewline.startsWith('\n') 4.3.1. Escaping special characters You can escape single quotes with the backslash character to avoid terminating the string literal: 'an escaped single quote: \' needs a backslash' And you can escape the escape character itself with a double backslash: 'an escaped escape character: \\ needs a double backslash' Some special characters also use the backslash as escape character: Escape sequence Character \b backspace \f formfeed \n newline \r carriage return \s single space \t tabulation \\ backslash \' single quote within a single-quoted string (and optional for triple-single-quoted and double-quoted strings) \" double quote within a double-quoted string (and optional for triple-double-quoted and single-quoted strings) We’ll see some more escaping details when it comes to other types of strings discussed later. 4.3.2. Unicode escape sequence For characters that are not present on your keyboard, you can use unicode escape sequences: a backslash, followed by 'u', then 4 hexadecimal digits. For example, the Euro currency symbol can be represented with: 'The Euro currency symbol: \u20AC' 4.4. Double-quoted string Double-quoted strings are a series of characters surrounded by double quotes: "a double-quoted string" Double-quoted strings are plain java.lang.String if there’s no interpolated expression, but are groovy.lang.GString instances if interpolation is present. To escape a double quote, you can use the backslash character: "A double quote: \"". 4.4.1. String interpolation Any Groovy expression can be interpolated in all string literals, apart from single and triple-single-quoted strings. Interpolation is the act of replacing a placeholder in the string with its value upon evaluation of the string. The placeholder expressions are surrounded by ${} . The curly braces may be omitted for unambiguous dotted expressions, i.e. we can use just a $ prefix in those cases. If the GString is ever passed to a method taking a String, the expression value inside the placeholder is evaluated to its string representation (by calling toString() on that expression) and the resulting String is passed to the method. Here, we have a string with a placeholder referencing a local variable: def name = 'Guillaume' // a plain string def greeting = "Hello ${name}" assert greeting.toString() == 'Hello Guillaume' Any Groovy expression is valid, as we can see in this example with an arithmetic expression: def sum = "The sum of 2 and 3 equals ${2 + 3}" assert sum.toString() == 'The sum of 2 and 3 equals 5' Not only are expressions allowed in between the ${} placeholder, but so are statements. However, a statement’s value is just null . So if several statements are inserted in that placeholder, the last one should somehow return a meaningful value to be inserted. For instance, "The sum of 1 and 2 is equal to ${def a = 1; def b = 2; a + b}" is supported and works as expected but a good practice is usually to stick to simple expressions inside GString placeholders. In addition to ${} placeholders, we can also use a lone $ sign prefixing a dotted expression: def person = [name: 'Guillaume', age: 36] assert "$person.name is $person.age years old" == 'Guillaume is 36 years old' But only dotted expressions of the form a.b , a.b.c , etc, are valid. Expressions containing parentheses like method calls, curly braces for closures, dots which aren’t part of a property expression or arithmetic operators would be invalid. Given the following variable definition of a number: def number = 3.14 The following statement will throw a groovy.lang.MissingPropertyException because Groovy believes you’re trying to access the toString property of that number, which doesn’t exist: shouldFail(MissingPropertyException) { println "$number.toString()" } You can think of "$number.toString()" as being interpreted by the parser as "${number.toString}()" . Similarly, if the expression is ambiguous, you need to keep the curly braces: String thing = 'treasure' assert 'The x-coordinate of the treasure is represented by treasure.x' == "The x-coordinate of the $thing is represented by $thing.x" // <= Not allowed: ambiguous!! assert 'The x-coordinate of the treasure is represented by treasure.x' == "The x-coordinate of the $thing is represented by ${thing}.x" // <= Curly braces required If you need to escape the $ or ${} placeholders in a GString so they appear as is without interpolation, you just need to use a \ backslash character to escape the dollar sign: assert '$5' == "\$5" assert '${name}' == "\${name}" 4.4.2. Special case of interpolating closure expressions So far, we’ve seen we could interpolate arbitrary expressions inside the ${} placeholder, but there is a special case and notation for closure expressions. When the placeholder contains an arrow, ${→} , the expression is actually a closure expression — you can think of it as a closure with a dollar prepended in front of it: def sParameterLessClosure = "1 + 2 == ${-> 3}" (1) assert sParameterLessClosure == '1 + 2 == 3' def sOneParamClosure = "1 + 2 == ${ w -> w << 3}" (2) assert sOneParamClosure == '1 + 2 == 3' 1 The closure is a parameterless closure which doesn’t take arguments. 2 Here, the closure takes a single java.io.StringWriter argument, to which you can append content with the << leftShift operator. In either case, both placeholders are embedded closures. In appearance, it looks like a more verbose way of defining expressions to be interpolated, but closures have an interesting advantage over mere expressions: lazy evaluation. Let’s consider the following sample: def number = 1 (1) def eagerGString = "value == ${number}" def lazyGString = "value == ${ -> number }" assert eagerGString == "value == 1" (2) assert lazyGString == "value == 1" (3) number = 2 (4) assert eagerGString == "value == 1" (5) assert lazyGString == "value == 2" (6) 1 We define a number variable containing 1 that we then interpolate within two GStrings, as an expression in eagerGString and as a closure in lazyGString . 2 We expect the resulting string to contain the same string value of 1 for eagerGString . 3 Similarly for lazyGString 4 Then we change the value of the variable to a new number 5 With a plain interpolated expression, the value was actually bound at the time of creation of the GString. 6 But with a closure expression, the closure is called upon each coercion of the GString into String, resulting in an updated string containing the new number value. An embedded closure expression taking more than one parameter will generate an exception at runtime. Only closures with zero or one parameter are allowed. 4.4.3. Interoperability with Java When a method (whether implemented in Java or Groovy) expects a java.lang.String , but we pass a groovy.lang.GString instance, the toString() method of the GString is automatically and transparently called. String takeString(String message) { (4) assert message instanceof String (5) return message } def message = "The message is ${'hello'}" (1) assert message instanceof GString (2) def result = takeString(message) (3) assert result instanceof String assert result == 'The message is hello' 1 We create a GString variable 2 We double-check it’s an instance of the GString 3 We then pass that GString to a method taking a String as parameter 4 The signature of the takeString() method explicitly says its sole parameter is a String 5 We also verify that the parameter is indeed a String and not a GString. 4.4.4. GString and String hashCodes Although interpolated strings can be used in lieu of plain Java strings, they differ with strings in a particular way: their hashCodes are different. Plain Java strings are immutable, whereas the resulting String representation of a GString can vary, depending on its interpolated values. Even for the same resulting string, GStrings and Strings don’t have the same hashCode. assert "one: ${1}".hashCode() != "one: 1".hashCode() GString and Strings having different hashCode values, using GString as Map keys should be avoided, especially if we try to retrieve an associated value with a String instead of a GString. def key = "a" def m = ["${key}": "letter ${key}"] (1) assert m["a"] == null (2) 1 The map is created with an initial pair whose key is a GString 2 When we try to fetch the value with a String key, we will not find it, as Strings and GString have different hashCode values 4.5. Triple-double-quoted string Triple-double-quoted strings behave like double-quoted strings, with the addition that they are multiline, like the triple-single-quoted strings. def name = 'Groovy' def template = """ Dear Mr ${name}, You're the winner of the lottery! Yours sincerly, Dave """ assert template.toString().contains('Groovy') Neither double quotes nor single quotes need be escaped in triple-double-quoted strings. 4.6. Slashy string Beyond the usual quoted strings, Groovy offers slashy strings, which use / as the opening and closing delimiter. Slashy strings are particularly useful for defining regular expressions and patterns, as there is no need to escape backslashes. Example of a slashy string: def fooPattern = /.*foo.*/ assert fooPattern == '.*foo.*' Only forward slashes need to be escaped with a backslash: def escapeSlash = /The character \/ is a forward slash/ assert escapeSlash == 'The character / is a forward slash' Slashy strings are multiline: def multilineSlashy = /one two three/ assert multilineSlashy.contains('\n') Slashy strings can be thought of as just another way to define a GString but with different escaping rules. They hence support interpolation: def color = 'blue' def interpolatedSlashy = /a ${color} car/ assert interpolatedSlashy == 'a blue car' 4.6.1. Special cases An empty slashy string cannot be represented with a double forward slash, as it’s understood by the Groovy parser as a line comment. That’s why the following assert would actually not compile as it would look like a non-terminated statement: assert '' == // As slashy strings were mostly designed to make regexp easier so a few things that are errors in GStrings like $() or $5 will work with slashy strings. Remember that escaping backslashes is not required. An alternative way of thinking of this is that in fact escaping is not supported. The slashy string /\t/ won’t contain a tab but instead a backslash followed by the character 't'. Escaping is only allowed for the slash character, i.e. /\/folder/ will be a slashy string containing '/folder' . A consequence of slash escaping is that a slashy string can’t end with a backslash. Otherwise that will escape the slashy string terminator. You can instead use a special trick, /ends with slash ${'\\'}/ . But best just avoid using a slashy string in such a case. 4.7. Dollar slashy string Dollar slashy strings are multiline GStrings delimited with an opening $/ and a closing /$ . The escaping character is the dollar sign, and it can escape another dollar, or a forward slash. Escaping for the dollar and forward slash characters is only needed where conflicts arise with the special use of those characters. The characters $foo would normally indicate a GString placeholder, so those four characters can be entered into a dollar slashy string by escaping the dollar, i.e. $$foo . Similarly, you will need to escape a dollar slashy closing delimiter if you want it to appear in your string. Here are a few examples: def name = "Guillaume" def date = "April, 1st" def dollarSlashy = $/ Hello $name, today we're ${date}. $ dollar sign $$ escaped dollar sign \ backslash / forward slash $/ escaped forward slash $$$/ escaped opening dollar slashy $/$$ escaped closing dollar slashy /$ assert [ 'Guillaume', 'April, 1st', '$ dollar sign', '$ escaped dollar sign', '\\ backslash', '/ forward slash', '/ escaped forward slash', '$/ escaped opening dollar slashy', '/$ escaped closing dollar slashy' ].every { dollarSlashy.contains(it) } It was created to overcome some of the limitations of the slashy string escaping rules. Use it when its escaping rules suit your string contents (typically if it has some slashes you don’t want to escape). 4.8. String summary table String name String syntax Interpolated Multiline Escape character Single-quoted '…​' \ Triple-single-quoted '''…​''' \ Double-quoted "…​" \ Triple-double-quoted """…​""" \ Slashy /…​/ \ Dollar slashy $/…​/$ $ 4.9. Characters Unlike Java, Groovy doesn’t have an explicit character literal. However, you can be explicit about making a Groovy string an actual character, by three different means: char c1 = 'A' (1) assert c1 instanceof Character def c2 = 'B' as char (2) assert c2 instanceof Character def c3 = (char)'C' (3) assert c3 instanceof Character 1 by being explicit when declaring a variable holding the character by specifying the char type 2 by using type coercion with the as operator 3 by using a cast to char operation The first option 1 is interesting when the character is held in a variable, while the other two ( 2 and 3 ) are more interesting when a char value must be passed as argument of a method call. 5. Numbers Groovy supports different kinds of integral literals and decimal literals, backed by the usual Number types of Java. 5.1. Integral literals The integral literal types are the same as in Java: byte char short int long java.math.BigInteger You can create integral numbers of those types with the following declarations: // primitive types byte b = 1 char c = 2 short s = 3 int i = 4 long l = 5 // infinite precision BigInteger bi = 6 If you use optional typing by using the def keyword, the type of the integral number will vary: it’ll adapt to the capacity of the type that can hold that number. For positive numbers: def a = 1 assert a instanceof Integer // Integer.MAX_VALUE def b = 2147483647 assert b instanceof Integer // Integer.MAX_VALUE + 1 def c = 2147483648 assert c instanceof Long // Long.MAX_VALUE def d = 9223372036854775807 assert d instanceof Long // Long.MAX_VALUE + 1 def e = 9223372036854775808 assert e instanceof BigInteger As well as for negative numbers: def na = -1 assert na instanceof Integer // Integer.MIN_VALUE def nb = -2147483648 assert nb instanceof Integer // Integer.MIN_VALUE - 1 def nc = -2147483649 assert nc instanceof Long // Long.MIN_VALUE def nd = -9223372036854775808 assert nd instanceof Long // Long.MIN_VALUE - 1 def ne = -9223372036854775809 assert ne instanceof BigInteger 5.1.1. Alternative non-base 10 representations Numbers can also be represented in binary, octal, hexadecimal and decimal bases. Binary literal Binary numbers start with a 0b prefix: int xInt = 0b10101111 assert xInt == 175 short xShort = 0b11001001 assert xShort == 201 as short byte xByte = 0b11 assert xByte == 3 as byte long xLong = 0b101101101101 assert xLong == 2925l BigInteger xBigInteger = 0b111100100001 assert xBigInteger == 3873g int xNegativeInt = -0b10101111 assert xNegativeInt == -175 Octal literal Octal numbers are specified in the typical format of 0 followed by octal digits. int xInt = 077 assert xInt == 63 short xShort = 011 assert xShort == 9 as short byte xByte = 032 assert xByte == 26 as byte long xLong = 0246 assert xLong == 166l BigInteger xBigInteger = 01111 assert xBigInteger == 585g int xNegativeInt = -077 assert xNegativeInt == -63 Hexadecimal literal Hexadecimal numbers are specified in the typical format of 0x followed by hex digits. int xInt = 0x77 assert xInt == 119 short xShort = 0xaa assert xShort == 170 as short byte xByte = 0x3a assert xByte == 58 as byte long xLong = 0xffff assert xLong == 65535l BigInteger xBigInteger = 0xaaaa assert xBigInteger == 43690g Double xDouble = new Double('0x1.0p0') assert xDouble == 1.0d int xNegativeInt = -0x77 assert xNegativeInt == -119 5.2. Decimal literals The decimal literal types are the same as in Java: float double java.math.BigDecimal You can create decimal numbers of those types with the following declarations: // primitive types float f = 1.234 double d = 2.345 // infinite precision BigDecimal bd = 3.456 Decimals can use exponents, with the e or E exponent letter, followed by an optional sign, and an integral number representing the exponent: assert 1e3 == 1_000.0 assert 2E4 == 20_000.0 assert 3e+1 == 30.0 assert 4E-2 == 0.04 assert 5e-1 == 0.5 Conveniently for exact decimal number calculations, Groovy chooses java.math.BigDecimal as its decimal number type. In addition, both float and double are supported, but require an explicit type declaration, type coercion or suffix. Even if BigDecimal is the default for decimal numbers, such literals are accepted in methods or closures taking float or double as parameter types. Decimal numbers can’t be represented using a binary, octal or hexadecimal representation. 5.3. Underscore in literals When writing long literal numbers, it’s harder on the eye to figure out how some numbers are grouped together, for example with groups of thousands, of words, etc. By allowing you to place underscore in number literals, it’s easier to spot those groups: long creditCardNumber = 1234_5678_9012_3456L long socialSecurityNumbers = 999_99_9999L double monetaryAmount = 12_345_132.12 long hexBytes = 0xFF_EC_DE_5E long hexWords = 0xFFEC_DE5E long maxLong = 0x7fff_ffff_ffff_ffffL long alsoMaxLong = 9_223_372_036_854_775_807L long bytes = 0b11010010_01101001_10010100_10010010 5.4. Number type suffixes We can force a number (including binary, octals and hexadecimals) to have a specific type by giving a suffix (see table below), either uppercase or lowercase. Type Suffix BigInteger G or g Long L or l Integer I or i BigDecimal G or g Double D or d Float F or f Examples: assert 42I == Integer.valueOf('42') assert 42i == Integer.valueOf('42') // lowercase i more readable assert 123L == Long.valueOf("123") // uppercase L more readable assert 2147483648 == Long.valueOf('2147483648') // Long type used, value too large for an Integer assert 456G == new BigInteger('456') assert 456g == new BigInteger('456') assert 123.45 == new BigDecimal('123.45') // default BigDecimal type used assert .321 == new BigDecimal('.321') assert 1.200065D == Double.valueOf('1.200065') assert 1.234F == Float.valueOf('1.234') assert 1.23E23D == Double.valueOf('1.23E23') assert 0b1111L.class == Long // binary assert 0xFFi.class == Integer // hexadecimal assert 034G.class == BigInteger // octal 5.5. Math operations Although operators are covered in more detail elsewhere, it’s important to discuss the behavior of math operations and what their resulting types are. Division and power binary operations aside (covered below), binary operations between byte , char , short and int result in int binary operations involving long with byte , char , short and int result in long binary operations involving BigInteger and any other integral type result in BigInteger binary operations involving BigDecimal with byte , char , short , int and BigInteger result in BigDecimal binary operations between float , double and BigDecimal result in double binary operations between two BigDecimal result in BigDecimal The following table summarizes those rules: byte char short int long BigInteger float double BigDecimal byte int int int int long BigInteger double double BigDecimal char int int int long BigInteger double double BigDecimal short int int long BigInteger double double BigDecimal int int long BigInteger double double BigDecimal long long BigInteger double double BigDecimal BigInteger BigInteger double double BigDecimal float double double double double double double BigDecimal BigDecimal Thanks to Groovy’s operator overloading, the usual arithmetic operators work as well with BigInteger and BigDecimal , unlike in Java where you have to use explicit methods for operating on those numbers. 5.5.1. The case of the division operator The division operators / (and /= for division and assignment) produce a double result if either operand is a float or double , and a BigDecimal result otherwise (when both operands are any combination of an integral type short , char , byte , int , long , BigInteger or BigDecimal ). BigDecimal division is performed with the divide() method if the division is exact (i.e. yielding a result that can be represented within the bounds of the same precision and scale), or using a MathContext with a precision of the maximum of the two operands' precision plus an extra precision of 10, and a scale of the maximum of 10 and the maximum of the operands' scale. For integer division like in Java, you should use the intdiv() method, as Groovy doesn’t provide a dedicated integer division operator symbol. 5.5.2. The case of the power operator The power operation is represented by the ** operator, with two parameters: the base and the exponent. The result of the power operation depends on its operands, and the result of the operation (in particular if the result can be represented as an integral value). The following rules are used by Groovy’s power operation to determine the resulting type: If the exponent is a decimal value if the result can be represented as an Integer , then return an Integer else if the result can be represented as a Long , then return a Long otherwise return a Double If the exponent is an integral value if the exponent is strictly negative, then return an Integer , Long or Double if the result value fits in that type if the exponent is positive or zero if the base is a BigDecimal , then return a BigDecimal result value if the base is a BigInteger , then return a BigInteger result value if the base is an Integer , then return an Integer if the result value fits in it, otherwise a BigInteger if the base is a Long , then return a Long if the result value fits in it, otherwise a BigInteger We can illustrate those rules with a few examples: // base and exponent are ints and the result can be represented by an Integer assert 2 ** 3 instanceof Integer // 8 assert 10 ** 9 instanceof Integer // 1_000_000_000 // the base is a long, so fit the result in a Long // (although it could have fit in an Integer) assert 5L ** 2 instanceof Long // 25 // the result can't be represented as an Integer or Long, so return a BigInteger assert 100 ** 10 instanceof BigInteger // 10e20 assert 1234 ** 123 instanceof BigInteger // 170515806212727042875... // the base is a BigDecimal and the exponent a negative int // but the result can be represented as an Integer assert 0.5 ** -2 instanceof Integer // 4 // the base is an int, and the exponent a negative float // but again, the result can be represented as an Integer assert 1 ** -0.3f instanceof Integer // 1 // the base is an int, and the exponent a negative int // but the result will be calculated as a Double // (both base and exponent are actually converted to doubles) assert 10 ** -1 instanceof Double // 0.1 // the base is a BigDecimal, and the exponent is an int, so return a BigDecimal assert 1.2 ** 10 instanceof BigDecimal // 6.1917364224 // the base is a float or double, and the exponent is an int // but the result can only be represented as a Double value assert 3.4f ** 5 instanceof Double // 454.35430372146965 assert 5.6d ** 2 instanceof Double // 31.359999999999996 // the exponent is a decimal value // and the result can only be represented as a Double value assert 7.8 ** 1.9 instanceof Double // 49.542708423868476 assert 2 ** 0.1f instanceof Double // 1.0717734636432956 6. Booleans Boolean is a special data type that is used to represent truth values: true and false . Use this data type for simple flags that track true/false conditions . Boolean values can be stored in variables, assigned into fields, just like any other data type: def myBooleanVariable = true boolean untypedBooleanVar = false booleanField = true true and false are the only two primitive boolean values. But more complex boolean expressions can be represented using logical operators . In addition, Groovy has special rules (often referred to as Groovy Truth ) for coercing non-boolean objects to a boolean value. 7. Lists Groovy uses a comma-separated list of values, surrounded by square brackets, to denote lists. Groovy lists are plain JDK java.util.List , as Groovy doesn’t define its own collection classes. The concrete list implementation used when defining list literals are java.util.ArrayList by default, unless you decide to specify otherwise, as we shall see later on. def numbers = [1, 2, 3] (1) assert numbers instanceof List (2) assert numbers.size() == 3 (3) 1 We define a list numbers delimited by commas and surrounded by square brackets, and we assign that list into a variable 2 The list is an instance of Java’s java.util.List interface 3 The size of the list can be queried with the size() method, and shows our list contains 3 elements In the above example, we used a homogeneous list, but you can also create lists containing values of heterogeneous types: def heterogeneous = [1, "a", true] (1) 1 Our list here contains a number, a string and a boolean value We mentioned that by default, list literals are actually instances of java.util.ArrayList , but it is possible to use a different backing type for our lists, thanks to using type coercion with the as operator, or with explicit type declaration for your variables: def arrayList = [1, 2, 3] assert arrayList instanceof java.util.ArrayList def linkedList = [2, 3, 4] as LinkedList (1) assert linkedList instanceof java.util.LinkedList LinkedList otherLinked = [3, 4, 5] (2) assert otherLinked instanceof java.util.LinkedList 1 We use coercion with the as operator to explicitly request a java.util.LinkedList implementation 2 We can say that the variable holding the list literal is of type java.util.LinkedList You can access elements of the list with the [] subscript operator (both for reading and setting values) with positive indices or negative indices to access elements from the end of the list, as well as with ranges, and use the << leftShift operator to append elements to a list: def letters = ['a', 'b', 'c', 'd'] assert letters[0] == 'a' (1) assert letters[1] == 'b' assert letters[-1] == 'd' (2) assert letters[-2] == 'c' letters[2] = 'C' (3) assert letters[2] == 'C' letters << 'e' (4) assert letters[ 4] == 'e' assert letters[-1] == 'e' assert letters[1, 3] == ['b', 'd'] (5) assert letters[2..4] == ['C', 'd', 'e'] (6) 1 Access the first element of the list (zero-based counting) 2 Access the last element of the list with a negative index: -1 is the first element from the end of the list 3 Use an assignment to set a new value for the third element of the list 4 Use the << leftShift operator to append an element at the end of the list 5 Access two elements at once, returning a new list containing those two elements 6 Use a range to access a range of values from the list, from a start to an end element position As lists can be heterogeneous in nature, lists can also contain other lists to create multidimensional lists: def multi = [[0, 1], [2, 3]] (1) assert multi[1][0] == 2 (2) 1 Define a list of numbers 2 Access the second element of the top-most list, and the first element of the inner list 8. Arrays Groovy reuses the list notation for arrays, but to make such literals arrays, you need to explicitly define the type of the array through coercion or type declaration. String[] arrStr = ['Ananas', 'Banana', 'Kiwi'] (1) assert arrStr instanceof String[] (2) assert !(arrStr instanceof List) def numArr = [1, 2, 3] as int[] (3) assert numArr instanceof int[] (4) assert numArr.size() == 3 1 Define an array of strings using explicit variable type declaration 2 Assert that we created an array of strings 3 Create an array of ints with the as operator 4 Assert that we created an array of primitive ints You can also create multi-dimensional arrays: def matrix3 = new Integer[3][3] (1) assert matrix3.size() == 3 Integer[][] matrix2 (2) matrix2 = [[1, 2], [3, 4]] assert matrix2 instanceof Integer[][] 1 You can define the bounds of a new array 2 Or declare an array without specifying its bounds Access to elements of an array follows the same notation as for lists: String[] names = ['Cédric', 'Guillaume', 'Jochen', 'Paul'] assert names[0] == 'Cédric' (1) names[2] = 'Blackdrag' (2) assert names[2] == 'Blackdrag' 1 Retrieve the first element of the array 2 Set the value of the third element of the array to a new value 8.1. Java-style array initialization Groovy has always supported literal list/array definitions using square brackets and has avoided Java-style curly braces so as not to conflict with closure definitions. In the case where the curly braces come immediately after an array type declaration however, there is no ambiguity with closure definitions, so Groovy 3 and above support that variant of the Java array initialization expression. Examples: def primes = new int[] {2, 3, 5, 7, 11} assert primes.size() == 5 && primes.sum() == 28 assert primes.class.name == '[I' def pets = new String[] {'cat', 'dog'} assert pets.size() == 2 && pets.sum() == 'catdog' assert pets.class.name == '[Ljava.lang.String;' // traditional Groovy alternative still supported String[] groovyBooks = [ 'Groovy in Action', 'Making Java Groovy' ] assert groovyBooks.every{ it.contains('Groovy') } 9. Maps Sometimes called dictionaries or associative arrays in other languages, Groovy features maps. Maps associate keys to values, separating keys and values with colons, and each key/value pairs with commas, and the whole keys and values surrounded by square brackets. def colors = [red: '#FF0000', green: '#00FF00', blue: '#0000FF'] (1) assert colors['red'] == '#FF0000' (2) assert colors.green == '#00FF00' (3) colors['pink'] = '#FF00FF' (4) colors.yellow = '#FFFF00' (5) assert colors.pink == '#FF00FF' assert colors['yellow'] == '#FFFF00' assert colors instanceof java.util.LinkedHashMap 1 We define a map of string color names, associated with their hexadecimal-coded html colors 2 We use the subscript notation to check the content associated with the red key 3 We can also use the property notation to assert the color green’s hexadecimal representation 4 Similarly, we can use the subscript notation to add a new key/value pair 5 Or the property notation, to add the yellow color When using names for the keys, we actually define string keys in the map. Groovy creates maps that are actually instances of java.util.LinkedHashMap . If you try to access a key which is not present in the map: assert colors.unknown == null def emptyMap = [:] assert emptyMap.anyKey == null You will retrieve a null result. In the examples above, we used string keys, but you can also use values of other types as keys: def numbers = [1: 'one', 2: 'two'] assert numbers[1] == 'one' Here, we used numbers as keys, as numbers can unambiguously be recognized as numbers, so Groovy will not create a string key like in our previous examples. But consider the case you want to pass a variable in lieu of the key, to have the value of that variable become the key: def key = 'name' def person = [key: 'Guillaume'] (1) assert !person.containsKey('name') (2) assert person.containsKey('key') (3) 1 The key associated with the 'Guillaume' name will actually be the "key" string, not the value associated with the key variable 2 The map doesn’t contain the 'name' key 3 Instead, the map contains a 'key' key You can also pass quoted strings as well as keys: ["name": "Guillaume"]. This is mandatory if your key string isn’t a valid identifier, for example if you wanted to create a string key containing a dash like in: ["street-name": "Main street"]. When you need to pass variable values as keys in your map definitions, you must surround the variable or expression with parentheses: person = [(key): 'Guillaume'] (1) assert person.containsKey('name') (2) assert !person.containsKey('key') (3) 1 This time, we surround the key variable with parentheses, to instruct the parser we are passing a variable rather than defining a string key 2 The map does contain the name key 3 But the map doesn’t contain the key key as before Groovy Learn Documentation Download Support Contribute Ecosystem Blog posts About Source code Security Books Thanks Sponsorship FAQ Search Socialize Discuss on the mailing-list Groovy on X Groovy on Bluesky Groovy on Mastodon Groovy on LinkedIn Events and conferences Source code on GitHub Report issues in Jira Stack Overflow questions Slack Community The Groovy programming language is supported by the Apache Software Foundation and the Groovy community. Apache, Apache Groovy, Groovy, and the ASF logo are either registered trademarks or trademarks of The Apache Software Foundation. © 2003-2025 the Apache Groovy project — Groovy is Open Source: license , privacy policy . | 2026-01-13T09:29:32 |
https://www.chinadaily.com.cn/sports/213special/Olympic-Games | Olympic Games - Chinadaily.com.cn Search HOME CHINA WORLD BUSINESS LIFESTYLE CULTURE TRAVEL VIDEO SPORTS OPINION REGIONAL NEWSPAPER MOBILE Global Edition ASIA 中文 双语 Français HOME CHINA WORLD BUSINESS LIFESTYLE CULTURE TRAVEL VIDEO SPORTS OPINION REGIONAL NEWSPAPER China Daily PDF China Daily E-paper MOBILE Sports Soccer Basketball Volleyball Tennis Golf Track & field Swimming Home / Sports / Olympic Games Home Sports / Olympic Games Wrestling with their limitations 2025-12-29 10:35 Snow hope: Britain looks to mount medal comeback after 2022 flop 2025-11-26 09:44 US golden boy Stolz ready to shine in Italy 2025-11-26 09:42 Out of the blocks early: Women's 100m set to open the show at LA28 2025-11-14 09:44 No decision yet on transgender athletes' Games eligibility, IOC says 2025-11-12 09:35 Jackson motivated by higher expectations 2025-11-05 09:25 Dubi: Milano-Cortina key to finding workable Winter Games formula 2025-10-30 09:52 Even in the Alps, artificial snow will play a major role 2025-10-30 09:52 Gearing up for Italian job 2025-10-29 09:22 India's Olympic bid at risk due to doping athletes 2025-10-04 07:53 Italy curler Constantini ready for 'special' Games 2025-08-07 10:34 'We will be ready', say Winter Games organizers 2025-08-06 09:28 Iraqi women chase Paralympic dreams 2025-07-30 09:24 Transgender athletes barred from women's sports in US as EO takes effect 2025-07-24 09:54 LA28 reveals initial Olympic schedule on 3-year countdown 2025-07-15 16:35 Olympism365 Summit focuses on social commitment of sport 2025-06-05 10:40 LA Memorial Coliseum, Stadium to share 2028 Olympic, Paralympic ceremonies 2025-05-09 17:23 Peaty says yes to 2028 Olympics after new swim events added 2025-04-14 14:38 Female athletes to be in the majority at LA28 2025-04-11 10:43 Italian job: Controversial track slides into action 2025-03-27 09:55 1 2 3 4 5 6 7 8 9 10 Next >>| 1/50 Next Most Popular China ties Iraq 0-0 in its U23 Asian Cup opening match A learning curve Russian team wins Harbin International Ice Sculpture Competition Worldloppet ski season opens with Changchun cross-country event Women's half-marathon draws 20,000 runners to Guangzhou Picture perfect Highlights Venus still a force at 45, despite Auckland loss Reboot begins with hard work Russian team wins Harbin International Ice Sculpture Competition What's Hot Worldloppet ski season opens with Changchun cross-country event Special Chengdu World University Games Winter sports in China NHL plays in China Top BACK TO THE TOP English 中文 HOME CHINA WORLD BUSINESS LIFESTYLE CULTURE TRAVEL VIDEO SPORTS OPINION REGIONAL NEWSPAPER China Daily PDF China Daily E-paper MOBILE Copyright 1994 - . All rights reserved. The content (including but not limited to text, photo, multimedia information, etc) published in this site belongs to China Daily Information Co (CDIC). Without written authorization from CDIC, such content shall not be republished or used in any form. Note: Browsers with 1024*768 or higher resolution are suggested for this site. License for publishing multimedia online 0108263 Registration Number: 130349 About China Daily Advertise on Site Contact Us Job Offer Expat Employment FOLLOW US Copyright 1994 - . All rights reserved. The content (including but not limited to text, photo, multimedia information, etc) published in this site belongs to China Daily Information Co (CDIC). Without written authorization from CDIC, such content shall not be republished or used in any form. --> | 2026-01-13T09:29:32 |
https://www.chinadaily.com.cn/china/crossstraits | Cross-Strait - Chinadaily.com.cn Latest Voices on Taiwan Affairs Opinion Closer together Strait Talk From the mainland Tour through history --> Taiwan enterprises enthused by mainland's development Taiwan's ban of mainland social media app a case of political manipulation: spokesperson Love of tea links Taiwan with Fujian Same-name villages across the Strait share ancestral roots Expert condemns DPP's obstruction of V-Day participation Voices on Taiwan Affairs Mainland says Taiwan's Lai a 'peace breaker' and 'troublemaker' MORE Lai's 'defense' spending, flattery of Japan slammed MORE Mainland slams Lai Ching-te for 'disgusting' support of Japanese PM's Taiwan remarks MORE Mainland slams DPP's push for 'non-red supply chain' in semiconductor industry MORE Mainland condemns Taiwan's DPP for erasing cross-Strait cultural ties MORE Mainland able to thwart separatist 'Taiwan independence' activities MORE Opinion Lai and DPP are heedlessly hurtling toward dead end of their own making: China Daily editorial Historical truth brooks no distortion: China Daily editorial Protest nails Lai's true colors to the mast Hypocrisy of some on Taiwan question laid bare Chinese mainland experts condemn Taiwan leader's fallacy External support for radical separatist a dead-end Closer together Tea sector blends commerce with cross-Strait exchanges Cross-Strait collaboration key to nation's long-term well-being Events honor role of first provincial governor in modernizing Taiwan 'Soul Ferryman' of Taiwan Strait: Liu De-wen's 22-year mission to bring veterans home Strait Talk From the mainland China opposes official interactions, military ties between US, China's Taiwan region: spokesperson How China works: Smartphones, smart world Looking back at China's manned spaceflights Mainland slams recent Japanese govt statement on Taiwan Mainland slams Taiwan leader's separatist narrative One-China principle reaffirmed as WHA rejects Taiwan proposal Tour through history Using needles to help life's energy flow MORE Living Heritage: Acupuncture MORE Head over heels for Peking Opera MORE Perfection to a tea MORE Festive China: Mid-Autumn Festival MORE A legacy that endures MORE MORE MORE MORE MORE --> --> BACK TO THE TOP Copyright 1995 - . All rights reserved. The content (including but not limited to text, photo, multimedia information, etc) published in this site belongs to China Daily Information Co (CDIC). Without written authorization from CDIC, such content shall not be republished or used in any form. Note: Browsers with 1024*768 or higher resolution are suggested for this site. Latest news Voices on Taiwan Affairs Opinion Closer together Strait Talk From the mainland Tour through history --> US plan for arms sales to Taiwan condemned Taiwan enterprises enthused by mainland's development Taiwan's ban of mainland social media app a case of political manipulation: spokesperson Love of tea links Taiwan with Fujian Same-name villages across the Strait share ancestral roots Expert condemns DPP's obstruction of V-Day participation Voices on Taiwan Affairs Mainland says Taiwan's Lai a 'peace breaker' and 'troublemaker' MORE Lai's 'defense' spending, flattery of Japan slammed MORE Mainland slams Lai Ching-te for 'disgusting' support of Japanese PM's Taiwan remarks MORE Mainland slams DPP's push for 'non-red supply chain' in semiconductor industry MORE Mainland condemns Taiwan's DPP for erasing cross-Strait cultural ties MORE Mainland able to thwart separatist 'Taiwan independence' activities MORE Opinion Historical truth brooks no distortion: China Daily editorial Protest nails Lai's true colors to the mast Lai and DPP are heedlessly hurtling toward dead end of their own making: China Daily editorial Hypocrisy of some on Taiwan question laid bare Chinese mainland experts condemn Taiwan leader's fallacy External support for radical separatist a dead-end Closer together Tea sector blends commerce with cross-Strait exchanges Cross-Strait collaboration key to nation's long-term well-being Strait Talk Timeline: A brief history of Taiwan Is 1992 Consensus the same as 'one country, two systems'? What's the purpose of 'no political premise' by DPP authority? Why the 1992 Consensus anchor of cross-Straits ties Are there only 1992 Talks rather than the 1992 Consensus? How was the 1992 Consensus reached? From the mainland How China works: Smartphones, smart world Looking back at China's manned spaceflights China opposes official interactions, military ties between US, China's Taiwan region: spokesperson Mainland slams recent Japanese govt statement on Taiwan Mainland slams Taiwan leader's separatist narrative One-China principle reaffirmed as WHA rejects Taiwan proposal Tour through history Using needles to help life's energy flow MORE Living Heritage: Acupuncture MORE Head over heels for Peking Opera MORE Perfection to a tea MORE Festive China: Mid-Autumn Festival MORE A legacy that endures MORE MORE --> --> HOME CHINA | 2026-01-13T09:29:32 |
https://wordpress.com/tr/support/github-dagitimlari/ | WordPress.com üzerinde GitHub dağıtımları kullanma – WordPress.com Destek Ürünler Özellikler Kaynaklar Planlar ve Fiyatlandırma Giriş Başlayın Menu WordPress Hosting Ajanslar için WordPress Bağlı Kuruluş Olun Alan Adları AI Web Sitesi Oluşturucu Web Sitesi Oluşturucu Blog Oluştur Haber bülteni Profesyonel E-posta Web Sitesi Tasarım Hizmetleri Ticaret WordPress Studio Kurumsal WordPress Genel görünüm WordPress Temaları WordPress Eklentileri WordPress Desenleri Google Apps Destek Merkezi WordPress haberler İşletme Adı Üreteci Logo Oluşturucu Yeni Yazılar Keşfedin Popüler Etiketler Blog Arama Gezinme menüsünü kapat Başlayın Kaydolun Giriş Hakkında Planlar ve Fiyatlandırma Ürünler WordPress Hosting Ajanslar için WordPress Bağlı Kuruluş Olun Alan Adları AI Web Sitesi Oluşturucu Web Sitesi Oluşturucu Blog Oluştur Haber bülteni Profesyonel E-posta Web Sitesi Tasarım Hizmetleri Ticaret WordPress Studio Kurumsal WordPress Özellikler Genel görünüm WordPress Temaları WordPress Eklentileri WordPress Desenleri Google Apps Kaynaklar Destek Merkezi WordPress haberler İşletme Adı Üreteci Logo Oluşturucu Yeni Yazılar Keşfedin Popüler Etiketler Blog Arama Jetpack Uygulaması Daha Fazla Bilgi Destek Merkezi Kılavuzlar Kurslar Forumlar İletişim Ara Destek Merkezi / Kılavuzlar Destek Merkezi Kılavuzlar Kurslar Forumlar İletişim Kılavuzlar / Eklentiler ve araçlar / Araçlar / WordPress.com üzerinde GitHub dağıtımları kullanma WordPress.com üzerinde GitHub dağıtımları kullanma GitHub Dağıtımları, GitHub depolarınızı doğrudan WordPress.com sitenizle entegre ederek eklentileri, temaları veya site değişikliklerini dağıtmak için sürüm kontrollü, otomatik bir iş akışı sağlar. Bu kılavuz kurulum sürecini ve bağlı dizinlerinizi nasıl yöneteceğinizi anlatır. Bu özellik, WordPress.com Kurumsal ve Ticaret paketlerine sahip sitelerde mevcuttur. Kurumsal paketiniz varsa bunu etkinleştirdiğinizden emin olun. Ücretsiz veya Kişisel ve Premium paketlerine sahip sitelerde bu özelliğe erişmek için paketinizi yükseltin . Bu kılavuzda Video eğitimi Bir dizin bağlama Dağıtım ayarlarını yönetme Gelişmiş dağıtım Kodunuzu dağıtma Mevcut bağlantıları yönetme Dağıtım çalıştırması günlükleri Bir deponun bağlantısını kesme WordPress.com’un GitHub’dan bağlantısını kaldırma Sorularınız mı var? Yapay Zeka Asistanımıza sorun Başa dön Video eğitimi Bu video İngilizce. Kendi dilinizde altyazıları okumayı tercih ediyorsanız YouTube’un otomatik alt yazı özelliğini kullanabilirsiniz: Otomatik çeviri altyazıları açmak için: Videoyu oynatın. Videonun sağ alt köşesindeki ⚙️ Ayarlar simgesine tıklayın. Altyazılar/CC ’yi seçin. Otomatik çevir ’i seçin. Tercih ettiğiniz dili seçin. Otomatik dublaj (deneysel) ile dinlemek için: ⚙️ Ayarlar simgesine tıklayın. Ses parçası nı seçin. Videoyu hangi dilde dinlemek istediğinizi seçin: ℹ️ Çeviri ve dublajlar Google tarafından otomatik olarak oluşturulur, mükemmel olmayabilir ve otomatik dublaj hâlâ test aşamasındadır, bu nedenle tüm dillerde mevcut olmayabilir. Bir dizin bağlama WordPress.com sitenize bir GitHub deposunu dağıtmadan önce aşağıdaki adımları izleyerek ikisi arasında bağlantı kurmanız gerekir: https://wordpress.com/sites adresindeki Siteler sayfanızı ziyaret edin Site genel bakışı için sitenizin adına tıklayın. Dağıtımlar sekmesine tıklayın. “ Depoyu bağla ” düğmesine tıklayın. Eğer listelenen dizinleri görürseniz GitHub hesabınızı zaten bağlamış olursunuz. 11. adıma devam edin. “ WordPress.com uygulamasını yükle ” düğmesine tıklayın. Yeni bir pencere açılacaktır ve henüz açmadıysanız GitHub hesabınıza giriş yapmanız istenecektir. Ardından bu ekranı göreceksiniz: “ Geliştiriciler için WordPress.com Yetkilendir ” düğmesine tıklayın. Deponuzun bulunduğu GitHub organizasyonunu veya hesabını seçin. Bağlanmak istediğiniz depoyu/depoları seçin: Tüm depolar: Bu seçeneğin seçilmesi, seçilen GitHub hesabına ait tüm güncel ve gelecekteki depolara WordPress.com erişimi sağlayacaktır. Buna salt okunur genel depolar dahildir. Sadece seçili depolar: Bu seçeneğin seçilmesi, WordPress.com adresinin seçilen GitHub hesabında hangi depolara erişebileceğini seçmenizi sağlar. Bir seçenek belirledikten sonra Yükle düğmesine tıklayın. Yeni pencere kapanacak ve WordPress.com sayfasına geri döneceksiniz. Seçilen depolarınız, ilgili depoyla ilişkili GitHub hesabıyla birlikte listelenmelidir: Bağlanmak istediğiniz deponun yanındaki Seç seçeneğine tıklayın. Şu aşamada Yetkili GitHub Uygulamaları ve Yüklü GitHub Uygulamaları altında Geliştiriciler için WordPress.com adresini ziyaret etmelisiniz. Dağıtım ayarlarını yönetme Bir depo seçtiğinizde dağıtım ayarlarını yapmanız gerekir: Dağıtım dalı: Varsayılan olarak deponun varsayılan dalı (genellikle ana ) olarak ayarlanır ancak kullanmak istediğiniz dala değiştirilebilir. Hedef dizin: Dosyaları dağıtmak istediğiniz sunucu klasörü. Eklentiler için bu wp-content/plugins/my-plugin-name olacaktır. Temalar için, wp-content/themes/my-theme-name olacaktır. Kısmi bir site dağıtımı için (yani birden fazla eklenti veya tema), /wp-content kullanabilirsiniz. Bir deponun içeriği, belirtilen dizindeki WordPress sitesinin mevcut içeriğiyle birleştirilecektir. Otomatik dağıtımlar: WordPress.com adresine dağıtabileceğiniz iki yol vardır: Otomatik: Kod işlendikten sonra WordPress.com sitenizde dağıtılır. Otomatik dağıtımlar prova siteleri için önerilir. Manuel: Dağıtım talebinde bulunduğunuzda kod dağıtılır. Üretim siteleri için manuel dağıtımlar önerilir. Dağıtım modu: İki tür dağıtım vardır: Basit: Bu mod, bilgi havuzunun bir bölümündeki tüm dosyaları siteye kopyalayıp hiçbir gönderi işleme koymadan dağıtır. Gelişmiş: Bu modla, Composer bağımlılıklarını kurma, dağıtım öncesi kod testi ve dosya dağıtımını kontrol etme gibi adımları özel olarak tasarlayan bir iş akışı komutu kullanabilirsiniz. Composer veya Node yazılımına ihtiyaç duyan depolar için idealdir. Daha fazla bilgi için aşağıdaki Gelişmiş Dağıtım’a bakın . Tüm ayarlar yapılandırıldıktan sonra Bağlan düğmesine tıklayın. Depolarınız eklenecek: İlk dağıtımı otomatik veya manuel olarak tetiklemeniz gerektiğini unutmayın. Daha sonra istediğiniz zaman “ Depo bağla ” düğmesine tıklayarak başka bir depo bağlayabilirsiniz. Gelişmiş dağıtım Gelişmiş Dağıtım ile, dağıtımdan önce deponuzdaki dosyaları işlemek için bir iş akışı komut dosyası sağlayabilirsiniz. Bu, ekibinizin kodlama standartlarını karşıladığından emin olmak için kodunuzu kontrol etmek, birim testleri yapmak, dağıtım dosyaları hariç tutmak, bağımlılıklar yüklemek ve çok daha fazlası gibi birçok olasılığa kapı açar. Başlamak için, iş akışı tariflerimize göz atın. Gelişmiş Dağıtım’ı ayarlamak için: Dağıtımı yapılandırabileceğiniz bir form görünür. Bağlantıyı yönetmek için bilgi havuzunun adına tıklayın. Sağ tarafta, “ Dağıtım modunuzu seçin ” seçeneğinin altında Gelişmiş ‘i seçin. Depo zaten bir iş akışı dosyası içeriyorsa buradan seçebilirsiniz. Sistem, hata olup olmadığını kontrol eder. Herhangi bir hata bulunmazsa 7. adıma geçin. Önceden yapılandırılmış bir iş akışı dosyası eklemek için “ Yeni iş akışı oluştur ” seçeneğini de seçebilirsiniz. Bu seçeneği belirlediğinizde, wpcom.yml iş akışı dosyası halihazırda deponuzda mevcutsa onun üzerine yazılacaktır. İş akışı dosyasını depoya eklemek için “ Benim için iş akışını yükle ” düğmesine tıklayın. Bir iş akışı eklenip doğrulandıktan sonra Güncelle ‘ye tıklayın. Deponuzda artık gelişmiş dağıtım kullanılacak. Kodunuzu dağıtma GitHub deponuzu bir siteye bağladıktan sonra, bir sonraki adım aslında kodunuzu dağıtmaktır. Kullanılabilen iki dağıtım yöntemi vardır: Otomatik ve Manuel . Depolardaki kod değişiklikleri Github’dan canlı siteye otomatik olarak dağıtıldığı için otomatik dağıtımlar canlı üretim siteleri için önerilmez. Bunun yerine, prova sitesine otomatik dağıtım kurmayı ve hazır olduğunuzda üretim ile senkronize etmeyi düşünün. Manuel dağıtımlar, her bir dağıtımı manuel olarak tetiklemeniz gerekeceğinden, kod değişikliklerinizin ne zaman yayınlanacağı konusunda size daha fazla kontrol sağlar. Prova sitesi kullanmak istemiyorsanız manuel dağıtımları öneririz. Dağıtımı manuel olarak tetiklemek için: https://wordpress.com/sites adresindeki Siteler sayfanızı ziyaret edin Site genel bakışı için sitenizin adına tıklayın. Dağıtımlar sekmesine tıklayın. Dağıtmak istediğiniz depodaki üç nokta menüsüne (⋮) tıklayın. “ Tetikleyici manuel dağıtımı ” seçeneğini seçin. “Dağıtım çalıştırması oluşturuldu” diyen ve dağıtım durumunun “Kuyruğa alındı” olarak değişeceği bir bildirim başlığı görmeniz gerekir. Dağıtımın tamamlanmasını bekleyin (durum “Dağıtıldı” olarak değişecek). Üç nokta menüsüne (⋮) tekrar tıklayın ve “ Dağıtım çalışmalarını görün ” seçeneğini belirleyin. Dağıtım çalıştırması günlüğü , Yazarı ve dağıtılan depoya eklemeyi görüntüler. Dağıtım çalıştırması gönderisine tıklarsanız daha fazla bilgi görüntüleyebilirsiniz. Mevcut bağlantıları yönetme Mevcut GitHub depo bağlantılarınızı yönetmek için: https://wordpress.com/sites adresindeki Siteler sayfanızı ziyaret edin Site genel bakışı için sitenizin adına tıklayın. Dağıtımlar sekmesine tıklayın. O zaman bağlantılar listesini görmelisiniz. Bağlantı listesi, bir GitHub deposu ile siteniz arasında en az bir bağlantı olup olmadığını gösterir. Liste, her bağlantı için depo adı ve dalı, bir siteye dağıtılan son depoya ekleme, gerçekleştiğinde, kodun yerleştirildiği yerde, dağıtım işleminin süresi ve durumu gibi ilgili bilgileri içerir. Üç nokta menüsüne (⋮) tıkladıktan sonra ek işlemler mevcuttur: Tetikleyici manuel dağıtımı: Yapılandırılmış dalın en son depoya eklemesinde bir dağıtım çalıştırması başlatır . Dağıtım çalışmalarını görün: Bağlı depo için dağıtım çalıştırması günlük görünümünü açar. Bağlantıyı yapılandırın: Depo için bağlantı görünümünü yönetmeyi açar. Deponun bağlantısını kesin: Depo ile site arasındaki bağlantıyı kaldırır. Dağıtım çalıştırması günlükleri Dağıtım çalıştırması günlükleri, otomatik olarak veya manuel olarak tetiklensin, her bir dağıtımın ayrıntılı, adım adım kaydını sağlar. Bu günlükler değişiklikleri izlemenize, dağıtım durumunu izlemenize ve ortaya çıkan sorunları gidermenize yardımcı olur. 30 gün içinde son 10 çalışmadan günlüklere eriştiğinizde, her dağıtım sırasında ne olduğunu kolayca gözden geçirebilir ve her şeyin sorunsuz şekilde çalıştığından emin olabilirsiniz. Bir dağıtımın günlüklerini kontrol etmek için: https://wordpress.com/sites adresindeki Siteler sayfanızı ziyaret edin Site genel bakışı için sitenizin adına tıklayın. Dağıtımlar sekmesine tıklayın. Günlükleri görüntülemek istediğiniz deponun yanındaki üç nokta menüsüne (⋮) tıklayın. “ Dağıtım çalışmalarını görün ” seçeneğini seçin. Dağıtım çalışmaları listesi görünümü siteye dağıtılan depoya eklemeleri, dağıtım durumunu, tarihi ve süreyi gösterir. Dağıtım hakkında daha fazla bilgi görüntülemek ve genişletmek için çalışma sırasında herhangi bir yere tıklayın. Kayıtlar, GitHub’dan kod getirmekten hedef dizine yerleştirmeye kadar yürütülen tüm komutların kaydını sağlar. “ Daha fazla göster ” seçeneğine tıklayarak daha fazla bilgi edinmek için günlük satırları genişletebilirsiniz. Bir deponun bağlantısını kesme Sitenizden bir GitHub reposunun bağlantısını kestiğinizde, gelecekte yapılacak değişiklikler sitenizi etkilemeyecektir. Varsayılan olarak, dağıtılan dosyalar sitenizde kalır ancak bağlantı kesme işlemi sırasında bunları kaldırma seçeneğiniz vardır. Bir depoyu kaldırmak için: https://wordpress.com/sites adresindeki Siteler sayfanızı ziyaret edin Site genel bakışı için sitenizin adına tıklayın. Dağıtımlar sekmesine tıklayın. Dizindeki üç nokta menüsüne (⋮) tıklayın. “ Deponun bağlantısını kes ” seçeneğini seçin. Bir iletişim penceresi görünecektir. İlişkili dosyaları siteden kaldırmak için geçişe tıklayın. İletişim kutusunu kapatmak ve depo bağlantısını kesmek için “ Deponun bağlantısını kes “e tıklayın. Geliştiriciler için WordPress.com kurulu GitHub Uygulamalarınızda ve Yetkili GitHub Uygulamalarınızda görünmeye devam edecektir. Bunun sebebi WordPress.com’un hâlâ depoya erişime sahip olması ancak bağlantının silinmiş olmasıdır. WordPress.com’un GitHub’dan bağlantısını kaldırma Ayrıca WordPress.com’un GitHub hesabınıza erişimini iptal etmeyi seçebilirsiniz. İstediğiniz zaman GitHub’dan Uygulamalar ayarlarınızı ziyaret ederek yapabilirsiniz. GitHub hesabınıza yetkili uygulama erişimini iptal etmek için: Yetkili GitHub Uygulamalarına gidin. Geliştiriciler için WordPress.com adresinin yanındaki İptal ‘e tıklayın. “ Anlıyorum, erişimi iptal et ” düğmesine tıklayın. Yetkili uygulama erişimini iptal etseniz bile, seçilen hesaplarda Geliştiriciler için WordPress.com uygulaması kurulu kalacağından kod yine de dağıtılabilir. WordPress.com kurulumuna erişimi iptal etmek ve WordPress.com sitenize kod dağıtma özelliğini devre dışı bırakmak için: Yüklü GitHub Uygulamalarına gidin. Geliştiriciler için WordPress.com adresinin yanındaki Yapılandır ‘a tıklayın. Tehlikeli bölge alanında, Kaldır ‘a tıklayın ve istendiğinde Tamam ‘a tıklayın. WordPress.com’yi yetkili uygulamalar listesinden kaldırmak, depoların silineceği veya çalışmasının duracağı anlamına gelmez ; WordPress.com’un erişimini iptal ettiğinizde depolarınız GitHub’da olmaya devam edecek ancak WordPress.com artık kod dağıtamayacaktır. İlgili Kılavuzlar Web Sitenizi Yedekleme ve Geri Yükleme 8 dakikalık okuma SSH’ye Bağlanma 4 dakikalık okuma Sitenizin veritabanına erişme 3 dakikalık okuma Savunma modunu etkinleştirme 2 dakikalık okuma Bu kılavuzda Video eğitimi Bir dizin bağlama Dağıtım ayarlarını yönetme Gelişmiş dağıtım Kodunuzu dağıtma Mevcut bağlantıları yönetme Dağıtım çalıştırması günlükleri Bir deponun bağlantısını kesme WordPress.com'un GitHub'dan bağlantısını kaldırma Sorularınız mı var? Yapay Zeka Asistanımıza sorun Başa dön İhtiyacınız olanı bulamadınız mı? Bizimle iletişim kurun Yapay Zeka asistanımızdan sorularınıza yanıt alın ve ücretli paketlerde 7/24 uzman desteği alın. Forumumuzda bir soru sorun Sorulara göz atın ve diğer deneyimli kullanıcılardan yanıt alın. Copied to clipboard! WordPress.com Ürünler WordPress Hosting Ajanslar için WordPress Bağlı Kuruluş Olun Alan Adları AI Web Sitesi Oluşturucu Web Sitesi Oluşturucu Blog Oluştur Profesyonel E-posta Web Sitesi Tasarım Hizmetleri WordPress Studio Kurumsal WordPress Özellikler Genel görünüm WordPress Temaları WordPress Eklentileri WordPress Desenleri Google Apps Kaynaklar WordPress.com Blog İşletme Adı Üreteci Logo Oluşturucu WordPress.com Okuyucu Erişilebilirlik Abonelikleri Kaldırın Yardım Destek Merkezi Kılavuzlar Kurslar Forumlar İletişim Geliştirici kaynakları Şirket Hakkında Basın Hizmet Koşulları Gizlilik Politikası Kişisel Bilgilerimi Satma veya Paylaşma Kaliforniya'daki Kullanıcılar için Gizlilik Bildirimi Deutsch Español Français Bahasa Indonesia Italiano Nederlands Português do Brasil Svenska Türkçe Русский العربية עִבְרִית 日本語 한국어 简体中文 繁體中文 English Deutsch Español Français Bahasa Indonesia Italiano Nederlands Português do Brasil Svenska Türkçe Русский العربية עִבְרִית 日本語 한국어 简体中文 繁體中文 English Mobil Uygulamalar Şu adresten indirin: App Store Şu adresten edinin: Google Play Sosyal Medya Facebook'ta WordPress.com X'te (Twitter) WordPress.com Instagram'da WordPress.com YouTube'da WordPress.com Automattic Automattic Bizimle Çalışın Yorumlar Yükleniyor... Yorum Yapın... E-posta (Gerekli) İsim (Gerekli) İnternet sitesi WordPress.com Destek Kaydolun Giriş Kısa adresi kopyala Bu içeriği rapor et Abonelikleri Yönet | 2026-01-13T09:29:32 |
http://groovy-lang.org/syntax.html#_characters | The Apache Groovy programming language - Syntax Socialize Discuss on the mailing-list Groovy on X Groovy on Bluesky Groovy on Mastodon Groovy on LinkedIn Events and conferences Source code on GitHub Report issues in Jira Stack Overflow questions Slack Community You are using an outdated browser. Please upgrade your browser to improve your experience. Apache Groovy™ Learn Documentation Download Support Contribute Ecosystem Blog posts Socialize Table of contents 1. Comments 1.1. Single-line comment 1.2. Multiline comment 1.3. Groovydoc comment 1.4. Shebang line 2. Keywords 3. Identifiers 3.1. Normal identifiers 3.2. Quoted identifiers 4. Strings 4.1. Single-quoted string 4.2. String concatenation 4.3. Triple-single-quoted string 4.3.1. Escaping special characters 4.3.2. Unicode escape sequence 4.4. Double-quoted string 4.4.1. String interpolation 4.4.2. Special case of interpolating closure expressions 4.4.3. Interoperability with Java 4.4.4. GString and String hashCodes 4.5. Triple-double-quoted string 4.6. Slashy string 4.6.1. Special cases 4.7. Dollar slashy string 4.8. String summary table 4.9. Characters 5. Numbers 5.1. Integral literals 5.1.1. Alternative non-base 10 representations Binary literal Octal literal Hexadecimal literal 5.2. Decimal literals 5.3. Underscore in literals 5.4. Number type suffixes 5.5. Math operations 5.5.1. The case of the division operator 5.5.2. The case of the power operator 6. Booleans 7. Lists 8. Arrays 8.1. Java-style array initialization 9. Maps Syntax This chapter covers the syntax of the Groovy programming language. The grammar of the language derives from the Java grammar, but enhances it with specific constructs for Groovy, and allows certain simplifications. 1. Comments 1.1. Single-line comment Single-line comments start with // and can be found at any position in the line. The characters following // , until the end of the line, are considered part of the comment. // a standalone single line comment println "hello" // a comment till the end of the line 1.2. Multiline comment A multiline comment starts with /* and can be found at any position in the line. The characters following /* will be considered part of the comment, including new line characters, up to the first */ closing the comment. Multiline comments can thus be put at the end of a statement, or even inside a statement. /* a standalone multiline comment spanning two lines */ println "hello" /* a multiline comment starting at the end of a statement */ println 1 /* one */ + 2 /* two */ 1.3. Groovydoc comment Similarly to multiline comments, Groovydoc comments are multiline, but start with /** and end with */ . Lines following the first Groovydoc comment line can optionally start with a star * . Those comments are associated with: type definitions (classes, interfaces, enums, annotations), fields and properties definitions methods definitions Although the compiler will not complain about Groovydoc comments not being associated with the above language elements, you should prepend those constructs with the comment right before it. /** * A Class description */ class Person { /** the name of the person */ String name /** * Creates a greeting method for a certain person. * * @param otherPerson the person to greet * @return a greeting message */ String greet(String otherPerson) { "Hello ${otherPerson}" } } Groovydoc follows the same conventions as Java’s own Javadoc. So you’ll be able to use the same tags as with Javadoc. In addition, Groovy supports Runtime Groovydoc since 3.0.0, i.e. Groovydoc can be retained at runtime. Runtime Groovydoc is disabled by default. It can be enabled by adding JVM option -Dgroovy.attach.runtime.groovydoc=true The Runtime Groovydoc starts with /**@ and ends with */ , for example: /**@ * Some class groovydoc for Foo */ class Foo { /**@ * Some method groovydoc for bar */ void bar() { } } assert Foo.class.groovydoc.content.contains('Some class groovydoc for Foo') (1) assert Foo.class.getMethod('bar', new Class[0]).groovydoc.content.contains('Some method groovydoc for bar') (2) 1 Get the runtime groovydoc for class Foo 2 Get the runtime groovydoc for method bar 1.4. Shebang line Beside the single-line comment, there is a special line comment, often called the shebang line understood by UNIX systems which allows scripts to be run directly from the command-line, provided you have installed the Groovy distribution and the groovy command is available on the PATH . #!/usr/bin/env groovy println "Hello from the shebang line" The # character must be the first character of the file. Any indentation would yield a compilation error. 2. Keywords Groovy has the following reserved keywords: Table 1. Reserved Keywords abstract assert break case catch class const continue def default do else enum extends final finally for goto if implements import instanceof interface native new null non-sealed package public protected private return static strictfp super switch synchronized this threadsafe throw throws transient try while Of these, const , goto , strictfp , and threadsafe are not currently in use. The reserved keywords can’t in general be used for variable, field and method names. A trick allows methods to be defined having the same name as a keyword by surrounding the name in quotes as shown in the following example: // reserved keywords can be used for method names if quoted def "abstract"() { true } // when calling such methods, the name must be qualified using "this." this.abstract() Using such names might be confusing and is often best to avoid. The trick is primarily intended to enable certain Java integration scenarios and certain DSL scenarios where having "verbs" and "nouns" with the same name as keywords may be desirable. In addition, Groovy has the following contextual keywords: Table 2. Contextual Keywords as in permits record sealed trait var yields These words are only keywords in certain contexts and can be more freely used in some places, in particular for variables, fields and method names. This extra lenience allows using method or variable names that were not keywords in earlier versions of Groovy or are not keywords in Java. Examples are shown here: // contextual keywords can be used for field and variable names def as = true assert as // contextual keywords can be used for method names def in() { true } // when calling such methods, the name only needs to be qualified using "this." in scenarios which would be ambiguous this.in() Groovy programmers familiar with these contextual keywords may still wish to avoid using those names unless there is a good reason to use such a name. The restrictions on reserved keywords also apply for the primitive types, the boolean literals and the null literal (all of which are discussed later): Table 3. Other reserved words null true false boolean char byte short int long float double While not recommended, the same trick as for reserved keywords can be used: def "null"() { true } // not recommended; potentially confusing assert this.null() // must be qualified Using such words as method names is potentially confusing and is often best to avoid, however, it might be useful for certain kinds of DSLs . 3. Identifiers 3.1. Normal identifiers Identifiers start with a letter, a dollar or an underscore. They cannot start with a number. A letter can be in the following ranges: 'a' to 'z' (lowercase ascii letter) 'A' to 'Z' (uppercase ascii letter) '\u00C0' to '\u00D6' '\u00D8' to '\u00F6' '\u00F8' to '\u00FF' '\u0100' to '\uFFFE' Then following characters can contain letters and numbers. Here are a few examples of valid identifiers (here, variable names): def name def item3 def with_underscore def $dollarStart But the following ones are invalid identifiers: def 3tier def a+b def a#b All keywords are also valid identifiers when following a dot: foo.as foo.assert foo.break foo.case foo.catch 3.2. Quoted identifiers Quoted identifiers appear after the dot of a dotted expression. For instance, the name part of the person.name expression can be quoted with person."name" or person.'name' . This is particularly interesting when certain identifiers contain illegal characters that are forbidden by the Java Language Specification, but which are allowed by Groovy when quoted. For example, characters like a dash, a space, an exclamation mark, etc. def map = [:] map."an identifier with a space and double quotes" = "ALLOWED" map.'with-dash-signs-and-single-quotes' = "ALLOWED" assert map."an identifier with a space and double quotes" == "ALLOWED" assert map.'with-dash-signs-and-single-quotes' == "ALLOWED" As we shall see in the following section on strings , Groovy provides different string literals. All kind of strings are actually allowed after the dot: map.'single quote' map."double quote" map.'''triple single quote''' map."""triple double quote""" map./slashy string/ map.$/dollar slashy string/$ There’s a difference between plain character strings and Groovy’s GStrings (interpolated strings), as in that the latter case, the interpolated values are inserted in the final string for evaluating the whole identifier: def firstname = "Homer" map."Simpson-${firstname}" = "Homer Simpson" assert map.'Simpson-Homer' == "Homer Simpson" 4. Strings Text literals are represented in the form of chain of characters called strings. Groovy lets you instantiate java.lang.String objects, as well as GStrings ( groovy.lang.GString ) which are also called interpolated strings in other programming languages. 4.1. Single-quoted string Single-quoted strings are a series of characters surrounded by single quotes: 'a single-quoted string' Single-quoted strings are plain java.lang.String and don’t support interpolation. 4.2. String concatenation All the Groovy strings can be concatenated with the + operator: assert 'ab' == 'a' + 'b' 4.3. Triple-single-quoted string Triple-single-quoted strings are a series of characters surrounded by triplets of single quotes: '''a triple-single-quoted string''' Triple-single-quoted strings are plain java.lang.String and don’t support interpolation. Triple-single-quoted strings may span multiple lines. The content of the string can cross line boundaries without the need to split the string in several pieces and without concatenation or newline escape characters: def aMultilineString = '''line one line two line three''' If your code is indented, for example in the body of the method of a class, your string will contain the whitespace of the indentation. The Groovy Development Kit contains methods for stripping out the indentation with the String#stripIndent() method, and with the String#stripMargin() method that takes a delimiter character to identify the text to remove from the beginning of a string. When creating a string as follows: def startingAndEndingWithANewline = ''' line one line two line three ''' You will notice that the resulting string contains a newline character as first character. It is possible to strip that character by escaping the newline with a backslash: def strippedFirstNewline = '''\ line one line two line three ''' assert !strippedFirstNewline.startsWith('\n') 4.3.1. Escaping special characters You can escape single quotes with the backslash character to avoid terminating the string literal: 'an escaped single quote: \' needs a backslash' And you can escape the escape character itself with a double backslash: 'an escaped escape character: \\ needs a double backslash' Some special characters also use the backslash as escape character: Escape sequence Character \b backspace \f formfeed \n newline \r carriage return \s single space \t tabulation \\ backslash \' single quote within a single-quoted string (and optional for triple-single-quoted and double-quoted strings) \" double quote within a double-quoted string (and optional for triple-double-quoted and single-quoted strings) We’ll see some more escaping details when it comes to other types of strings discussed later. 4.3.2. Unicode escape sequence For characters that are not present on your keyboard, you can use unicode escape sequences: a backslash, followed by 'u', then 4 hexadecimal digits. For example, the Euro currency symbol can be represented with: 'The Euro currency symbol: \u20AC' 4.4. Double-quoted string Double-quoted strings are a series of characters surrounded by double quotes: "a double-quoted string" Double-quoted strings are plain java.lang.String if there’s no interpolated expression, but are groovy.lang.GString instances if interpolation is present. To escape a double quote, you can use the backslash character: "A double quote: \"". 4.4.1. String interpolation Any Groovy expression can be interpolated in all string literals, apart from single and triple-single-quoted strings. Interpolation is the act of replacing a placeholder in the string with its value upon evaluation of the string. The placeholder expressions are surrounded by ${} . The curly braces may be omitted for unambiguous dotted expressions, i.e. we can use just a $ prefix in those cases. If the GString is ever passed to a method taking a String, the expression value inside the placeholder is evaluated to its string representation (by calling toString() on that expression) and the resulting String is passed to the method. Here, we have a string with a placeholder referencing a local variable: def name = 'Guillaume' // a plain string def greeting = "Hello ${name}" assert greeting.toString() == 'Hello Guillaume' Any Groovy expression is valid, as we can see in this example with an arithmetic expression: def sum = "The sum of 2 and 3 equals ${2 + 3}" assert sum.toString() == 'The sum of 2 and 3 equals 5' Not only are expressions allowed in between the ${} placeholder, but so are statements. However, a statement’s value is just null . So if several statements are inserted in that placeholder, the last one should somehow return a meaningful value to be inserted. For instance, "The sum of 1 and 2 is equal to ${def a = 1; def b = 2; a + b}" is supported and works as expected but a good practice is usually to stick to simple expressions inside GString placeholders. In addition to ${} placeholders, we can also use a lone $ sign prefixing a dotted expression: def person = [name: 'Guillaume', age: 36] assert "$person.name is $person.age years old" == 'Guillaume is 36 years old' But only dotted expressions of the form a.b , a.b.c , etc, are valid. Expressions containing parentheses like method calls, curly braces for closures, dots which aren’t part of a property expression or arithmetic operators would be invalid. Given the following variable definition of a number: def number = 3.14 The following statement will throw a groovy.lang.MissingPropertyException because Groovy believes you’re trying to access the toString property of that number, which doesn’t exist: shouldFail(MissingPropertyException) { println "$number.toString()" } You can think of "$number.toString()" as being interpreted by the parser as "${number.toString}()" . Similarly, if the expression is ambiguous, you need to keep the curly braces: String thing = 'treasure' assert 'The x-coordinate of the treasure is represented by treasure.x' == "The x-coordinate of the $thing is represented by $thing.x" // <= Not allowed: ambiguous!! assert 'The x-coordinate of the treasure is represented by treasure.x' == "The x-coordinate of the $thing is represented by ${thing}.x" // <= Curly braces required If you need to escape the $ or ${} placeholders in a GString so they appear as is without interpolation, you just need to use a \ backslash character to escape the dollar sign: assert '$5' == "\$5" assert '${name}' == "\${name}" 4.4.2. Special case of interpolating closure expressions So far, we’ve seen we could interpolate arbitrary expressions inside the ${} placeholder, but there is a special case and notation for closure expressions. When the placeholder contains an arrow, ${→} , the expression is actually a closure expression — you can think of it as a closure with a dollar prepended in front of it: def sParameterLessClosure = "1 + 2 == ${-> 3}" (1) assert sParameterLessClosure == '1 + 2 == 3' def sOneParamClosure = "1 + 2 == ${ w -> w << 3}" (2) assert sOneParamClosure == '1 + 2 == 3' 1 The closure is a parameterless closure which doesn’t take arguments. 2 Here, the closure takes a single java.io.StringWriter argument, to which you can append content with the << leftShift operator. In either case, both placeholders are embedded closures. In appearance, it looks like a more verbose way of defining expressions to be interpolated, but closures have an interesting advantage over mere expressions: lazy evaluation. Let’s consider the following sample: def number = 1 (1) def eagerGString = "value == ${number}" def lazyGString = "value == ${ -> number }" assert eagerGString == "value == 1" (2) assert lazyGString == "value == 1" (3) number = 2 (4) assert eagerGString == "value == 1" (5) assert lazyGString == "value == 2" (6) 1 We define a number variable containing 1 that we then interpolate within two GStrings, as an expression in eagerGString and as a closure in lazyGString . 2 We expect the resulting string to contain the same string value of 1 for eagerGString . 3 Similarly for lazyGString 4 Then we change the value of the variable to a new number 5 With a plain interpolated expression, the value was actually bound at the time of creation of the GString. 6 But with a closure expression, the closure is called upon each coercion of the GString into String, resulting in an updated string containing the new number value. An embedded closure expression taking more than one parameter will generate an exception at runtime. Only closures with zero or one parameter are allowed. 4.4.3. Interoperability with Java When a method (whether implemented in Java or Groovy) expects a java.lang.String , but we pass a groovy.lang.GString instance, the toString() method of the GString is automatically and transparently called. String takeString(String message) { (4) assert message instanceof String (5) return message } def message = "The message is ${'hello'}" (1) assert message instanceof GString (2) def result = takeString(message) (3) assert result instanceof String assert result == 'The message is hello' 1 We create a GString variable 2 We double-check it’s an instance of the GString 3 We then pass that GString to a method taking a String as parameter 4 The signature of the takeString() method explicitly says its sole parameter is a String 5 We also verify that the parameter is indeed a String and not a GString. 4.4.4. GString and String hashCodes Although interpolated strings can be used in lieu of plain Java strings, they differ with strings in a particular way: their hashCodes are different. Plain Java strings are immutable, whereas the resulting String representation of a GString can vary, depending on its interpolated values. Even for the same resulting string, GStrings and Strings don’t have the same hashCode. assert "one: ${1}".hashCode() != "one: 1".hashCode() GString and Strings having different hashCode values, using GString as Map keys should be avoided, especially if we try to retrieve an associated value with a String instead of a GString. def key = "a" def m = ["${key}": "letter ${key}"] (1) assert m["a"] == null (2) 1 The map is created with an initial pair whose key is a GString 2 When we try to fetch the value with a String key, we will not find it, as Strings and GString have different hashCode values 4.5. Triple-double-quoted string Triple-double-quoted strings behave like double-quoted strings, with the addition that they are multiline, like the triple-single-quoted strings. def name = 'Groovy' def template = """ Dear Mr ${name}, You're the winner of the lottery! Yours sincerly, Dave """ assert template.toString().contains('Groovy') Neither double quotes nor single quotes need be escaped in triple-double-quoted strings. 4.6. Slashy string Beyond the usual quoted strings, Groovy offers slashy strings, which use / as the opening and closing delimiter. Slashy strings are particularly useful for defining regular expressions and patterns, as there is no need to escape backslashes. Example of a slashy string: def fooPattern = /.*foo.*/ assert fooPattern == '.*foo.*' Only forward slashes need to be escaped with a backslash: def escapeSlash = /The character \/ is a forward slash/ assert escapeSlash == 'The character / is a forward slash' Slashy strings are multiline: def multilineSlashy = /one two three/ assert multilineSlashy.contains('\n') Slashy strings can be thought of as just another way to define a GString but with different escaping rules. They hence support interpolation: def color = 'blue' def interpolatedSlashy = /a ${color} car/ assert interpolatedSlashy == 'a blue car' 4.6.1. Special cases An empty slashy string cannot be represented with a double forward slash, as it’s understood by the Groovy parser as a line comment. That’s why the following assert would actually not compile as it would look like a non-terminated statement: assert '' == // As slashy strings were mostly designed to make regexp easier so a few things that are errors in GStrings like $() or $5 will work with slashy strings. Remember that escaping backslashes is not required. An alternative way of thinking of this is that in fact escaping is not supported. The slashy string /\t/ won’t contain a tab but instead a backslash followed by the character 't'. Escaping is only allowed for the slash character, i.e. /\/folder/ will be a slashy string containing '/folder' . A consequence of slash escaping is that a slashy string can’t end with a backslash. Otherwise that will escape the slashy string terminator. You can instead use a special trick, /ends with slash ${'\\'}/ . But best just avoid using a slashy string in such a case. 4.7. Dollar slashy string Dollar slashy strings are multiline GStrings delimited with an opening $/ and a closing /$ . The escaping character is the dollar sign, and it can escape another dollar, or a forward slash. Escaping for the dollar and forward slash characters is only needed where conflicts arise with the special use of those characters. The characters $foo would normally indicate a GString placeholder, so those four characters can be entered into a dollar slashy string by escaping the dollar, i.e. $$foo . Similarly, you will need to escape a dollar slashy closing delimiter if you want it to appear in your string. Here are a few examples: def name = "Guillaume" def date = "April, 1st" def dollarSlashy = $/ Hello $name, today we're ${date}. $ dollar sign $$ escaped dollar sign \ backslash / forward slash $/ escaped forward slash $$$/ escaped opening dollar slashy $/$$ escaped closing dollar slashy /$ assert [ 'Guillaume', 'April, 1st', '$ dollar sign', '$ escaped dollar sign', '\\ backslash', '/ forward slash', '/ escaped forward slash', '$/ escaped opening dollar slashy', '/$ escaped closing dollar slashy' ].every { dollarSlashy.contains(it) } It was created to overcome some of the limitations of the slashy string escaping rules. Use it when its escaping rules suit your string contents (typically if it has some slashes you don’t want to escape). 4.8. String summary table String name String syntax Interpolated Multiline Escape character Single-quoted '…​' \ Triple-single-quoted '''…​''' \ Double-quoted "…​" \ Triple-double-quoted """…​""" \ Slashy /…​/ \ Dollar slashy $/…​/$ $ 4.9. Characters Unlike Java, Groovy doesn’t have an explicit character literal. However, you can be explicit about making a Groovy string an actual character, by three different means: char c1 = 'A' (1) assert c1 instanceof Character def c2 = 'B' as char (2) assert c2 instanceof Character def c3 = (char)'C' (3) assert c3 instanceof Character 1 by being explicit when declaring a variable holding the character by specifying the char type 2 by using type coercion with the as operator 3 by using a cast to char operation The first option 1 is interesting when the character is held in a variable, while the other two ( 2 and 3 ) are more interesting when a char value must be passed as argument of a method call. 5. Numbers Groovy supports different kinds of integral literals and decimal literals, backed by the usual Number types of Java. 5.1. Integral literals The integral literal types are the same as in Java: byte char short int long java.math.BigInteger You can create integral numbers of those types with the following declarations: // primitive types byte b = 1 char c = 2 short s = 3 int i = 4 long l = 5 // infinite precision BigInteger bi = 6 If you use optional typing by using the def keyword, the type of the integral number will vary: it’ll adapt to the capacity of the type that can hold that number. For positive numbers: def a = 1 assert a instanceof Integer // Integer.MAX_VALUE def b = 2147483647 assert b instanceof Integer // Integer.MAX_VALUE + 1 def c = 2147483648 assert c instanceof Long // Long.MAX_VALUE def d = 9223372036854775807 assert d instanceof Long // Long.MAX_VALUE + 1 def e = 9223372036854775808 assert e instanceof BigInteger As well as for negative numbers: def na = -1 assert na instanceof Integer // Integer.MIN_VALUE def nb = -2147483648 assert nb instanceof Integer // Integer.MIN_VALUE - 1 def nc = -2147483649 assert nc instanceof Long // Long.MIN_VALUE def nd = -9223372036854775808 assert nd instanceof Long // Long.MIN_VALUE - 1 def ne = -9223372036854775809 assert ne instanceof BigInteger 5.1.1. Alternative non-base 10 representations Numbers can also be represented in binary, octal, hexadecimal and decimal bases. Binary literal Binary numbers start with a 0b prefix: int xInt = 0b10101111 assert xInt == 175 short xShort = 0b11001001 assert xShort == 201 as short byte xByte = 0b11 assert xByte == 3 as byte long xLong = 0b101101101101 assert xLong == 2925l BigInteger xBigInteger = 0b111100100001 assert xBigInteger == 3873g int xNegativeInt = -0b10101111 assert xNegativeInt == -175 Octal literal Octal numbers are specified in the typical format of 0 followed by octal digits. int xInt = 077 assert xInt == 63 short xShort = 011 assert xShort == 9 as short byte xByte = 032 assert xByte == 26 as byte long xLong = 0246 assert xLong == 166l BigInteger xBigInteger = 01111 assert xBigInteger == 585g int xNegativeInt = -077 assert xNegativeInt == -63 Hexadecimal literal Hexadecimal numbers are specified in the typical format of 0x followed by hex digits. int xInt = 0x77 assert xInt == 119 short xShort = 0xaa assert xShort == 170 as short byte xByte = 0x3a assert xByte == 58 as byte long xLong = 0xffff assert xLong == 65535l BigInteger xBigInteger = 0xaaaa assert xBigInteger == 43690g Double xDouble = new Double('0x1.0p0') assert xDouble == 1.0d int xNegativeInt = -0x77 assert xNegativeInt == -119 5.2. Decimal literals The decimal literal types are the same as in Java: float double java.math.BigDecimal You can create decimal numbers of those types with the following declarations: // primitive types float f = 1.234 double d = 2.345 // infinite precision BigDecimal bd = 3.456 Decimals can use exponents, with the e or E exponent letter, followed by an optional sign, and an integral number representing the exponent: assert 1e3 == 1_000.0 assert 2E4 == 20_000.0 assert 3e+1 == 30.0 assert 4E-2 == 0.04 assert 5e-1 == 0.5 Conveniently for exact decimal number calculations, Groovy chooses java.math.BigDecimal as its decimal number type. In addition, both float and double are supported, but require an explicit type declaration, type coercion or suffix. Even if BigDecimal is the default for decimal numbers, such literals are accepted in methods or closures taking float or double as parameter types. Decimal numbers can’t be represented using a binary, octal or hexadecimal representation. 5.3. Underscore in literals When writing long literal numbers, it’s harder on the eye to figure out how some numbers are grouped together, for example with groups of thousands, of words, etc. By allowing you to place underscore in number literals, it’s easier to spot those groups: long creditCardNumber = 1234_5678_9012_3456L long socialSecurityNumbers = 999_99_9999L double monetaryAmount = 12_345_132.12 long hexBytes = 0xFF_EC_DE_5E long hexWords = 0xFFEC_DE5E long maxLong = 0x7fff_ffff_ffff_ffffL long alsoMaxLong = 9_223_372_036_854_775_807L long bytes = 0b11010010_01101001_10010100_10010010 5.4. Number type suffixes We can force a number (including binary, octals and hexadecimals) to have a specific type by giving a suffix (see table below), either uppercase or lowercase. Type Suffix BigInteger G or g Long L or l Integer I or i BigDecimal G or g Double D or d Float F or f Examples: assert 42I == Integer.valueOf('42') assert 42i == Integer.valueOf('42') // lowercase i more readable assert 123L == Long.valueOf("123") // uppercase L more readable assert 2147483648 == Long.valueOf('2147483648') // Long type used, value too large for an Integer assert 456G == new BigInteger('456') assert 456g == new BigInteger('456') assert 123.45 == new BigDecimal('123.45') // default BigDecimal type used assert .321 == new BigDecimal('.321') assert 1.200065D == Double.valueOf('1.200065') assert 1.234F == Float.valueOf('1.234') assert 1.23E23D == Double.valueOf('1.23E23') assert 0b1111L.class == Long // binary assert 0xFFi.class == Integer // hexadecimal assert 034G.class == BigInteger // octal 5.5. Math operations Although operators are covered in more detail elsewhere, it’s important to discuss the behavior of math operations and what their resulting types are. Division and power binary operations aside (covered below), binary operations between byte , char , short and int result in int binary operations involving long with byte , char , short and int result in long binary operations involving BigInteger and any other integral type result in BigInteger binary operations involving BigDecimal with byte , char , short , int and BigInteger result in BigDecimal binary operations between float , double and BigDecimal result in double binary operations between two BigDecimal result in BigDecimal The following table summarizes those rules: byte char short int long BigInteger float double BigDecimal byte int int int int long BigInteger double double BigDecimal char int int int long BigInteger double double BigDecimal short int int long BigInteger double double BigDecimal int int long BigInteger double double BigDecimal long long BigInteger double double BigDecimal BigInteger BigInteger double double BigDecimal float double double double double double double BigDecimal BigDecimal Thanks to Groovy’s operator overloading, the usual arithmetic operators work as well with BigInteger and BigDecimal , unlike in Java where you have to use explicit methods for operating on those numbers. 5.5.1. The case of the division operator The division operators / (and /= for division and assignment) produce a double result if either operand is a float or double , and a BigDecimal result otherwise (when both operands are any combination of an integral type short , char , byte , int , long , BigInteger or BigDecimal ). BigDecimal division is performed with the divide() method if the division is exact (i.e. yielding a result that can be represented within the bounds of the same precision and scale), or using a MathContext with a precision of the maximum of the two operands' precision plus an extra precision of 10, and a scale of the maximum of 10 and the maximum of the operands' scale. For integer division like in Java, you should use the intdiv() method, as Groovy doesn’t provide a dedicated integer division operator symbol. 5.5.2. The case of the power operator The power operation is represented by the ** operator, with two parameters: the base and the exponent. The result of the power operation depends on its operands, and the result of the operation (in particular if the result can be represented as an integral value). The following rules are used by Groovy’s power operation to determine the resulting type: If the exponent is a decimal value if the result can be represented as an Integer , then return an Integer else if the result can be represented as a Long , then return a Long otherwise return a Double If the exponent is an integral value if the exponent is strictly negative, then return an Integer , Long or Double if the result value fits in that type if the exponent is positive or zero if the base is a BigDecimal , then return a BigDecimal result value if the base is a BigInteger , then return a BigInteger result value if the base is an Integer , then return an Integer if the result value fits in it, otherwise a BigInteger if the base is a Long , then return a Long if the result value fits in it, otherwise a BigInteger We can illustrate those rules with a few examples: // base and exponent are ints and the result can be represented by an Integer assert 2 ** 3 instanceof Integer // 8 assert 10 ** 9 instanceof Integer // 1_000_000_000 // the base is a long, so fit the result in a Long // (although it could have fit in an Integer) assert 5L ** 2 instanceof Long // 25 // the result can't be represented as an Integer or Long, so return a BigInteger assert 100 ** 10 instanceof BigInteger // 10e20 assert 1234 ** 123 instanceof BigInteger // 170515806212727042875... // the base is a BigDecimal and the exponent a negative int // but the result can be represented as an Integer assert 0.5 ** -2 instanceof Integer // 4 // the base is an int, and the exponent a negative float // but again, the result can be represented as an Integer assert 1 ** -0.3f instanceof Integer // 1 // the base is an int, and the exponent a negative int // but the result will be calculated as a Double // (both base and exponent are actually converted to doubles) assert 10 ** -1 instanceof Double // 0.1 // the base is a BigDecimal, and the exponent is an int, so return a BigDecimal assert 1.2 ** 10 instanceof BigDecimal // 6.1917364224 // the base is a float or double, and the exponent is an int // but the result can only be represented as a Double value assert 3.4f ** 5 instanceof Double // 454.35430372146965 assert 5.6d ** 2 instanceof Double // 31.359999999999996 // the exponent is a decimal value // and the result can only be represented as a Double value assert 7.8 ** 1.9 instanceof Double // 49.542708423868476 assert 2 ** 0.1f instanceof Double // 1.0717734636432956 6. Booleans Boolean is a special data type that is used to represent truth values: true and false . Use this data type for simple flags that track true/false conditions . Boolean values can be stored in variables, assigned into fields, just like any other data type: def myBooleanVariable = true boolean untypedBooleanVar = false booleanField = true true and false are the only two primitive boolean values. But more complex boolean expressions can be represented using logical operators . In addition, Groovy has special rules (often referred to as Groovy Truth ) for coercing non-boolean objects to a boolean value. 7. Lists Groovy uses a comma-separated list of values, surrounded by square brackets, to denote lists. Groovy lists are plain JDK java.util.List , as Groovy doesn’t define its own collection classes. The concrete list implementation used when defining list literals are java.util.ArrayList by default, unless you decide to specify otherwise, as we shall see later on. def numbers = [1, 2, 3] (1) assert numbers instanceof List (2) assert numbers.size() == 3 (3) 1 We define a list numbers delimited by commas and surrounded by square brackets, and we assign that list into a variable 2 The list is an instance of Java’s java.util.List interface 3 The size of the list can be queried with the size() method, and shows our list contains 3 elements In the above example, we used a homogeneous list, but you can also create lists containing values of heterogeneous types: def heterogeneous = [1, "a", true] (1) 1 Our list here contains a number, a string and a boolean value We mentioned that by default, list literals are actually instances of java.util.ArrayList , but it is possible to use a different backing type for our lists, thanks to using type coercion with the as operator, or with explicit type declaration for your variables: def arrayList = [1, 2, 3] assert arrayList instanceof java.util.ArrayList def linkedList = [2, 3, 4] as LinkedList (1) assert linkedList instanceof java.util.LinkedList LinkedList otherLinked = [3, 4, 5] (2) assert otherLinked instanceof java.util.LinkedList 1 We use coercion with the as operator to explicitly request a java.util.LinkedList implementation 2 We can say that the variable holding the list literal is of type java.util.LinkedList You can access elements of the list with the [] subscript operator (both for reading and setting values) with positive indices or negative indices to access elements from the end of the list, as well as with ranges, and use the << leftShift operator to append elements to a list: def letters = ['a', 'b', 'c', 'd'] assert letters[0] == 'a' (1) assert letters[1] == 'b' assert letters[-1] == 'd' (2) assert letters[-2] == 'c' letters[2] = 'C' (3) assert letters[2] == 'C' letters << 'e' (4) assert letters[ 4] == 'e' assert letters[-1] == 'e' assert letters[1, 3] == ['b', 'd'] (5) assert letters[2..4] == ['C', 'd', 'e'] (6) 1 Access the first element of the list (zero-based counting) 2 Access the last element of the list with a negative index: -1 is the first element from the end of the list 3 Use an assignment to set a new value for the third element of the list 4 Use the << leftShift operator to append an element at the end of the list 5 Access two elements at once, returning a new list containing those two elements 6 Use a range to access a range of values from the list, from a start to an end element position As lists can be heterogeneous in nature, lists can also contain other lists to create multidimensional lists: def multi = [[0, 1], [2, 3]] (1) assert multi[1][0] == 2 (2) 1 Define a list of numbers 2 Access the second element of the top-most list, and the first element of the inner list 8. Arrays Groovy reuses the list notation for arrays, but to make such literals arrays, you need to explicitly define the type of the array through coercion or type declaration. String[] arrStr = ['Ananas', 'Banana', 'Kiwi'] (1) assert arrStr instanceof String[] (2) assert !(arrStr instanceof List) def numArr = [1, 2, 3] as int[] (3) assert numArr instanceof int[] (4) assert numArr.size() == 3 1 Define an array of strings using explicit variable type declaration 2 Assert that we created an array of strings 3 Create an array of ints with the as operator 4 Assert that we created an array of primitive ints You can also create multi-dimensional arrays: def matrix3 = new Integer[3][3] (1) assert matrix3.size() == 3 Integer[][] matrix2 (2) matrix2 = [[1, 2], [3, 4]] assert matrix2 instanceof Integer[][] 1 You can define the bounds of a new array 2 Or declare an array without specifying its bounds Access to elements of an array follows the same notation as for lists: String[] names = ['Cédric', 'Guillaume', 'Jochen', 'Paul'] assert names[0] == 'Cédric' (1) names[2] = 'Blackdrag' (2) assert names[2] == 'Blackdrag' 1 Retrieve the first element of the array 2 Set the value of the third element of the array to a new value 8.1. Java-style array initialization Groovy has always supported literal list/array definitions using square brackets and has avoided Java-style curly braces so as not to conflict with closure definitions. In the case where the curly braces come immediately after an array type declaration however, there is no ambiguity with closure definitions, so Groovy 3 and above support that variant of the Java array initialization expression. Examples: def primes = new int[] {2, 3, 5, 7, 11} assert primes.size() == 5 && primes.sum() == 28 assert primes.class.name == '[I' def pets = new String[] {'cat', 'dog'} assert pets.size() == 2 && pets.sum() == 'catdog' assert pets.class.name == '[Ljava.lang.String;' // traditional Groovy alternative still supported String[] groovyBooks = [ 'Groovy in Action', 'Making Java Groovy' ] assert groovyBooks.every{ it.contains('Groovy') } 9. Maps Sometimes called dictionaries or associative arrays in other languages, Groovy features maps. Maps associate keys to values, separating keys and values with colons, and each key/value pairs with commas, and the whole keys and values surrounded by square brackets. def colors = [red: '#FF0000', green: '#00FF00', blue: '#0000FF'] (1) assert colors['red'] == '#FF0000' (2) assert colors.green == '#00FF00' (3) colors['pink'] = '#FF00FF' (4) colors.yellow = '#FFFF00' (5) assert colors.pink == '#FF00FF' assert colors['yellow'] == '#FFFF00' assert colors instanceof java.util.LinkedHashMap 1 We define a map of string color names, associated with their hexadecimal-coded html colors 2 We use the subscript notation to check the content associated with the red key 3 We can also use the property notation to assert the color green’s hexadecimal representation 4 Similarly, we can use the subscript notation to add a new key/value pair 5 Or the property notation, to add the yellow color When using names for the keys, we actually define string keys in the map. Groovy creates maps that are actually instances of java.util.LinkedHashMap . If you try to access a key which is not present in the map: assert colors.unknown == null def emptyMap = [:] assert emptyMap.anyKey == null You will retrieve a null result. In the examples above, we used string keys, but you can also use values of other types as keys: def numbers = [1: 'one', 2: 'two'] assert numbers[1] == 'one' Here, we used numbers as keys, as numbers can unambiguously be recognized as numbers, so Groovy will not create a string key like in our previous examples. But consider the case you want to pass a variable in lieu of the key, to have the value of that variable become the key: def key = 'name' def person = [key: 'Guillaume'] (1) assert !person.containsKey('name') (2) assert person.containsKey('key') (3) 1 The key associated with the 'Guillaume' name will actually be the "key" string, not the value associated with the key variable 2 The map doesn’t contain the 'name' key 3 Instead, the map contains a 'key' key You can also pass quoted strings as well as keys: ["name": "Guillaume"]. This is mandatory if your key string isn’t a valid identifier, for example if you wanted to create a string key containing a dash like in: ["street-name": "Main street"]. When you need to pass variable values as keys in your map definitions, you must surround the variable or expression with parentheses: person = [(key): 'Guillaume'] (1) assert person.containsKey('name') (2) assert !person.containsKey('key') (3) 1 This time, we surround the key variable with parentheses, to instruct the parser we are passing a variable rather than defining a string key 2 The map does contain the name key 3 But the map doesn’t contain the key key as before Groovy Learn Documentation Download Support Contribute Ecosystem Blog posts About Source code Security Books Thanks Sponsorship FAQ Search Socialize Discuss on the mailing-list Groovy on X Groovy on Bluesky Groovy on Mastodon Groovy on LinkedIn Events and conferences Source code on GitHub Report issues in Jira Stack Overflow questions Slack Community The Groovy programming language is supported by the Apache Software Foundation and the Groovy community. Apache, Apache Groovy, Groovy, and the ASF logo are either registered trademarks or trademarks of The Apache Software Foundation. © 2003-2025 the Apache Groovy project — Groovy is Open Source: license , privacy policy . | 2026-01-13T09:29:32 |
https://chromewebstore.google.com/detail/category/detail/volume-master/detail/jetwriter-ai-reply-emails/category/extensions/lifestyle/ | Chrome Web Store Skip to main content Chrome Web Store My extensions & themes Developer Dashboard Give feedback Sign in Discover Extensions Themes Welcome to Chrome Web Store Welcome to the Chrome Web Store Supercharge your browser with extensions and themes for Chrome See collection Favorites of 2025 Discover the standout AI extensions that made our year See collection Every day is Earth Day Plant trees, shop sustainably, and more See collection Adobe Photoshop Easily remove backgrounds, adjust colors and more. Plus, get 6 months free access to Photoshop web. 3.7 600K Users See details The future of writing Elevate your writing and create engaging and high-quality content effortlessly See collection 1 / 5 Top categories Shopping Entertainment Tools Art & Design Accessibility Top charts Trending Kami for Google Chrome™ Education 4.6 Average rating 4.6 out of 5 stars. Learn more about results and reviews. BetterCampus (prev. BetterCanvas) Education 4.9 Average rating 4.9 out of 5 stars. Learn more about results and reviews. Read&Write for Google Chrome™ Accessibility 3.4 Average rating 3.4 out of 5 stars. Learn more about results and reviews. See more Popular Volume Master Accessibility 4.8 Average rating 4.8 out of 5 stars. Learn more about results and reviews. Free VPN for Chrome - VPN Proxy VeePN Workflow & Planning 4.5 Average rating 4.5 out of 5 stars. Learn more about results and reviews. AdBlock — block ads across the web Workflow & Planning 4.5 Average rating 4.5 out of 5 stars. Learn more about results and reviews. See more New and notable Ad Block Wonder Privacy & Security 4.3 Average rating 4.3 out of 5 stars. Learn more about results and reviews. Smart popup blocker Tools 4.6 Average rating 4.6 out of 5 stars. Learn more about results and reviews. Manus AI Browser Operator Tools 4.5 Average rating 4.5 out of 5 stars. Learn more about results and reviews. See more Editors' Picks for you Handpicked by Chrome Editors See collection Extend your browser See more Discover a new level of convenience and customization with side panel extensions Chat with all AI models (Gemini, Claude, DeepSeek…) & AI Agents | AITOPIA 4.9 Average rating 4.9 out of 5 stars. Learn more about results and reviews. AI Agent Marketplace & AI Sidebar with all AI models (Gemini, Claude, DeepSeek & more) and hundreds of AI Agents Adobe Photoshop 3.7 Average rating 3.7 out of 5 stars. Learn more about results and reviews. Easily remove backgrounds, adjust colors and more. Plus, get 6 months free access to Photoshop web. BrowserGPT: ChatGPT Anywhere Powered by GPT 4 4.4 Average rating 4.4 out of 5 stars. Learn more about results and reviews. Write, reword, and translate 8x faster. Reply to emails in a click. Works on Google Docs, Gmail, YouTube, Twitter, Instagram, etc. Sidebar: ChatGPT, Bookmarks, GPT-4o | Meomni 4.8 Average rating 4.8 out of 5 stars. Learn more about results and reviews. Ultimate Sidebar ChatGPT Assistant, Bookmarks with AI, Calendar and Tasks Fleeting Notes 4.6 Average rating 4.6 out of 5 stars. Learn more about results and reviews. Quick notes from the browser to Obsidian Eclipse your screen Dim the lights with our dark mode selections See collection Chrome monthly spotlight Promising extensions to try out Web Highlights: PDF & Web Highlighter + Notes & AI Summary Productivity Highlighter & Annotation Tool for Websites & PDFs with AI Summary - free, easy to use, no sign-up required. Moonlight: AI Colleague for Research Papers Everything you need to read a paper: explanation, summary, translation, chat, and reference search. Reboost - Track Water Intake and Set Reminders Track your water intake and set custom reminders. Stay hydrated, stay on track, and never miss a break! ✨ YouTube Notes to Notion with Udemy, Coursera, BiliBili and more by Snipo Take YouTube notes directly to Notion, generate AI flashcards, capture screenshots, and sync learning courses with Notion Works with Gmail See more Boost your email productivity Boomerang for Gmail 4.2 Average rating 4.2 out of 5 stars. Learn more about results and reviews. Meeting scheduling and email management tool trusted by millions. Schedule meetings, track responses, send later, and more. Checker Plus for Gmail™ 4.7 Average rating 4.7 out of 5 stars. Learn more about results and reviews. Get notifications, read, listen to or delete emails without opening Gmail and easily manage multiple accounts. Email Tracker by Mailtrack® 4.4 Average rating 4.4 out of 5 stars. Learn more about results and reviews. Free, unlimited email tracker for Gmail, trusted by millions. Accurate, reliable, GDPR-compliant, and Google-audited. Streak CRM for Gmail 4.5 Average rating 4.5 out of 5 stars. Learn more about results and reviews. Manage sales and customer relationships directly inside Gmail. GMass: Powerful mail merge for Gmail 4.8 Average rating 4.8 out of 5 stars. Learn more about results and reviews. A powerful mass email and mail merge system for Gmail. Just for fun Bring some joy to your browser See collection Learn a new language See more Study while you browse Google Translate 4.2 Average rating 4.2 out of 5 stars. Learn more about results and reviews. View translations easily as you browse the web. By the Google Translate team. Rememberry - Translate and Memorize with Flashcards 4.6 Average rating 4.6 out of 5 stars. Learn more about results and reviews. Translate words while browsing and turn them into spaced repetition flashcards to build foreign language vocabulary. DeepL: translate and write with AI 4.7 Average rating 4.7 out of 5 stars. Learn more about results and reviews. Translate while you read and write with DeepL Translate, the world’s most accurate translator. Relingo - Master vocabulary while browsing websites and watching YouTube 4.6 Average rating 4.6 out of 5 stars. Learn more about results and reviews. Relingo extract words, full-text immersive translation while browsing. Also supports bilingual subtitles for Youtube, Netflix, etc. Readlang Web Reader 4.3 Average rating 4.3 out of 5 stars. Learn more about results and reviews. Read websites in the language you're learning, translate words you don't know, and we'll create flashcards to help you remember. Game on See more Beat boredom with bite-sized games in your browser BattleTabs 4.7 Average rating 4.7 out of 5 stars. Learn more about results and reviews. Multiplayer Battles in your New Tab Tiny Tycoon 4.7 Average rating 4.7 out of 5 stars. Learn more about results and reviews. Build a tiny tycoon on a tiny planet. Boxel 3D 4.6 Average rating 4.6 out of 5 stars. Learn more about results and reviews. Boxel 3D is a speedrunning game packed with challenging levels, custom skins, online multiplayer, and a creative level editor. Ice Dodo 4.6 Average rating 4.6 out of 5 stars. Learn more about results and reviews. Play 3D game easily by clicking the little icon at the top right corner of your browser. Boxel Golf 4.7 Average rating 4.7 out of 5 stars. Learn more about results and reviews. Boxel Golf is a multiplayer golf game packed with challenging courses, custom hats, and a powerful level builder. Work smarter, not harder with AI Automate tasks and stay focused and organized with AI-powered productivity extensions See collection For music lovers See more Equalizers, radios, playlists, and more Volume Master 4.8 Average rating 4.8 out of 5 stars. Learn more about results and reviews. Up to 600% volume boost Music Mode for YouTube™ 4.5 Average rating 4.5 out of 5 stars. Learn more about results and reviews. Hides the video and thumbnails on YouTube. Blocks the video keeping only the audio on YouTube Music. Smart Mute 4.5 Average rating 4.5 out of 5 stars. Learn more about results and reviews. Listen to audio one tab at a time. Modest Guitar | Columns for Ultimate-Guitar 4.8 Average rating 4.8 out of 5 stars. Learn more about results and reviews. Multiple columns and fullscreen for Ultimate-Guitar tabs Chrome Piano 4.5 Average rating 4.5 out of 5 stars. Learn more about results and reviews. Play the piano in your browser Google apps About Chrome Web Store Developer Dashboard Privacy Policy Terms of Service Help | 2026-01-13T09:29:32 |
http://groovy-lang.org/syntax.html#_interoperability_with_java | The Apache Groovy programming language - Syntax Socialize Discuss on the mailing-list Groovy on X Groovy on Bluesky Groovy on Mastodon Groovy on LinkedIn Events and conferences Source code on GitHub Report issues in Jira Stack Overflow questions Slack Community You are using an outdated browser. Please upgrade your browser to improve your experience. Apache Groovy™ Learn Documentation Download Support Contribute Ecosystem Blog posts Socialize Table of contents 1. Comments 1.1. Single-line comment 1.2. Multiline comment 1.3. Groovydoc comment 1.4. Shebang line 2. Keywords 3. Identifiers 3.1. Normal identifiers 3.2. Quoted identifiers 4. Strings 4.1. Single-quoted string 4.2. String concatenation 4.3. Triple-single-quoted string 4.3.1. Escaping special characters 4.3.2. Unicode escape sequence 4.4. Double-quoted string 4.4.1. String interpolation 4.4.2. Special case of interpolating closure expressions 4.4.3. Interoperability with Java 4.4.4. GString and String hashCodes 4.5. Triple-double-quoted string 4.6. Slashy string 4.6.1. Special cases 4.7. Dollar slashy string 4.8. String summary table 4.9. Characters 5. Numbers 5.1. Integral literals 5.1.1. Alternative non-base 10 representations Binary literal Octal literal Hexadecimal literal 5.2. Decimal literals 5.3. Underscore in literals 5.4. Number type suffixes 5.5. Math operations 5.5.1. The case of the division operator 5.5.2. The case of the power operator 6. Booleans 7. Lists 8. Arrays 8.1. Java-style array initialization 9. Maps Syntax This chapter covers the syntax of the Groovy programming language. The grammar of the language derives from the Java grammar, but enhances it with specific constructs for Groovy, and allows certain simplifications. 1. Comments 1.1. Single-line comment Single-line comments start with // and can be found at any position in the line. The characters following // , until the end of the line, are considered part of the comment. // a standalone single line comment println "hello" // a comment till the end of the line 1.2. Multiline comment A multiline comment starts with /* and can be found at any position in the line. The characters following /* will be considered part of the comment, including new line characters, up to the first */ closing the comment. Multiline comments can thus be put at the end of a statement, or even inside a statement. /* a standalone multiline comment spanning two lines */ println "hello" /* a multiline comment starting at the end of a statement */ println 1 /* one */ + 2 /* two */ 1.3. Groovydoc comment Similarly to multiline comments, Groovydoc comments are multiline, but start with /** and end with */ . Lines following the first Groovydoc comment line can optionally start with a star * . Those comments are associated with: type definitions (classes, interfaces, enums, annotations), fields and properties definitions methods definitions Although the compiler will not complain about Groovydoc comments not being associated with the above language elements, you should prepend those constructs with the comment right before it. /** * A Class description */ class Person { /** the name of the person */ String name /** * Creates a greeting method for a certain person. * * @param otherPerson the person to greet * @return a greeting message */ String greet(String otherPerson) { "Hello ${otherPerson}" } } Groovydoc follows the same conventions as Java’s own Javadoc. So you’ll be able to use the same tags as with Javadoc. In addition, Groovy supports Runtime Groovydoc since 3.0.0, i.e. Groovydoc can be retained at runtime. Runtime Groovydoc is disabled by default. It can be enabled by adding JVM option -Dgroovy.attach.runtime.groovydoc=true The Runtime Groovydoc starts with /**@ and ends with */ , for example: /**@ * Some class groovydoc for Foo */ class Foo { /**@ * Some method groovydoc for bar */ void bar() { } } assert Foo.class.groovydoc.content.contains('Some class groovydoc for Foo') (1) assert Foo.class.getMethod('bar', new Class[0]).groovydoc.content.contains('Some method groovydoc for bar') (2) 1 Get the runtime groovydoc for class Foo 2 Get the runtime groovydoc for method bar 1.4. Shebang line Beside the single-line comment, there is a special line comment, often called the shebang line understood by UNIX systems which allows scripts to be run directly from the command-line, provided you have installed the Groovy distribution and the groovy command is available on the PATH . #!/usr/bin/env groovy println "Hello from the shebang line" The # character must be the first character of the file. Any indentation would yield a compilation error. 2. Keywords Groovy has the following reserved keywords: Table 1. Reserved Keywords abstract assert break case catch class const continue def default do else enum extends final finally for goto if implements import instanceof interface native new null non-sealed package public protected private return static strictfp super switch synchronized this threadsafe throw throws transient try while Of these, const , goto , strictfp , and threadsafe are not currently in use. The reserved keywords can’t in general be used for variable, field and method names. A trick allows methods to be defined having the same name as a keyword by surrounding the name in quotes as shown in the following example: // reserved keywords can be used for method names if quoted def "abstract"() { true } // when calling such methods, the name must be qualified using "this." this.abstract() Using such names might be confusing and is often best to avoid. The trick is primarily intended to enable certain Java integration scenarios and certain DSL scenarios where having "verbs" and "nouns" with the same name as keywords may be desirable. In addition, Groovy has the following contextual keywords: Table 2. Contextual Keywords as in permits record sealed trait var yields These words are only keywords in certain contexts and can be more freely used in some places, in particular for variables, fields and method names. This extra lenience allows using method or variable names that were not keywords in earlier versions of Groovy or are not keywords in Java. Examples are shown here: // contextual keywords can be used for field and variable names def as = true assert as // contextual keywords can be used for method names def in() { true } // when calling such methods, the name only needs to be qualified using "this." in scenarios which would be ambiguous this.in() Groovy programmers familiar with these contextual keywords may still wish to avoid using those names unless there is a good reason to use such a name. The restrictions on reserved keywords also apply for the primitive types, the boolean literals and the null literal (all of which are discussed later): Table 3. Other reserved words null true false boolean char byte short int long float double While not recommended, the same trick as for reserved keywords can be used: def "null"() { true } // not recommended; potentially confusing assert this.null() // must be qualified Using such words as method names is potentially confusing and is often best to avoid, however, it might be useful for certain kinds of DSLs . 3. Identifiers 3.1. Normal identifiers Identifiers start with a letter, a dollar or an underscore. They cannot start with a number. A letter can be in the following ranges: 'a' to 'z' (lowercase ascii letter) 'A' to 'Z' (uppercase ascii letter) '\u00C0' to '\u00D6' '\u00D8' to '\u00F6' '\u00F8' to '\u00FF' '\u0100' to '\uFFFE' Then following characters can contain letters and numbers. Here are a few examples of valid identifiers (here, variable names): def name def item3 def with_underscore def $dollarStart But the following ones are invalid identifiers: def 3tier def a+b def a#b All keywords are also valid identifiers when following a dot: foo.as foo.assert foo.break foo.case foo.catch 3.2. Quoted identifiers Quoted identifiers appear after the dot of a dotted expression. For instance, the name part of the person.name expression can be quoted with person."name" or person.'name' . This is particularly interesting when certain identifiers contain illegal characters that are forbidden by the Java Language Specification, but which are allowed by Groovy when quoted. For example, characters like a dash, a space, an exclamation mark, etc. def map = [:] map."an identifier with a space and double quotes" = "ALLOWED" map.'with-dash-signs-and-single-quotes' = "ALLOWED" assert map."an identifier with a space and double quotes" == "ALLOWED" assert map.'with-dash-signs-and-single-quotes' == "ALLOWED" As we shall see in the following section on strings , Groovy provides different string literals. All kind of strings are actually allowed after the dot: map.'single quote' map."double quote" map.'''triple single quote''' map."""triple double quote""" map./slashy string/ map.$/dollar slashy string/$ There’s a difference between plain character strings and Groovy’s GStrings (interpolated strings), as in that the latter case, the interpolated values are inserted in the final string for evaluating the whole identifier: def firstname = "Homer" map."Simpson-${firstname}" = "Homer Simpson" assert map.'Simpson-Homer' == "Homer Simpson" 4. Strings Text literals are represented in the form of chain of characters called strings. Groovy lets you instantiate java.lang.String objects, as well as GStrings ( groovy.lang.GString ) which are also called interpolated strings in other programming languages. 4.1. Single-quoted string Single-quoted strings are a series of characters surrounded by single quotes: 'a single-quoted string' Single-quoted strings are plain java.lang.String and don’t support interpolation. 4.2. String concatenation All the Groovy strings can be concatenated with the + operator: assert 'ab' == 'a' + 'b' 4.3. Triple-single-quoted string Triple-single-quoted strings are a series of characters surrounded by triplets of single quotes: '''a triple-single-quoted string''' Triple-single-quoted strings are plain java.lang.String and don’t support interpolation. Triple-single-quoted strings may span multiple lines. The content of the string can cross line boundaries without the need to split the string in several pieces and without concatenation or newline escape characters: def aMultilineString = '''line one line two line three''' If your code is indented, for example in the body of the method of a class, your string will contain the whitespace of the indentation. The Groovy Development Kit contains methods for stripping out the indentation with the String#stripIndent() method, and with the String#stripMargin() method that takes a delimiter character to identify the text to remove from the beginning of a string. When creating a string as follows: def startingAndEndingWithANewline = ''' line one line two line three ''' You will notice that the resulting string contains a newline character as first character. It is possible to strip that character by escaping the newline with a backslash: def strippedFirstNewline = '''\ line one line two line three ''' assert !strippedFirstNewline.startsWith('\n') 4.3.1. Escaping special characters You can escape single quotes with the backslash character to avoid terminating the string literal: 'an escaped single quote: \' needs a backslash' And you can escape the escape character itself with a double backslash: 'an escaped escape character: \\ needs a double backslash' Some special characters also use the backslash as escape character: Escape sequence Character \b backspace \f formfeed \n newline \r carriage return \s single space \t tabulation \\ backslash \' single quote within a single-quoted string (and optional for triple-single-quoted and double-quoted strings) \" double quote within a double-quoted string (and optional for triple-double-quoted and single-quoted strings) We’ll see some more escaping details when it comes to other types of strings discussed later. 4.3.2. Unicode escape sequence For characters that are not present on your keyboard, you can use unicode escape sequences: a backslash, followed by 'u', then 4 hexadecimal digits. For example, the Euro currency symbol can be represented with: 'The Euro currency symbol: \u20AC' 4.4. Double-quoted string Double-quoted strings are a series of characters surrounded by double quotes: "a double-quoted string" Double-quoted strings are plain java.lang.String if there’s no interpolated expression, but are groovy.lang.GString instances if interpolation is present. To escape a double quote, you can use the backslash character: "A double quote: \"". 4.4.1. String interpolation Any Groovy expression can be interpolated in all string literals, apart from single and triple-single-quoted strings. Interpolation is the act of replacing a placeholder in the string with its value upon evaluation of the string. The placeholder expressions are surrounded by ${} . The curly braces may be omitted for unambiguous dotted expressions, i.e. we can use just a $ prefix in those cases. If the GString is ever passed to a method taking a String, the expression value inside the placeholder is evaluated to its string representation (by calling toString() on that expression) and the resulting String is passed to the method. Here, we have a string with a placeholder referencing a local variable: def name = 'Guillaume' // a plain string def greeting = "Hello ${name}" assert greeting.toString() == 'Hello Guillaume' Any Groovy expression is valid, as we can see in this example with an arithmetic expression: def sum = "The sum of 2 and 3 equals ${2 + 3}" assert sum.toString() == 'The sum of 2 and 3 equals 5' Not only are expressions allowed in between the ${} placeholder, but so are statements. However, a statement’s value is just null . So if several statements are inserted in that placeholder, the last one should somehow return a meaningful value to be inserted. For instance, "The sum of 1 and 2 is equal to ${def a = 1; def b = 2; a + b}" is supported and works as expected but a good practice is usually to stick to simple expressions inside GString placeholders. In addition to ${} placeholders, we can also use a lone $ sign prefixing a dotted expression: def person = [name: 'Guillaume', age: 36] assert "$person.name is $person.age years old" == 'Guillaume is 36 years old' But only dotted expressions of the form a.b , a.b.c , etc, are valid. Expressions containing parentheses like method calls, curly braces for closures, dots which aren’t part of a property expression or arithmetic operators would be invalid. Given the following variable definition of a number: def number = 3.14 The following statement will throw a groovy.lang.MissingPropertyException because Groovy believes you’re trying to access the toString property of that number, which doesn’t exist: shouldFail(MissingPropertyException) { println "$number.toString()" } You can think of "$number.toString()" as being interpreted by the parser as "${number.toString}()" . Similarly, if the expression is ambiguous, you need to keep the curly braces: String thing = 'treasure' assert 'The x-coordinate of the treasure is represented by treasure.x' == "The x-coordinate of the $thing is represented by $thing.x" // <= Not allowed: ambiguous!! assert 'The x-coordinate of the treasure is represented by treasure.x' == "The x-coordinate of the $thing is represented by ${thing}.x" // <= Curly braces required If you need to escape the $ or ${} placeholders in a GString so they appear as is without interpolation, you just need to use a \ backslash character to escape the dollar sign: assert '$5' == "\$5" assert '${name}' == "\${name}" 4.4.2. Special case of interpolating closure expressions So far, we’ve seen we could interpolate arbitrary expressions inside the ${} placeholder, but there is a special case and notation for closure expressions. When the placeholder contains an arrow, ${→} , the expression is actually a closure expression — you can think of it as a closure with a dollar prepended in front of it: def sParameterLessClosure = "1 + 2 == ${-> 3}" (1) assert sParameterLessClosure == '1 + 2 == 3' def sOneParamClosure = "1 + 2 == ${ w -> w << 3}" (2) assert sOneParamClosure == '1 + 2 == 3' 1 The closure is a parameterless closure which doesn’t take arguments. 2 Here, the closure takes a single java.io.StringWriter argument, to which you can append content with the << leftShift operator. In either case, both placeholders are embedded closures. In appearance, it looks like a more verbose way of defining expressions to be interpolated, but closures have an interesting advantage over mere expressions: lazy evaluation. Let’s consider the following sample: def number = 1 (1) def eagerGString = "value == ${number}" def lazyGString = "value == ${ -> number }" assert eagerGString == "value == 1" (2) assert lazyGString == "value == 1" (3) number = 2 (4) assert eagerGString == "value == 1" (5) assert lazyGString == "value == 2" (6) 1 We define a number variable containing 1 that we then interpolate within two GStrings, as an expression in eagerGString and as a closure in lazyGString . 2 We expect the resulting string to contain the same string value of 1 for eagerGString . 3 Similarly for lazyGString 4 Then we change the value of the variable to a new number 5 With a plain interpolated expression, the value was actually bound at the time of creation of the GString. 6 But with a closure expression, the closure is called upon each coercion of the GString into String, resulting in an updated string containing the new number value. An embedded closure expression taking more than one parameter will generate an exception at runtime. Only closures with zero or one parameter are allowed. 4.4.3. Interoperability with Java When a method (whether implemented in Java or Groovy) expects a java.lang.String , but we pass a groovy.lang.GString instance, the toString() method of the GString is automatically and transparently called. String takeString(String message) { (4) assert message instanceof String (5) return message } def message = "The message is ${'hello'}" (1) assert message instanceof GString (2) def result = takeString(message) (3) assert result instanceof String assert result == 'The message is hello' 1 We create a GString variable 2 We double-check it’s an instance of the GString 3 We then pass that GString to a method taking a String as parameter 4 The signature of the takeString() method explicitly says its sole parameter is a String 5 We also verify that the parameter is indeed a String and not a GString. 4.4.4. GString and String hashCodes Although interpolated strings can be used in lieu of plain Java strings, they differ with strings in a particular way: their hashCodes are different. Plain Java strings are immutable, whereas the resulting String representation of a GString can vary, depending on its interpolated values. Even for the same resulting string, GStrings and Strings don’t have the same hashCode. assert "one: ${1}".hashCode() != "one: 1".hashCode() GString and Strings having different hashCode values, using GString as Map keys should be avoided, especially if we try to retrieve an associated value with a String instead of a GString. def key = "a" def m = ["${key}": "letter ${key}"] (1) assert m["a"] == null (2) 1 The map is created with an initial pair whose key is a GString 2 When we try to fetch the value with a String key, we will not find it, as Strings and GString have different hashCode values 4.5. Triple-double-quoted string Triple-double-quoted strings behave like double-quoted strings, with the addition that they are multiline, like the triple-single-quoted strings. def name = 'Groovy' def template = """ Dear Mr ${name}, You're the winner of the lottery! Yours sincerly, Dave """ assert template.toString().contains('Groovy') Neither double quotes nor single quotes need be escaped in triple-double-quoted strings. 4.6. Slashy string Beyond the usual quoted strings, Groovy offers slashy strings, which use / as the opening and closing delimiter. Slashy strings are particularly useful for defining regular expressions and patterns, as there is no need to escape backslashes. Example of a slashy string: def fooPattern = /.*foo.*/ assert fooPattern == '.*foo.*' Only forward slashes need to be escaped with a backslash: def escapeSlash = /The character \/ is a forward slash/ assert escapeSlash == 'The character / is a forward slash' Slashy strings are multiline: def multilineSlashy = /one two three/ assert multilineSlashy.contains('\n') Slashy strings can be thought of as just another way to define a GString but with different escaping rules. They hence support interpolation: def color = 'blue' def interpolatedSlashy = /a ${color} car/ assert interpolatedSlashy == 'a blue car' 4.6.1. Special cases An empty slashy string cannot be represented with a double forward slash, as it’s understood by the Groovy parser as a line comment. That’s why the following assert would actually not compile as it would look like a non-terminated statement: assert '' == // As slashy strings were mostly designed to make regexp easier so a few things that are errors in GStrings like $() or $5 will work with slashy strings. Remember that escaping backslashes is not required. An alternative way of thinking of this is that in fact escaping is not supported. The slashy string /\t/ won’t contain a tab but instead a backslash followed by the character 't'. Escaping is only allowed for the slash character, i.e. /\/folder/ will be a slashy string containing '/folder' . A consequence of slash escaping is that a slashy string can’t end with a backslash. Otherwise that will escape the slashy string terminator. You can instead use a special trick, /ends with slash ${'\\'}/ . But best just avoid using a slashy string in such a case. 4.7. Dollar slashy string Dollar slashy strings are multiline GStrings delimited with an opening $/ and a closing /$ . The escaping character is the dollar sign, and it can escape another dollar, or a forward slash. Escaping for the dollar and forward slash characters is only needed where conflicts arise with the special use of those characters. The characters $foo would normally indicate a GString placeholder, so those four characters can be entered into a dollar slashy string by escaping the dollar, i.e. $$foo . Similarly, you will need to escape a dollar slashy closing delimiter if you want it to appear in your string. Here are a few examples: def name = "Guillaume" def date = "April, 1st" def dollarSlashy = $/ Hello $name, today we're ${date}. $ dollar sign $$ escaped dollar sign \ backslash / forward slash $/ escaped forward slash $$$/ escaped opening dollar slashy $/$$ escaped closing dollar slashy /$ assert [ 'Guillaume', 'April, 1st', '$ dollar sign', '$ escaped dollar sign', '\\ backslash', '/ forward slash', '/ escaped forward slash', '$/ escaped opening dollar slashy', '/$ escaped closing dollar slashy' ].every { dollarSlashy.contains(it) } It was created to overcome some of the limitations of the slashy string escaping rules. Use it when its escaping rules suit your string contents (typically if it has some slashes you don’t want to escape). 4.8. String summary table String name String syntax Interpolated Multiline Escape character Single-quoted '…​' \ Triple-single-quoted '''…​''' \ Double-quoted "…​" \ Triple-double-quoted """…​""" \ Slashy /…​/ \ Dollar slashy $/…​/$ $ 4.9. Characters Unlike Java, Groovy doesn’t have an explicit character literal. However, you can be explicit about making a Groovy string an actual character, by three different means: char c1 = 'A' (1) assert c1 instanceof Character def c2 = 'B' as char (2) assert c2 instanceof Character def c3 = (char)'C' (3) assert c3 instanceof Character 1 by being explicit when declaring a variable holding the character by specifying the char type 2 by using type coercion with the as operator 3 by using a cast to char operation The first option 1 is interesting when the character is held in a variable, while the other two ( 2 and 3 ) are more interesting when a char value must be passed as argument of a method call. 5. Numbers Groovy supports different kinds of integral literals and decimal literals, backed by the usual Number types of Java. 5.1. Integral literals The integral literal types are the same as in Java: byte char short int long java.math.BigInteger You can create integral numbers of those types with the following declarations: // primitive types byte b = 1 char c = 2 short s = 3 int i = 4 long l = 5 // infinite precision BigInteger bi = 6 If you use optional typing by using the def keyword, the type of the integral number will vary: it’ll adapt to the capacity of the type that can hold that number. For positive numbers: def a = 1 assert a instanceof Integer // Integer.MAX_VALUE def b = 2147483647 assert b instanceof Integer // Integer.MAX_VALUE + 1 def c = 2147483648 assert c instanceof Long // Long.MAX_VALUE def d = 9223372036854775807 assert d instanceof Long // Long.MAX_VALUE + 1 def e = 9223372036854775808 assert e instanceof BigInteger As well as for negative numbers: def na = -1 assert na instanceof Integer // Integer.MIN_VALUE def nb = -2147483648 assert nb instanceof Integer // Integer.MIN_VALUE - 1 def nc = -2147483649 assert nc instanceof Long // Long.MIN_VALUE def nd = -9223372036854775808 assert nd instanceof Long // Long.MIN_VALUE - 1 def ne = -9223372036854775809 assert ne instanceof BigInteger 5.1.1. Alternative non-base 10 representations Numbers can also be represented in binary, octal, hexadecimal and decimal bases. Binary literal Binary numbers start with a 0b prefix: int xInt = 0b10101111 assert xInt == 175 short xShort = 0b11001001 assert xShort == 201 as short byte xByte = 0b11 assert xByte == 3 as byte long xLong = 0b101101101101 assert xLong == 2925l BigInteger xBigInteger = 0b111100100001 assert xBigInteger == 3873g int xNegativeInt = -0b10101111 assert xNegativeInt == -175 Octal literal Octal numbers are specified in the typical format of 0 followed by octal digits. int xInt = 077 assert xInt == 63 short xShort = 011 assert xShort == 9 as short byte xByte = 032 assert xByte == 26 as byte long xLong = 0246 assert xLong == 166l BigInteger xBigInteger = 01111 assert xBigInteger == 585g int xNegativeInt = -077 assert xNegativeInt == -63 Hexadecimal literal Hexadecimal numbers are specified in the typical format of 0x followed by hex digits. int xInt = 0x77 assert xInt == 119 short xShort = 0xaa assert xShort == 170 as short byte xByte = 0x3a assert xByte == 58 as byte long xLong = 0xffff assert xLong == 65535l BigInteger xBigInteger = 0xaaaa assert xBigInteger == 43690g Double xDouble = new Double('0x1.0p0') assert xDouble == 1.0d int xNegativeInt = -0x77 assert xNegativeInt == -119 5.2. Decimal literals The decimal literal types are the same as in Java: float double java.math.BigDecimal You can create decimal numbers of those types with the following declarations: // primitive types float f = 1.234 double d = 2.345 // infinite precision BigDecimal bd = 3.456 Decimals can use exponents, with the e or E exponent letter, followed by an optional sign, and an integral number representing the exponent: assert 1e3 == 1_000.0 assert 2E4 == 20_000.0 assert 3e+1 == 30.0 assert 4E-2 == 0.04 assert 5e-1 == 0.5 Conveniently for exact decimal number calculations, Groovy chooses java.math.BigDecimal as its decimal number type. In addition, both float and double are supported, but require an explicit type declaration, type coercion or suffix. Even if BigDecimal is the default for decimal numbers, such literals are accepted in methods or closures taking float or double as parameter types. Decimal numbers can’t be represented using a binary, octal or hexadecimal representation. 5.3. Underscore in literals When writing long literal numbers, it’s harder on the eye to figure out how some numbers are grouped together, for example with groups of thousands, of words, etc. By allowing you to place underscore in number literals, it’s easier to spot those groups: long creditCardNumber = 1234_5678_9012_3456L long socialSecurityNumbers = 999_99_9999L double monetaryAmount = 12_345_132.12 long hexBytes = 0xFF_EC_DE_5E long hexWords = 0xFFEC_DE5E long maxLong = 0x7fff_ffff_ffff_ffffL long alsoMaxLong = 9_223_372_036_854_775_807L long bytes = 0b11010010_01101001_10010100_10010010 5.4. Number type suffixes We can force a number (including binary, octals and hexadecimals) to have a specific type by giving a suffix (see table below), either uppercase or lowercase. Type Suffix BigInteger G or g Long L or l Integer I or i BigDecimal G or g Double D or d Float F or f Examples: assert 42I == Integer.valueOf('42') assert 42i == Integer.valueOf('42') // lowercase i more readable assert 123L == Long.valueOf("123") // uppercase L more readable assert 2147483648 == Long.valueOf('2147483648') // Long type used, value too large for an Integer assert 456G == new BigInteger('456') assert 456g == new BigInteger('456') assert 123.45 == new BigDecimal('123.45') // default BigDecimal type used assert .321 == new BigDecimal('.321') assert 1.200065D == Double.valueOf('1.200065') assert 1.234F == Float.valueOf('1.234') assert 1.23E23D == Double.valueOf('1.23E23') assert 0b1111L.class == Long // binary assert 0xFFi.class == Integer // hexadecimal assert 034G.class == BigInteger // octal 5.5. Math operations Although operators are covered in more detail elsewhere, it’s important to discuss the behavior of math operations and what their resulting types are. Division and power binary operations aside (covered below), binary operations between byte , char , short and int result in int binary operations involving long with byte , char , short and int result in long binary operations involving BigInteger and any other integral type result in BigInteger binary operations involving BigDecimal with byte , char , short , int and BigInteger result in BigDecimal binary operations between float , double and BigDecimal result in double binary operations between two BigDecimal result in BigDecimal The following table summarizes those rules: byte char short int long BigInteger float double BigDecimal byte int int int int long BigInteger double double BigDecimal char int int int long BigInteger double double BigDecimal short int int long BigInteger double double BigDecimal int int long BigInteger double double BigDecimal long long BigInteger double double BigDecimal BigInteger BigInteger double double BigDecimal float double double double double double double BigDecimal BigDecimal Thanks to Groovy’s operator overloading, the usual arithmetic operators work as well with BigInteger and BigDecimal , unlike in Java where you have to use explicit methods for operating on those numbers. 5.5.1. The case of the division operator The division operators / (and /= for division and assignment) produce a double result if either operand is a float or double , and a BigDecimal result otherwise (when both operands are any combination of an integral type short , char , byte , int , long , BigInteger or BigDecimal ). BigDecimal division is performed with the divide() method if the division is exact (i.e. yielding a result that can be represented within the bounds of the same precision and scale), or using a MathContext with a precision of the maximum of the two operands' precision plus an extra precision of 10, and a scale of the maximum of 10 and the maximum of the operands' scale. For integer division like in Java, you should use the intdiv() method, as Groovy doesn’t provide a dedicated integer division operator symbol. 5.5.2. The case of the power operator The power operation is represented by the ** operator, with two parameters: the base and the exponent. The result of the power operation depends on its operands, and the result of the operation (in particular if the result can be represented as an integral value). The following rules are used by Groovy’s power operation to determine the resulting type: If the exponent is a decimal value if the result can be represented as an Integer , then return an Integer else if the result can be represented as a Long , then return a Long otherwise return a Double If the exponent is an integral value if the exponent is strictly negative, then return an Integer , Long or Double if the result value fits in that type if the exponent is positive or zero if the base is a BigDecimal , then return a BigDecimal result value if the base is a BigInteger , then return a BigInteger result value if the base is an Integer , then return an Integer if the result value fits in it, otherwise a BigInteger if the base is a Long , then return a Long if the result value fits in it, otherwise a BigInteger We can illustrate those rules with a few examples: // base and exponent are ints and the result can be represented by an Integer assert 2 ** 3 instanceof Integer // 8 assert 10 ** 9 instanceof Integer // 1_000_000_000 // the base is a long, so fit the result in a Long // (although it could have fit in an Integer) assert 5L ** 2 instanceof Long // 25 // the result can't be represented as an Integer or Long, so return a BigInteger assert 100 ** 10 instanceof BigInteger // 10e20 assert 1234 ** 123 instanceof BigInteger // 170515806212727042875... // the base is a BigDecimal and the exponent a negative int // but the result can be represented as an Integer assert 0.5 ** -2 instanceof Integer // 4 // the base is an int, and the exponent a negative float // but again, the result can be represented as an Integer assert 1 ** -0.3f instanceof Integer // 1 // the base is an int, and the exponent a negative int // but the result will be calculated as a Double // (both base and exponent are actually converted to doubles) assert 10 ** -1 instanceof Double // 0.1 // the base is a BigDecimal, and the exponent is an int, so return a BigDecimal assert 1.2 ** 10 instanceof BigDecimal // 6.1917364224 // the base is a float or double, and the exponent is an int // but the result can only be represented as a Double value assert 3.4f ** 5 instanceof Double // 454.35430372146965 assert 5.6d ** 2 instanceof Double // 31.359999999999996 // the exponent is a decimal value // and the result can only be represented as a Double value assert 7.8 ** 1.9 instanceof Double // 49.542708423868476 assert 2 ** 0.1f instanceof Double // 1.0717734636432956 6. Booleans Boolean is a special data type that is used to represent truth values: true and false . Use this data type for simple flags that track true/false conditions . Boolean values can be stored in variables, assigned into fields, just like any other data type: def myBooleanVariable = true boolean untypedBooleanVar = false booleanField = true true and false are the only two primitive boolean values. But more complex boolean expressions can be represented using logical operators . In addition, Groovy has special rules (often referred to as Groovy Truth ) for coercing non-boolean objects to a boolean value. 7. Lists Groovy uses a comma-separated list of values, surrounded by square brackets, to denote lists. Groovy lists are plain JDK java.util.List , as Groovy doesn’t define its own collection classes. The concrete list implementation used when defining list literals are java.util.ArrayList by default, unless you decide to specify otherwise, as we shall see later on. def numbers = [1, 2, 3] (1) assert numbers instanceof List (2) assert numbers.size() == 3 (3) 1 We define a list numbers delimited by commas and surrounded by square brackets, and we assign that list into a variable 2 The list is an instance of Java’s java.util.List interface 3 The size of the list can be queried with the size() method, and shows our list contains 3 elements In the above example, we used a homogeneous list, but you can also create lists containing values of heterogeneous types: def heterogeneous = [1, "a", true] (1) 1 Our list here contains a number, a string and a boolean value We mentioned that by default, list literals are actually instances of java.util.ArrayList , but it is possible to use a different backing type for our lists, thanks to using type coercion with the as operator, or with explicit type declaration for your variables: def arrayList = [1, 2, 3] assert arrayList instanceof java.util.ArrayList def linkedList = [2, 3, 4] as LinkedList (1) assert linkedList instanceof java.util.LinkedList LinkedList otherLinked = [3, 4, 5] (2) assert otherLinked instanceof java.util.LinkedList 1 We use coercion with the as operator to explicitly request a java.util.LinkedList implementation 2 We can say that the variable holding the list literal is of type java.util.LinkedList You can access elements of the list with the [] subscript operator (both for reading and setting values) with positive indices or negative indices to access elements from the end of the list, as well as with ranges, and use the << leftShift operator to append elements to a list: def letters = ['a', 'b', 'c', 'd'] assert letters[0] == 'a' (1) assert letters[1] == 'b' assert letters[-1] == 'd' (2) assert letters[-2] == 'c' letters[2] = 'C' (3) assert letters[2] == 'C' letters << 'e' (4) assert letters[ 4] == 'e' assert letters[-1] == 'e' assert letters[1, 3] == ['b', 'd'] (5) assert letters[2..4] == ['C', 'd', 'e'] (6) 1 Access the first element of the list (zero-based counting) 2 Access the last element of the list with a negative index: -1 is the first element from the end of the list 3 Use an assignment to set a new value for the third element of the list 4 Use the << leftShift operator to append an element at the end of the list 5 Access two elements at once, returning a new list containing those two elements 6 Use a range to access a range of values from the list, from a start to an end element position As lists can be heterogeneous in nature, lists can also contain other lists to create multidimensional lists: def multi = [[0, 1], [2, 3]] (1) assert multi[1][0] == 2 (2) 1 Define a list of numbers 2 Access the second element of the top-most list, and the first element of the inner list 8. Arrays Groovy reuses the list notation for arrays, but to make such literals arrays, you need to explicitly define the type of the array through coercion or type declaration. String[] arrStr = ['Ananas', 'Banana', 'Kiwi'] (1) assert arrStr instanceof String[] (2) assert !(arrStr instanceof List) def numArr = [1, 2, 3] as int[] (3) assert numArr instanceof int[] (4) assert numArr.size() == 3 1 Define an array of strings using explicit variable type declaration 2 Assert that we created an array of strings 3 Create an array of ints with the as operator 4 Assert that we created an array of primitive ints You can also create multi-dimensional arrays: def matrix3 = new Integer[3][3] (1) assert matrix3.size() == 3 Integer[][] matrix2 (2) matrix2 = [[1, 2], [3, 4]] assert matrix2 instanceof Integer[][] 1 You can define the bounds of a new array 2 Or declare an array without specifying its bounds Access to elements of an array follows the same notation as for lists: String[] names = ['Cédric', 'Guillaume', 'Jochen', 'Paul'] assert names[0] == 'Cédric' (1) names[2] = 'Blackdrag' (2) assert names[2] == 'Blackdrag' 1 Retrieve the first element of the array 2 Set the value of the third element of the array to a new value 8.1. Java-style array initialization Groovy has always supported literal list/array definitions using square brackets and has avoided Java-style curly braces so as not to conflict with closure definitions. In the case where the curly braces come immediately after an array type declaration however, there is no ambiguity with closure definitions, so Groovy 3 and above support that variant of the Java array initialization expression. Examples: def primes = new int[] {2, 3, 5, 7, 11} assert primes.size() == 5 && primes.sum() == 28 assert primes.class.name == '[I' def pets = new String[] {'cat', 'dog'} assert pets.size() == 2 && pets.sum() == 'catdog' assert pets.class.name == '[Ljava.lang.String;' // traditional Groovy alternative still supported String[] groovyBooks = [ 'Groovy in Action', 'Making Java Groovy' ] assert groovyBooks.every{ it.contains('Groovy') } 9. Maps Sometimes called dictionaries or associative arrays in other languages, Groovy features maps. Maps associate keys to values, separating keys and values with colons, and each key/value pairs with commas, and the whole keys and values surrounded by square brackets. def colors = [red: '#FF0000', green: '#00FF00', blue: '#0000FF'] (1) assert colors['red'] == '#FF0000' (2) assert colors.green == '#00FF00' (3) colors['pink'] = '#FF00FF' (4) colors.yellow = '#FFFF00' (5) assert colors.pink == '#FF00FF' assert colors['yellow'] == '#FFFF00' assert colors instanceof java.util.LinkedHashMap 1 We define a map of string color names, associated with their hexadecimal-coded html colors 2 We use the subscript notation to check the content associated with the red key 3 We can also use the property notation to assert the color green’s hexadecimal representation 4 Similarly, we can use the subscript notation to add a new key/value pair 5 Or the property notation, to add the yellow color When using names for the keys, we actually define string keys in the map. Groovy creates maps that are actually instances of java.util.LinkedHashMap . If you try to access a key which is not present in the map: assert colors.unknown == null def emptyMap = [:] assert emptyMap.anyKey == null You will retrieve a null result. In the examples above, we used string keys, but you can also use values of other types as keys: def numbers = [1: 'one', 2: 'two'] assert numbers[1] == 'one' Here, we used numbers as keys, as numbers can unambiguously be recognized as numbers, so Groovy will not create a string key like in our previous examples. But consider the case you want to pass a variable in lieu of the key, to have the value of that variable become the key: def key = 'name' def person = [key: 'Guillaume'] (1) assert !person.containsKey('name') (2) assert person.containsKey('key') (3) 1 The key associated with the 'Guillaume' name will actually be the "key" string, not the value associated with the key variable 2 The map doesn’t contain the 'name' key 3 Instead, the map contains a 'key' key You can also pass quoted strings as well as keys: ["name": "Guillaume"]. This is mandatory if your key string isn’t a valid identifier, for example if you wanted to create a string key containing a dash like in: ["street-name": "Main street"]. When you need to pass variable values as keys in your map definitions, you must surround the variable or expression with parentheses: person = [(key): 'Guillaume'] (1) assert person.containsKey('name') (2) assert !person.containsKey('key') (3) 1 This time, we surround the key variable with parentheses, to instruct the parser we are passing a variable rather than defining a string key 2 The map does contain the name key 3 But the map doesn’t contain the key key as before Groovy Learn Documentation Download Support Contribute Ecosystem Blog posts About Source code Security Books Thanks Sponsorship FAQ Search Socialize Discuss on the mailing-list Groovy on X Groovy on Bluesky Groovy on Mastodon Groovy on LinkedIn Events and conferences Source code on GitHub Report issues in Jira Stack Overflow questions Slack Community The Groovy programming language is supported by the Apache Software Foundation and the Groovy community. Apache, Apache Groovy, Groovy, and the ASF logo are either registered trademarks or trademarks of The Apache Software Foundation. © 2003-2025 the Apache Groovy project — Groovy is Open Source: license , privacy policy . | 2026-01-13T09:29:32 |
http://groovy-lang.org/syntax.html#_integral_literals | The Apache Groovy programming language - Syntax Socialize Discuss on the mailing-list Groovy on X Groovy on Bluesky Groovy on Mastodon Groovy on LinkedIn Events and conferences Source code on GitHub Report issues in Jira Stack Overflow questions Slack Community You are using an outdated browser. Please upgrade your browser to improve your experience. Apache Groovy™ Learn Documentation Download Support Contribute Ecosystem Blog posts Socialize Table of contents 1. Comments 1.1. Single-line comment 1.2. Multiline comment 1.3. Groovydoc comment 1.4. Shebang line 2. Keywords 3. Identifiers 3.1. Normal identifiers 3.2. Quoted identifiers 4. Strings 4.1. Single-quoted string 4.2. String concatenation 4.3. Triple-single-quoted string 4.3.1. Escaping special characters 4.3.2. Unicode escape sequence 4.4. Double-quoted string 4.4.1. String interpolation 4.4.2. Special case of interpolating closure expressions 4.4.3. Interoperability with Java 4.4.4. GString and String hashCodes 4.5. Triple-double-quoted string 4.6. Slashy string 4.6.1. Special cases 4.7. Dollar slashy string 4.8. String summary table 4.9. Characters 5. Numbers 5.1. Integral literals 5.1.1. Alternative non-base 10 representations Binary literal Octal literal Hexadecimal literal 5.2. Decimal literals 5.3. Underscore in literals 5.4. Number type suffixes 5.5. Math operations 5.5.1. The case of the division operator 5.5.2. The case of the power operator 6. Booleans 7. Lists 8. Arrays 8.1. Java-style array initialization 9. Maps Syntax This chapter covers the syntax of the Groovy programming language. The grammar of the language derives from the Java grammar, but enhances it with specific constructs for Groovy, and allows certain simplifications. 1. Comments 1.1. Single-line comment Single-line comments start with // and can be found at any position in the line. The characters following // , until the end of the line, are considered part of the comment. // a standalone single line comment println "hello" // a comment till the end of the line 1.2. Multiline comment A multiline comment starts with /* and can be found at any position in the line. The characters following /* will be considered part of the comment, including new line characters, up to the first */ closing the comment. Multiline comments can thus be put at the end of a statement, or even inside a statement. /* a standalone multiline comment spanning two lines */ println "hello" /* a multiline comment starting at the end of a statement */ println 1 /* one */ + 2 /* two */ 1.3. Groovydoc comment Similarly to multiline comments, Groovydoc comments are multiline, but start with /** and end with */ . Lines following the first Groovydoc comment line can optionally start with a star * . Those comments are associated with: type definitions (classes, interfaces, enums, annotations), fields and properties definitions methods definitions Although the compiler will not complain about Groovydoc comments not being associated with the above language elements, you should prepend those constructs with the comment right before it. /** * A Class description */ class Person { /** the name of the person */ String name /** * Creates a greeting method for a certain person. * * @param otherPerson the person to greet * @return a greeting message */ String greet(String otherPerson) { "Hello ${otherPerson}" } } Groovydoc follows the same conventions as Java’s own Javadoc. So you’ll be able to use the same tags as with Javadoc. In addition, Groovy supports Runtime Groovydoc since 3.0.0, i.e. Groovydoc can be retained at runtime. Runtime Groovydoc is disabled by default. It can be enabled by adding JVM option -Dgroovy.attach.runtime.groovydoc=true The Runtime Groovydoc starts with /**@ and ends with */ , for example: /**@ * Some class groovydoc for Foo */ class Foo { /**@ * Some method groovydoc for bar */ void bar() { } } assert Foo.class.groovydoc.content.contains('Some class groovydoc for Foo') (1) assert Foo.class.getMethod('bar', new Class[0]).groovydoc.content.contains('Some method groovydoc for bar') (2) 1 Get the runtime groovydoc for class Foo 2 Get the runtime groovydoc for method bar 1.4. Shebang line Beside the single-line comment, there is a special line comment, often called the shebang line understood by UNIX systems which allows scripts to be run directly from the command-line, provided you have installed the Groovy distribution and the groovy command is available on the PATH . #!/usr/bin/env groovy println "Hello from the shebang line" The # character must be the first character of the file. Any indentation would yield a compilation error. 2. Keywords Groovy has the following reserved keywords: Table 1. Reserved Keywords abstract assert break case catch class const continue def default do else enum extends final finally for goto if implements import instanceof interface native new null non-sealed package public protected private return static strictfp super switch synchronized this threadsafe throw throws transient try while Of these, const , goto , strictfp , and threadsafe are not currently in use. The reserved keywords can’t in general be used for variable, field and method names. A trick allows methods to be defined having the same name as a keyword by surrounding the name in quotes as shown in the following example: // reserved keywords can be used for method names if quoted def "abstract"() { true } // when calling such methods, the name must be qualified using "this." this.abstract() Using such names might be confusing and is often best to avoid. The trick is primarily intended to enable certain Java integration scenarios and certain DSL scenarios where having "verbs" and "nouns" with the same name as keywords may be desirable. In addition, Groovy has the following contextual keywords: Table 2. Contextual Keywords as in permits record sealed trait var yields These words are only keywords in certain contexts and can be more freely used in some places, in particular for variables, fields and method names. This extra lenience allows using method or variable names that were not keywords in earlier versions of Groovy or are not keywords in Java. Examples are shown here: // contextual keywords can be used for field and variable names def as = true assert as // contextual keywords can be used for method names def in() { true } // when calling such methods, the name only needs to be qualified using "this." in scenarios which would be ambiguous this.in() Groovy programmers familiar with these contextual keywords may still wish to avoid using those names unless there is a good reason to use such a name. The restrictions on reserved keywords also apply for the primitive types, the boolean literals and the null literal (all of which are discussed later): Table 3. Other reserved words null true false boolean char byte short int long float double While not recommended, the same trick as for reserved keywords can be used: def "null"() { true } // not recommended; potentially confusing assert this.null() // must be qualified Using such words as method names is potentially confusing and is often best to avoid, however, it might be useful for certain kinds of DSLs . 3. Identifiers 3.1. Normal identifiers Identifiers start with a letter, a dollar or an underscore. They cannot start with a number. A letter can be in the following ranges: 'a' to 'z' (lowercase ascii letter) 'A' to 'Z' (uppercase ascii letter) '\u00C0' to '\u00D6' '\u00D8' to '\u00F6' '\u00F8' to '\u00FF' '\u0100' to '\uFFFE' Then following characters can contain letters and numbers. Here are a few examples of valid identifiers (here, variable names): def name def item3 def with_underscore def $dollarStart But the following ones are invalid identifiers: def 3tier def a+b def a#b All keywords are also valid identifiers when following a dot: foo.as foo.assert foo.break foo.case foo.catch 3.2. Quoted identifiers Quoted identifiers appear after the dot of a dotted expression. For instance, the name part of the person.name expression can be quoted with person."name" or person.'name' . This is particularly interesting when certain identifiers contain illegal characters that are forbidden by the Java Language Specification, but which are allowed by Groovy when quoted. For example, characters like a dash, a space, an exclamation mark, etc. def map = [:] map."an identifier with a space and double quotes" = "ALLOWED" map.'with-dash-signs-and-single-quotes' = "ALLOWED" assert map."an identifier with a space and double quotes" == "ALLOWED" assert map.'with-dash-signs-and-single-quotes' == "ALLOWED" As we shall see in the following section on strings , Groovy provides different string literals. All kind of strings are actually allowed after the dot: map.'single quote' map."double quote" map.'''triple single quote''' map."""triple double quote""" map./slashy string/ map.$/dollar slashy string/$ There’s a difference between plain character strings and Groovy’s GStrings (interpolated strings), as in that the latter case, the interpolated values are inserted in the final string for evaluating the whole identifier: def firstname = "Homer" map."Simpson-${firstname}" = "Homer Simpson" assert map.'Simpson-Homer' == "Homer Simpson" 4. Strings Text literals are represented in the form of chain of characters called strings. Groovy lets you instantiate java.lang.String objects, as well as GStrings ( groovy.lang.GString ) which are also called interpolated strings in other programming languages. 4.1. Single-quoted string Single-quoted strings are a series of characters surrounded by single quotes: 'a single-quoted string' Single-quoted strings are plain java.lang.String and don’t support interpolation. 4.2. String concatenation All the Groovy strings can be concatenated with the + operator: assert 'ab' == 'a' + 'b' 4.3. Triple-single-quoted string Triple-single-quoted strings are a series of characters surrounded by triplets of single quotes: '''a triple-single-quoted string''' Triple-single-quoted strings are plain java.lang.String and don’t support interpolation. Triple-single-quoted strings may span multiple lines. The content of the string can cross line boundaries without the need to split the string in several pieces and without concatenation or newline escape characters: def aMultilineString = '''line one line two line three''' If your code is indented, for example in the body of the method of a class, your string will contain the whitespace of the indentation. The Groovy Development Kit contains methods for stripping out the indentation with the String#stripIndent() method, and with the String#stripMargin() method that takes a delimiter character to identify the text to remove from the beginning of a string. When creating a string as follows: def startingAndEndingWithANewline = ''' line one line two line three ''' You will notice that the resulting string contains a newline character as first character. It is possible to strip that character by escaping the newline with a backslash: def strippedFirstNewline = '''\ line one line two line three ''' assert !strippedFirstNewline.startsWith('\n') 4.3.1. Escaping special characters You can escape single quotes with the backslash character to avoid terminating the string literal: 'an escaped single quote: \' needs a backslash' And you can escape the escape character itself with a double backslash: 'an escaped escape character: \\ needs a double backslash' Some special characters also use the backslash as escape character: Escape sequence Character \b backspace \f formfeed \n newline \r carriage return \s single space \t tabulation \\ backslash \' single quote within a single-quoted string (and optional for triple-single-quoted and double-quoted strings) \" double quote within a double-quoted string (and optional for triple-double-quoted and single-quoted strings) We’ll see some more escaping details when it comes to other types of strings discussed later. 4.3.2. Unicode escape sequence For characters that are not present on your keyboard, you can use unicode escape sequences: a backslash, followed by 'u', then 4 hexadecimal digits. For example, the Euro currency symbol can be represented with: 'The Euro currency symbol: \u20AC' 4.4. Double-quoted string Double-quoted strings are a series of characters surrounded by double quotes: "a double-quoted string" Double-quoted strings are plain java.lang.String if there’s no interpolated expression, but are groovy.lang.GString instances if interpolation is present. To escape a double quote, you can use the backslash character: "A double quote: \"". 4.4.1. String interpolation Any Groovy expression can be interpolated in all string literals, apart from single and triple-single-quoted strings. Interpolation is the act of replacing a placeholder in the string with its value upon evaluation of the string. The placeholder expressions are surrounded by ${} . The curly braces may be omitted for unambiguous dotted expressions, i.e. we can use just a $ prefix in those cases. If the GString is ever passed to a method taking a String, the expression value inside the placeholder is evaluated to its string representation (by calling toString() on that expression) and the resulting String is passed to the method. Here, we have a string with a placeholder referencing a local variable: def name = 'Guillaume' // a plain string def greeting = "Hello ${name}" assert greeting.toString() == 'Hello Guillaume' Any Groovy expression is valid, as we can see in this example with an arithmetic expression: def sum = "The sum of 2 and 3 equals ${2 + 3}" assert sum.toString() == 'The sum of 2 and 3 equals 5' Not only are expressions allowed in between the ${} placeholder, but so are statements. However, a statement’s value is just null . So if several statements are inserted in that placeholder, the last one should somehow return a meaningful value to be inserted. For instance, "The sum of 1 and 2 is equal to ${def a = 1; def b = 2; a + b}" is supported and works as expected but a good practice is usually to stick to simple expressions inside GString placeholders. In addition to ${} placeholders, we can also use a lone $ sign prefixing a dotted expression: def person = [name: 'Guillaume', age: 36] assert "$person.name is $person.age years old" == 'Guillaume is 36 years old' But only dotted expressions of the form a.b , a.b.c , etc, are valid. Expressions containing parentheses like method calls, curly braces for closures, dots which aren’t part of a property expression or arithmetic operators would be invalid. Given the following variable definition of a number: def number = 3.14 The following statement will throw a groovy.lang.MissingPropertyException because Groovy believes you’re trying to access the toString property of that number, which doesn’t exist: shouldFail(MissingPropertyException) { println "$number.toString()" } You can think of "$number.toString()" as being interpreted by the parser as "${number.toString}()" . Similarly, if the expression is ambiguous, you need to keep the curly braces: String thing = 'treasure' assert 'The x-coordinate of the treasure is represented by treasure.x' == "The x-coordinate of the $thing is represented by $thing.x" // <= Not allowed: ambiguous!! assert 'The x-coordinate of the treasure is represented by treasure.x' == "The x-coordinate of the $thing is represented by ${thing}.x" // <= Curly braces required If you need to escape the $ or ${} placeholders in a GString so they appear as is without interpolation, you just need to use a \ backslash character to escape the dollar sign: assert '$5' == "\$5" assert '${name}' == "\${name}" 4.4.2. Special case of interpolating closure expressions So far, we’ve seen we could interpolate arbitrary expressions inside the ${} placeholder, but there is a special case and notation for closure expressions. When the placeholder contains an arrow, ${→} , the expression is actually a closure expression — you can think of it as a closure with a dollar prepended in front of it: def sParameterLessClosure = "1 + 2 == ${-> 3}" (1) assert sParameterLessClosure == '1 + 2 == 3' def sOneParamClosure = "1 + 2 == ${ w -> w << 3}" (2) assert sOneParamClosure == '1 + 2 == 3' 1 The closure is a parameterless closure which doesn’t take arguments. 2 Here, the closure takes a single java.io.StringWriter argument, to which you can append content with the << leftShift operator. In either case, both placeholders are embedded closures. In appearance, it looks like a more verbose way of defining expressions to be interpolated, but closures have an interesting advantage over mere expressions: lazy evaluation. Let’s consider the following sample: def number = 1 (1) def eagerGString = "value == ${number}" def lazyGString = "value == ${ -> number }" assert eagerGString == "value == 1" (2) assert lazyGString == "value == 1" (3) number = 2 (4) assert eagerGString == "value == 1" (5) assert lazyGString == "value == 2" (6) 1 We define a number variable containing 1 that we then interpolate within two GStrings, as an expression in eagerGString and as a closure in lazyGString . 2 We expect the resulting string to contain the same string value of 1 for eagerGString . 3 Similarly for lazyGString 4 Then we change the value of the variable to a new number 5 With a plain interpolated expression, the value was actually bound at the time of creation of the GString. 6 But with a closure expression, the closure is called upon each coercion of the GString into String, resulting in an updated string containing the new number value. An embedded closure expression taking more than one parameter will generate an exception at runtime. Only closures with zero or one parameter are allowed. 4.4.3. Interoperability with Java When a method (whether implemented in Java or Groovy) expects a java.lang.String , but we pass a groovy.lang.GString instance, the toString() method of the GString is automatically and transparently called. String takeString(String message) { (4) assert message instanceof String (5) return message } def message = "The message is ${'hello'}" (1) assert message instanceof GString (2) def result = takeString(message) (3) assert result instanceof String assert result == 'The message is hello' 1 We create a GString variable 2 We double-check it’s an instance of the GString 3 We then pass that GString to a method taking a String as parameter 4 The signature of the takeString() method explicitly says its sole parameter is a String 5 We also verify that the parameter is indeed a String and not a GString. 4.4.4. GString and String hashCodes Although interpolated strings can be used in lieu of plain Java strings, they differ with strings in a particular way: their hashCodes are different. Plain Java strings are immutable, whereas the resulting String representation of a GString can vary, depending on its interpolated values. Even for the same resulting string, GStrings and Strings don’t have the same hashCode. assert "one: ${1}".hashCode() != "one: 1".hashCode() GString and Strings having different hashCode values, using GString as Map keys should be avoided, especially if we try to retrieve an associated value with a String instead of a GString. def key = "a" def m = ["${key}": "letter ${key}"] (1) assert m["a"] == null (2) 1 The map is created with an initial pair whose key is a GString 2 When we try to fetch the value with a String key, we will not find it, as Strings and GString have different hashCode values 4.5. Triple-double-quoted string Triple-double-quoted strings behave like double-quoted strings, with the addition that they are multiline, like the triple-single-quoted strings. def name = 'Groovy' def template = """ Dear Mr ${name}, You're the winner of the lottery! Yours sincerly, Dave """ assert template.toString().contains('Groovy') Neither double quotes nor single quotes need be escaped in triple-double-quoted strings. 4.6. Slashy string Beyond the usual quoted strings, Groovy offers slashy strings, which use / as the opening and closing delimiter. Slashy strings are particularly useful for defining regular expressions and patterns, as there is no need to escape backslashes. Example of a slashy string: def fooPattern = /.*foo.*/ assert fooPattern == '.*foo.*' Only forward slashes need to be escaped with a backslash: def escapeSlash = /The character \/ is a forward slash/ assert escapeSlash == 'The character / is a forward slash' Slashy strings are multiline: def multilineSlashy = /one two three/ assert multilineSlashy.contains('\n') Slashy strings can be thought of as just another way to define a GString but with different escaping rules. They hence support interpolation: def color = 'blue' def interpolatedSlashy = /a ${color} car/ assert interpolatedSlashy == 'a blue car' 4.6.1. Special cases An empty slashy string cannot be represented with a double forward slash, as it’s understood by the Groovy parser as a line comment. That’s why the following assert would actually not compile as it would look like a non-terminated statement: assert '' == // As slashy strings were mostly designed to make regexp easier so a few things that are errors in GStrings like $() or $5 will work with slashy strings. Remember that escaping backslashes is not required. An alternative way of thinking of this is that in fact escaping is not supported. The slashy string /\t/ won’t contain a tab but instead a backslash followed by the character 't'. Escaping is only allowed for the slash character, i.e. /\/folder/ will be a slashy string containing '/folder' . A consequence of slash escaping is that a slashy string can’t end with a backslash. Otherwise that will escape the slashy string terminator. You can instead use a special trick, /ends with slash ${'\\'}/ . But best just avoid using a slashy string in such a case. 4.7. Dollar slashy string Dollar slashy strings are multiline GStrings delimited with an opening $/ and a closing /$ . The escaping character is the dollar sign, and it can escape another dollar, or a forward slash. Escaping for the dollar and forward slash characters is only needed where conflicts arise with the special use of those characters. The characters $foo would normally indicate a GString placeholder, so those four characters can be entered into a dollar slashy string by escaping the dollar, i.e. $$foo . Similarly, you will need to escape a dollar slashy closing delimiter if you want it to appear in your string. Here are a few examples: def name = "Guillaume" def date = "April, 1st" def dollarSlashy = $/ Hello $name, today we're ${date}. $ dollar sign $$ escaped dollar sign \ backslash / forward slash $/ escaped forward slash $$$/ escaped opening dollar slashy $/$$ escaped closing dollar slashy /$ assert [ 'Guillaume', 'April, 1st', '$ dollar sign', '$ escaped dollar sign', '\\ backslash', '/ forward slash', '/ escaped forward slash', '$/ escaped opening dollar slashy', '/$ escaped closing dollar slashy' ].every { dollarSlashy.contains(it) } It was created to overcome some of the limitations of the slashy string escaping rules. Use it when its escaping rules suit your string contents (typically if it has some slashes you don’t want to escape). 4.8. String summary table String name String syntax Interpolated Multiline Escape character Single-quoted '…​' \ Triple-single-quoted '''…​''' \ Double-quoted "…​" \ Triple-double-quoted """…​""" \ Slashy /…​/ \ Dollar slashy $/…​/$ $ 4.9. Characters Unlike Java, Groovy doesn’t have an explicit character literal. However, you can be explicit about making a Groovy string an actual character, by three different means: char c1 = 'A' (1) assert c1 instanceof Character def c2 = 'B' as char (2) assert c2 instanceof Character def c3 = (char)'C' (3) assert c3 instanceof Character 1 by being explicit when declaring a variable holding the character by specifying the char type 2 by using type coercion with the as operator 3 by using a cast to char operation The first option 1 is interesting when the character is held in a variable, while the other two ( 2 and 3 ) are more interesting when a char value must be passed as argument of a method call. 5. Numbers Groovy supports different kinds of integral literals and decimal literals, backed by the usual Number types of Java. 5.1. Integral literals The integral literal types are the same as in Java: byte char short int long java.math.BigInteger You can create integral numbers of those types with the following declarations: // primitive types byte b = 1 char c = 2 short s = 3 int i = 4 long l = 5 // infinite precision BigInteger bi = 6 If you use optional typing by using the def keyword, the type of the integral number will vary: it’ll adapt to the capacity of the type that can hold that number. For positive numbers: def a = 1 assert a instanceof Integer // Integer.MAX_VALUE def b = 2147483647 assert b instanceof Integer // Integer.MAX_VALUE + 1 def c = 2147483648 assert c instanceof Long // Long.MAX_VALUE def d = 9223372036854775807 assert d instanceof Long // Long.MAX_VALUE + 1 def e = 9223372036854775808 assert e instanceof BigInteger As well as for negative numbers: def na = -1 assert na instanceof Integer // Integer.MIN_VALUE def nb = -2147483648 assert nb instanceof Integer // Integer.MIN_VALUE - 1 def nc = -2147483649 assert nc instanceof Long // Long.MIN_VALUE def nd = -9223372036854775808 assert nd instanceof Long // Long.MIN_VALUE - 1 def ne = -9223372036854775809 assert ne instanceof BigInteger 5.1.1. Alternative non-base 10 representations Numbers can also be represented in binary, octal, hexadecimal and decimal bases. Binary literal Binary numbers start with a 0b prefix: int xInt = 0b10101111 assert xInt == 175 short xShort = 0b11001001 assert xShort == 201 as short byte xByte = 0b11 assert xByte == 3 as byte long xLong = 0b101101101101 assert xLong == 2925l BigInteger xBigInteger = 0b111100100001 assert xBigInteger == 3873g int xNegativeInt = -0b10101111 assert xNegativeInt == -175 Octal literal Octal numbers are specified in the typical format of 0 followed by octal digits. int xInt = 077 assert xInt == 63 short xShort = 011 assert xShort == 9 as short byte xByte = 032 assert xByte == 26 as byte long xLong = 0246 assert xLong == 166l BigInteger xBigInteger = 01111 assert xBigInteger == 585g int xNegativeInt = -077 assert xNegativeInt == -63 Hexadecimal literal Hexadecimal numbers are specified in the typical format of 0x followed by hex digits. int xInt = 0x77 assert xInt == 119 short xShort = 0xaa assert xShort == 170 as short byte xByte = 0x3a assert xByte == 58 as byte long xLong = 0xffff assert xLong == 65535l BigInteger xBigInteger = 0xaaaa assert xBigInteger == 43690g Double xDouble = new Double('0x1.0p0') assert xDouble == 1.0d int xNegativeInt = -0x77 assert xNegativeInt == -119 5.2. Decimal literals The decimal literal types are the same as in Java: float double java.math.BigDecimal You can create decimal numbers of those types with the following declarations: // primitive types float f = 1.234 double d = 2.345 // infinite precision BigDecimal bd = 3.456 Decimals can use exponents, with the e or E exponent letter, followed by an optional sign, and an integral number representing the exponent: assert 1e3 == 1_000.0 assert 2E4 == 20_000.0 assert 3e+1 == 30.0 assert 4E-2 == 0.04 assert 5e-1 == 0.5 Conveniently for exact decimal number calculations, Groovy chooses java.math.BigDecimal as its decimal number type. In addition, both float and double are supported, but require an explicit type declaration, type coercion or suffix. Even if BigDecimal is the default for decimal numbers, such literals are accepted in methods or closures taking float or double as parameter types. Decimal numbers can’t be represented using a binary, octal or hexadecimal representation. 5.3. Underscore in literals When writing long literal numbers, it’s harder on the eye to figure out how some numbers are grouped together, for example with groups of thousands, of words, etc. By allowing you to place underscore in number literals, it’s easier to spot those groups: long creditCardNumber = 1234_5678_9012_3456L long socialSecurityNumbers = 999_99_9999L double monetaryAmount = 12_345_132.12 long hexBytes = 0xFF_EC_DE_5E long hexWords = 0xFFEC_DE5E long maxLong = 0x7fff_ffff_ffff_ffffL long alsoMaxLong = 9_223_372_036_854_775_807L long bytes = 0b11010010_01101001_10010100_10010010 5.4. Number type suffixes We can force a number (including binary, octals and hexadecimals) to have a specific type by giving a suffix (see table below), either uppercase or lowercase. Type Suffix BigInteger G or g Long L or l Integer I or i BigDecimal G or g Double D or d Float F or f Examples: assert 42I == Integer.valueOf('42') assert 42i == Integer.valueOf('42') // lowercase i more readable assert 123L == Long.valueOf("123") // uppercase L more readable assert 2147483648 == Long.valueOf('2147483648') // Long type used, value too large for an Integer assert 456G == new BigInteger('456') assert 456g == new BigInteger('456') assert 123.45 == new BigDecimal('123.45') // default BigDecimal type used assert .321 == new BigDecimal('.321') assert 1.200065D == Double.valueOf('1.200065') assert 1.234F == Float.valueOf('1.234') assert 1.23E23D == Double.valueOf('1.23E23') assert 0b1111L.class == Long // binary assert 0xFFi.class == Integer // hexadecimal assert 034G.class == BigInteger // octal 5.5. Math operations Although operators are covered in more detail elsewhere, it’s important to discuss the behavior of math operations and what their resulting types are. Division and power binary operations aside (covered below), binary operations between byte , char , short and int result in int binary operations involving long with byte , char , short and int result in long binary operations involving BigInteger and any other integral type result in BigInteger binary operations involving BigDecimal with byte , char , short , int and BigInteger result in BigDecimal binary operations between float , double and BigDecimal result in double binary operations between two BigDecimal result in BigDecimal The following table summarizes those rules: byte char short int long BigInteger float double BigDecimal byte int int int int long BigInteger double double BigDecimal char int int int long BigInteger double double BigDecimal short int int long BigInteger double double BigDecimal int int long BigInteger double double BigDecimal long long BigInteger double double BigDecimal BigInteger BigInteger double double BigDecimal float double double double double double double BigDecimal BigDecimal Thanks to Groovy’s operator overloading, the usual arithmetic operators work as well with BigInteger and BigDecimal , unlike in Java where you have to use explicit methods for operating on those numbers. 5.5.1. The case of the division operator The division operators / (and /= for division and assignment) produce a double result if either operand is a float or double , and a BigDecimal result otherwise (when both operands are any combination of an integral type short , char , byte , int , long , BigInteger or BigDecimal ). BigDecimal division is performed with the divide() method if the division is exact (i.e. yielding a result that can be represented within the bounds of the same precision and scale), or using a MathContext with a precision of the maximum of the two operands' precision plus an extra precision of 10, and a scale of the maximum of 10 and the maximum of the operands' scale. For integer division like in Java, you should use the intdiv() method, as Groovy doesn’t provide a dedicated integer division operator symbol. 5.5.2. The case of the power operator The power operation is represented by the ** operator, with two parameters: the base and the exponent. The result of the power operation depends on its operands, and the result of the operation (in particular if the result can be represented as an integral value). The following rules are used by Groovy’s power operation to determine the resulting type: If the exponent is a decimal value if the result can be represented as an Integer , then return an Integer else if the result can be represented as a Long , then return a Long otherwise return a Double If the exponent is an integral value if the exponent is strictly negative, then return an Integer , Long or Double if the result value fits in that type if the exponent is positive or zero if the base is a BigDecimal , then return a BigDecimal result value if the base is a BigInteger , then return a BigInteger result value if the base is an Integer , then return an Integer if the result value fits in it, otherwise a BigInteger if the base is a Long , then return a Long if the result value fits in it, otherwise a BigInteger We can illustrate those rules with a few examples: // base and exponent are ints and the result can be represented by an Integer assert 2 ** 3 instanceof Integer // 8 assert 10 ** 9 instanceof Integer // 1_000_000_000 // the base is a long, so fit the result in a Long // (although it could have fit in an Integer) assert 5L ** 2 instanceof Long // 25 // the result can't be represented as an Integer or Long, so return a BigInteger assert 100 ** 10 instanceof BigInteger // 10e20 assert 1234 ** 123 instanceof BigInteger // 170515806212727042875... // the base is a BigDecimal and the exponent a negative int // but the result can be represented as an Integer assert 0.5 ** -2 instanceof Integer // 4 // the base is an int, and the exponent a negative float // but again, the result can be represented as an Integer assert 1 ** -0.3f instanceof Integer // 1 // the base is an int, and the exponent a negative int // but the result will be calculated as a Double // (both base and exponent are actually converted to doubles) assert 10 ** -1 instanceof Double // 0.1 // the base is a BigDecimal, and the exponent is an int, so return a BigDecimal assert 1.2 ** 10 instanceof BigDecimal // 6.1917364224 // the base is a float or double, and the exponent is an int // but the result can only be represented as a Double value assert 3.4f ** 5 instanceof Double // 454.35430372146965 assert 5.6d ** 2 instanceof Double // 31.359999999999996 // the exponent is a decimal value // and the result can only be represented as a Double value assert 7.8 ** 1.9 instanceof Double // 49.542708423868476 assert 2 ** 0.1f instanceof Double // 1.0717734636432956 6. Booleans Boolean is a special data type that is used to represent truth values: true and false . Use this data type for simple flags that track true/false conditions . Boolean values can be stored in variables, assigned into fields, just like any other data type: def myBooleanVariable = true boolean untypedBooleanVar = false booleanField = true true and false are the only two primitive boolean values. But more complex boolean expressions can be represented using logical operators . In addition, Groovy has special rules (often referred to as Groovy Truth ) for coercing non-boolean objects to a boolean value. 7. Lists Groovy uses a comma-separated list of values, surrounded by square brackets, to denote lists. Groovy lists are plain JDK java.util.List , as Groovy doesn’t define its own collection classes. The concrete list implementation used when defining list literals are java.util.ArrayList by default, unless you decide to specify otherwise, as we shall see later on. def numbers = [1, 2, 3] (1) assert numbers instanceof List (2) assert numbers.size() == 3 (3) 1 We define a list numbers delimited by commas and surrounded by square brackets, and we assign that list into a variable 2 The list is an instance of Java’s java.util.List interface 3 The size of the list can be queried with the size() method, and shows our list contains 3 elements In the above example, we used a homogeneous list, but you can also create lists containing values of heterogeneous types: def heterogeneous = [1, "a", true] (1) 1 Our list here contains a number, a string and a boolean value We mentioned that by default, list literals are actually instances of java.util.ArrayList , but it is possible to use a different backing type for our lists, thanks to using type coercion with the as operator, or with explicit type declaration for your variables: def arrayList = [1, 2, 3] assert arrayList instanceof java.util.ArrayList def linkedList = [2, 3, 4] as LinkedList (1) assert linkedList instanceof java.util.LinkedList LinkedList otherLinked = [3, 4, 5] (2) assert otherLinked instanceof java.util.LinkedList 1 We use coercion with the as operator to explicitly request a java.util.LinkedList implementation 2 We can say that the variable holding the list literal is of type java.util.LinkedList You can access elements of the list with the [] subscript operator (both for reading and setting values) with positive indices or negative indices to access elements from the end of the list, as well as with ranges, and use the << leftShift operator to append elements to a list: def letters = ['a', 'b', 'c', 'd'] assert letters[0] == 'a' (1) assert letters[1] == 'b' assert letters[-1] == 'd' (2) assert letters[-2] == 'c' letters[2] = 'C' (3) assert letters[2] == 'C' letters << 'e' (4) assert letters[ 4] == 'e' assert letters[-1] == 'e' assert letters[1, 3] == ['b', 'd'] (5) assert letters[2..4] == ['C', 'd', 'e'] (6) 1 Access the first element of the list (zero-based counting) 2 Access the last element of the list with a negative index: -1 is the first element from the end of the list 3 Use an assignment to set a new value for the third element of the list 4 Use the << leftShift operator to append an element at the end of the list 5 Access two elements at once, returning a new list containing those two elements 6 Use a range to access a range of values from the list, from a start to an end element position As lists can be heterogeneous in nature, lists can also contain other lists to create multidimensional lists: def multi = [[0, 1], [2, 3]] (1) assert multi[1][0] == 2 (2) 1 Define a list of numbers 2 Access the second element of the top-most list, and the first element of the inner list 8. Arrays Groovy reuses the list notation for arrays, but to make such literals arrays, you need to explicitly define the type of the array through coercion or type declaration. String[] arrStr = ['Ananas', 'Banana', 'Kiwi'] (1) assert arrStr instanceof String[] (2) assert !(arrStr instanceof List) def numArr = [1, 2, 3] as int[] (3) assert numArr instanceof int[] (4) assert numArr.size() == 3 1 Define an array of strings using explicit variable type declaration 2 Assert that we created an array of strings 3 Create an array of ints with the as operator 4 Assert that we created an array of primitive ints You can also create multi-dimensional arrays: def matrix3 = new Integer[3][3] (1) assert matrix3.size() == 3 Integer[][] matrix2 (2) matrix2 = [[1, 2], [3, 4]] assert matrix2 instanceof Integer[][] 1 You can define the bounds of a new array 2 Or declare an array without specifying its bounds Access to elements of an array follows the same notation as for lists: String[] names = ['Cédric', 'Guillaume', 'Jochen', 'Paul'] assert names[0] == 'Cédric' (1) names[2] = 'Blackdrag' (2) assert names[2] == 'Blackdrag' 1 Retrieve the first element of the array 2 Set the value of the third element of the array to a new value 8.1. Java-style array initialization Groovy has always supported literal list/array definitions using square brackets and has avoided Java-style curly braces so as not to conflict with closure definitions. In the case where the curly braces come immediately after an array type declaration however, there is no ambiguity with closure definitions, so Groovy 3 and above support that variant of the Java array initialization expression. Examples: def primes = new int[] {2, 3, 5, 7, 11} assert primes.size() == 5 && primes.sum() == 28 assert primes.class.name == '[I' def pets = new String[] {'cat', 'dog'} assert pets.size() == 2 && pets.sum() == 'catdog' assert pets.class.name == '[Ljava.lang.String;' // traditional Groovy alternative still supported String[] groovyBooks = [ 'Groovy in Action', 'Making Java Groovy' ] assert groovyBooks.every{ it.contains('Groovy') } 9. Maps Sometimes called dictionaries or associative arrays in other languages, Groovy features maps. Maps associate keys to values, separating keys and values with colons, and each key/value pairs with commas, and the whole keys and values surrounded by square brackets. def colors = [red: '#FF0000', green: '#00FF00', blue: '#0000FF'] (1) assert colors['red'] == '#FF0000' (2) assert colors.green == '#00FF00' (3) colors['pink'] = '#FF00FF' (4) colors.yellow = '#FFFF00' (5) assert colors.pink == '#FF00FF' assert colors['yellow'] == '#FFFF00' assert colors instanceof java.util.LinkedHashMap 1 We define a map of string color names, associated with their hexadecimal-coded html colors 2 We use the subscript notation to check the content associated with the red key 3 We can also use the property notation to assert the color green’s hexadecimal representation 4 Similarly, we can use the subscript notation to add a new key/value pair 5 Or the property notation, to add the yellow color When using names for the keys, we actually define string keys in the map. Groovy creates maps that are actually instances of java.util.LinkedHashMap . If you try to access a key which is not present in the map: assert colors.unknown == null def emptyMap = [:] assert emptyMap.anyKey == null You will retrieve a null result. In the examples above, we used string keys, but you can also use values of other types as keys: def numbers = [1: 'one', 2: 'two'] assert numbers[1] == 'one' Here, we used numbers as keys, as numbers can unambiguously be recognized as numbers, so Groovy will not create a string key like in our previous examples. But consider the case you want to pass a variable in lieu of the key, to have the value of that variable become the key: def key = 'name' def person = [key: 'Guillaume'] (1) assert !person.containsKey('name') (2) assert person.containsKey('key') (3) 1 The key associated with the 'Guillaume' name will actually be the "key" string, not the value associated with the key variable 2 The map doesn’t contain the 'name' key 3 Instead, the map contains a 'key' key You can also pass quoted strings as well as keys: ["name": "Guillaume"]. This is mandatory if your key string isn’t a valid identifier, for example if you wanted to create a string key containing a dash like in: ["street-name": "Main street"]. When you need to pass variable values as keys in your map definitions, you must surround the variable or expression with parentheses: person = [(key): 'Guillaume'] (1) assert person.containsKey('name') (2) assert !person.containsKey('key') (3) 1 This time, we surround the key variable with parentheses, to instruct the parser we are passing a variable rather than defining a string key 2 The map does contain the name key 3 But the map doesn’t contain the key key as before Groovy Learn Documentation Download Support Contribute Ecosystem Blog posts About Source code Security Books Thanks Sponsorship FAQ Search Socialize Discuss on the mailing-list Groovy on X Groovy on Bluesky Groovy on Mastodon Groovy on LinkedIn Events and conferences Source code on GitHub Report issues in Jira Stack Overflow questions Slack Community The Groovy programming language is supported by the Apache Software Foundation and the Groovy community. Apache, Apache Groovy, Groovy, and the ASF logo are either registered trademarks or trademarks of The Apache Software Foundation. © 2003-2025 the Apache Groovy project — Groovy is Open Source: license , privacy policy . | 2026-01-13T09:29:32 |
http://groovy-lang.org/syntax.html#_special_case_of_interpolating_closure_expressions | The Apache Groovy programming language - Syntax Socialize Discuss on the mailing-list Groovy on X Groovy on Bluesky Groovy on Mastodon Groovy on LinkedIn Events and conferences Source code on GitHub Report issues in Jira Stack Overflow questions Slack Community You are using an outdated browser. Please upgrade your browser to improve your experience. Apache Groovy™ Learn Documentation Download Support Contribute Ecosystem Blog posts Socialize Table of contents 1. Comments 1.1. Single-line comment 1.2. Multiline comment 1.3. Groovydoc comment 1.4. Shebang line 2. Keywords 3. Identifiers 3.1. Normal identifiers 3.2. Quoted identifiers 4. Strings 4.1. Single-quoted string 4.2. String concatenation 4.3. Triple-single-quoted string 4.3.1. Escaping special characters 4.3.2. Unicode escape sequence 4.4. Double-quoted string 4.4.1. String interpolation 4.4.2. Special case of interpolating closure expressions 4.4.3. Interoperability with Java 4.4.4. GString and String hashCodes 4.5. Triple-double-quoted string 4.6. Slashy string 4.6.1. Special cases 4.7. Dollar slashy string 4.8. String summary table 4.9. Characters 5. Numbers 5.1. Integral literals 5.1.1. Alternative non-base 10 representations Binary literal Octal literal Hexadecimal literal 5.2. Decimal literals 5.3. Underscore in literals 5.4. Number type suffixes 5.5. Math operations 5.5.1. The case of the division operator 5.5.2. The case of the power operator 6. Booleans 7. Lists 8. Arrays 8.1. Java-style array initialization 9. Maps Syntax This chapter covers the syntax of the Groovy programming language. The grammar of the language derives from the Java grammar, but enhances it with specific constructs for Groovy, and allows certain simplifications. 1. Comments 1.1. Single-line comment Single-line comments start with // and can be found at any position in the line. The characters following // , until the end of the line, are considered part of the comment. // a standalone single line comment println "hello" // a comment till the end of the line 1.2. Multiline comment A multiline comment starts with /* and can be found at any position in the line. The characters following /* will be considered part of the comment, including new line characters, up to the first */ closing the comment. Multiline comments can thus be put at the end of a statement, or even inside a statement. /* a standalone multiline comment spanning two lines */ println "hello" /* a multiline comment starting at the end of a statement */ println 1 /* one */ + 2 /* two */ 1.3. Groovydoc comment Similarly to multiline comments, Groovydoc comments are multiline, but start with /** and end with */ . Lines following the first Groovydoc comment line can optionally start with a star * . Those comments are associated with: type definitions (classes, interfaces, enums, annotations), fields and properties definitions methods definitions Although the compiler will not complain about Groovydoc comments not being associated with the above language elements, you should prepend those constructs with the comment right before it. /** * A Class description */ class Person { /** the name of the person */ String name /** * Creates a greeting method for a certain person. * * @param otherPerson the person to greet * @return a greeting message */ String greet(String otherPerson) { "Hello ${otherPerson}" } } Groovydoc follows the same conventions as Java’s own Javadoc. So you’ll be able to use the same tags as with Javadoc. In addition, Groovy supports Runtime Groovydoc since 3.0.0, i.e. Groovydoc can be retained at runtime. Runtime Groovydoc is disabled by default. It can be enabled by adding JVM option -Dgroovy.attach.runtime.groovydoc=true The Runtime Groovydoc starts with /**@ and ends with */ , for example: /**@ * Some class groovydoc for Foo */ class Foo { /**@ * Some method groovydoc for bar */ void bar() { } } assert Foo.class.groovydoc.content.contains('Some class groovydoc for Foo') (1) assert Foo.class.getMethod('bar', new Class[0]).groovydoc.content.contains('Some method groovydoc for bar') (2) 1 Get the runtime groovydoc for class Foo 2 Get the runtime groovydoc for method bar 1.4. Shebang line Beside the single-line comment, there is a special line comment, often called the shebang line understood by UNIX systems which allows scripts to be run directly from the command-line, provided you have installed the Groovy distribution and the groovy command is available on the PATH . #!/usr/bin/env groovy println "Hello from the shebang line" The # character must be the first character of the file. Any indentation would yield a compilation error. 2. Keywords Groovy has the following reserved keywords: Table 1. Reserved Keywords abstract assert break case catch class const continue def default do else enum extends final finally for goto if implements import instanceof interface native new null non-sealed package public protected private return static strictfp super switch synchronized this threadsafe throw throws transient try while Of these, const , goto , strictfp , and threadsafe are not currently in use. The reserved keywords can’t in general be used for variable, field and method names. A trick allows methods to be defined having the same name as a keyword by surrounding the name in quotes as shown in the following example: // reserved keywords can be used for method names if quoted def "abstract"() { true } // when calling such methods, the name must be qualified using "this." this.abstract() Using such names might be confusing and is often best to avoid. The trick is primarily intended to enable certain Java integration scenarios and certain DSL scenarios where having "verbs" and "nouns" with the same name as keywords may be desirable. In addition, Groovy has the following contextual keywords: Table 2. Contextual Keywords as in permits record sealed trait var yields These words are only keywords in certain contexts and can be more freely used in some places, in particular for variables, fields and method names. This extra lenience allows using method or variable names that were not keywords in earlier versions of Groovy or are not keywords in Java. Examples are shown here: // contextual keywords can be used for field and variable names def as = true assert as // contextual keywords can be used for method names def in() { true } // when calling such methods, the name only needs to be qualified using "this." in scenarios which would be ambiguous this.in() Groovy programmers familiar with these contextual keywords may still wish to avoid using those names unless there is a good reason to use such a name. The restrictions on reserved keywords also apply for the primitive types, the boolean literals and the null literal (all of which are discussed later): Table 3. Other reserved words null true false boolean char byte short int long float double While not recommended, the same trick as for reserved keywords can be used: def "null"() { true } // not recommended; potentially confusing assert this.null() // must be qualified Using such words as method names is potentially confusing and is often best to avoid, however, it might be useful for certain kinds of DSLs . 3. Identifiers 3.1. Normal identifiers Identifiers start with a letter, a dollar or an underscore. They cannot start with a number. A letter can be in the following ranges: 'a' to 'z' (lowercase ascii letter) 'A' to 'Z' (uppercase ascii letter) '\u00C0' to '\u00D6' '\u00D8' to '\u00F6' '\u00F8' to '\u00FF' '\u0100' to '\uFFFE' Then following characters can contain letters and numbers. Here are a few examples of valid identifiers (here, variable names): def name def item3 def with_underscore def $dollarStart But the following ones are invalid identifiers: def 3tier def a+b def a#b All keywords are also valid identifiers when following a dot: foo.as foo.assert foo.break foo.case foo.catch 3.2. Quoted identifiers Quoted identifiers appear after the dot of a dotted expression. For instance, the name part of the person.name expression can be quoted with person."name" or person.'name' . This is particularly interesting when certain identifiers contain illegal characters that are forbidden by the Java Language Specification, but which are allowed by Groovy when quoted. For example, characters like a dash, a space, an exclamation mark, etc. def map = [:] map."an identifier with a space and double quotes" = "ALLOWED" map.'with-dash-signs-and-single-quotes' = "ALLOWED" assert map."an identifier with a space and double quotes" == "ALLOWED" assert map.'with-dash-signs-and-single-quotes' == "ALLOWED" As we shall see in the following section on strings , Groovy provides different string literals. All kind of strings are actually allowed after the dot: map.'single quote' map."double quote" map.'''triple single quote''' map."""triple double quote""" map./slashy string/ map.$/dollar slashy string/$ There’s a difference between plain character strings and Groovy’s GStrings (interpolated strings), as in that the latter case, the interpolated values are inserted in the final string for evaluating the whole identifier: def firstname = "Homer" map."Simpson-${firstname}" = "Homer Simpson" assert map.'Simpson-Homer' == "Homer Simpson" 4. Strings Text literals are represented in the form of chain of characters called strings. Groovy lets you instantiate java.lang.String objects, as well as GStrings ( groovy.lang.GString ) which are also called interpolated strings in other programming languages. 4.1. Single-quoted string Single-quoted strings are a series of characters surrounded by single quotes: 'a single-quoted string' Single-quoted strings are plain java.lang.String and don’t support interpolation. 4.2. String concatenation All the Groovy strings can be concatenated with the + operator: assert 'ab' == 'a' + 'b' 4.3. Triple-single-quoted string Triple-single-quoted strings are a series of characters surrounded by triplets of single quotes: '''a triple-single-quoted string''' Triple-single-quoted strings are plain java.lang.String and don’t support interpolation. Triple-single-quoted strings may span multiple lines. The content of the string can cross line boundaries without the need to split the string in several pieces and without concatenation or newline escape characters: def aMultilineString = '''line one line two line three''' If your code is indented, for example in the body of the method of a class, your string will contain the whitespace of the indentation. The Groovy Development Kit contains methods for stripping out the indentation with the String#stripIndent() method, and with the String#stripMargin() method that takes a delimiter character to identify the text to remove from the beginning of a string. When creating a string as follows: def startingAndEndingWithANewline = ''' line one line two line three ''' You will notice that the resulting string contains a newline character as first character. It is possible to strip that character by escaping the newline with a backslash: def strippedFirstNewline = '''\ line one line two line three ''' assert !strippedFirstNewline.startsWith('\n') 4.3.1. Escaping special characters You can escape single quotes with the backslash character to avoid terminating the string literal: 'an escaped single quote: \' needs a backslash' And you can escape the escape character itself with a double backslash: 'an escaped escape character: \\ needs a double backslash' Some special characters also use the backslash as escape character: Escape sequence Character \b backspace \f formfeed \n newline \r carriage return \s single space \t tabulation \\ backslash \' single quote within a single-quoted string (and optional for triple-single-quoted and double-quoted strings) \" double quote within a double-quoted string (and optional for triple-double-quoted and single-quoted strings) We’ll see some more escaping details when it comes to other types of strings discussed later. 4.3.2. Unicode escape sequence For characters that are not present on your keyboard, you can use unicode escape sequences: a backslash, followed by 'u', then 4 hexadecimal digits. For example, the Euro currency symbol can be represented with: 'The Euro currency symbol: \u20AC' 4.4. Double-quoted string Double-quoted strings are a series of characters surrounded by double quotes: "a double-quoted string" Double-quoted strings are plain java.lang.String if there’s no interpolated expression, but are groovy.lang.GString instances if interpolation is present. To escape a double quote, you can use the backslash character: "A double quote: \"". 4.4.1. String interpolation Any Groovy expression can be interpolated in all string literals, apart from single and triple-single-quoted strings. Interpolation is the act of replacing a placeholder in the string with its value upon evaluation of the string. The placeholder expressions are surrounded by ${} . The curly braces may be omitted for unambiguous dotted expressions, i.e. we can use just a $ prefix in those cases. If the GString is ever passed to a method taking a String, the expression value inside the placeholder is evaluated to its string representation (by calling toString() on that expression) and the resulting String is passed to the method. Here, we have a string with a placeholder referencing a local variable: def name = 'Guillaume' // a plain string def greeting = "Hello ${name}" assert greeting.toString() == 'Hello Guillaume' Any Groovy expression is valid, as we can see in this example with an arithmetic expression: def sum = "The sum of 2 and 3 equals ${2 + 3}" assert sum.toString() == 'The sum of 2 and 3 equals 5' Not only are expressions allowed in between the ${} placeholder, but so are statements. However, a statement’s value is just null . So if several statements are inserted in that placeholder, the last one should somehow return a meaningful value to be inserted. For instance, "The sum of 1 and 2 is equal to ${def a = 1; def b = 2; a + b}" is supported and works as expected but a good practice is usually to stick to simple expressions inside GString placeholders. In addition to ${} placeholders, we can also use a lone $ sign prefixing a dotted expression: def person = [name: 'Guillaume', age: 36] assert "$person.name is $person.age years old" == 'Guillaume is 36 years old' But only dotted expressions of the form a.b , a.b.c , etc, are valid. Expressions containing parentheses like method calls, curly braces for closures, dots which aren’t part of a property expression or arithmetic operators would be invalid. Given the following variable definition of a number: def number = 3.14 The following statement will throw a groovy.lang.MissingPropertyException because Groovy believes you’re trying to access the toString property of that number, which doesn’t exist: shouldFail(MissingPropertyException) { println "$number.toString()" } You can think of "$number.toString()" as being interpreted by the parser as "${number.toString}()" . Similarly, if the expression is ambiguous, you need to keep the curly braces: String thing = 'treasure' assert 'The x-coordinate of the treasure is represented by treasure.x' == "The x-coordinate of the $thing is represented by $thing.x" // <= Not allowed: ambiguous!! assert 'The x-coordinate of the treasure is represented by treasure.x' == "The x-coordinate of the $thing is represented by ${thing}.x" // <= Curly braces required If you need to escape the $ or ${} placeholders in a GString so they appear as is without interpolation, you just need to use a \ backslash character to escape the dollar sign: assert '$5' == "\$5" assert '${name}' == "\${name}" 4.4.2. Special case of interpolating closure expressions So far, we’ve seen we could interpolate arbitrary expressions inside the ${} placeholder, but there is a special case and notation for closure expressions. When the placeholder contains an arrow, ${→} , the expression is actually a closure expression — you can think of it as a closure with a dollar prepended in front of it: def sParameterLessClosure = "1 + 2 == ${-> 3}" (1) assert sParameterLessClosure == '1 + 2 == 3' def sOneParamClosure = "1 + 2 == ${ w -> w << 3}" (2) assert sOneParamClosure == '1 + 2 == 3' 1 The closure is a parameterless closure which doesn’t take arguments. 2 Here, the closure takes a single java.io.StringWriter argument, to which you can append content with the << leftShift operator. In either case, both placeholders are embedded closures. In appearance, it looks like a more verbose way of defining expressions to be interpolated, but closures have an interesting advantage over mere expressions: lazy evaluation. Let’s consider the following sample: def number = 1 (1) def eagerGString = "value == ${number}" def lazyGString = "value == ${ -> number }" assert eagerGString == "value == 1" (2) assert lazyGString == "value == 1" (3) number = 2 (4) assert eagerGString == "value == 1" (5) assert lazyGString == "value == 2" (6) 1 We define a number variable containing 1 that we then interpolate within two GStrings, as an expression in eagerGString and as a closure in lazyGString . 2 We expect the resulting string to contain the same string value of 1 for eagerGString . 3 Similarly for lazyGString 4 Then we change the value of the variable to a new number 5 With a plain interpolated expression, the value was actually bound at the time of creation of the GString. 6 But with a closure expression, the closure is called upon each coercion of the GString into String, resulting in an updated string containing the new number value. An embedded closure expression taking more than one parameter will generate an exception at runtime. Only closures with zero or one parameter are allowed. 4.4.3. Interoperability with Java When a method (whether implemented in Java or Groovy) expects a java.lang.String , but we pass a groovy.lang.GString instance, the toString() method of the GString is automatically and transparently called. String takeString(String message) { (4) assert message instanceof String (5) return message } def message = "The message is ${'hello'}" (1) assert message instanceof GString (2) def result = takeString(message) (3) assert result instanceof String assert result == 'The message is hello' 1 We create a GString variable 2 We double-check it’s an instance of the GString 3 We then pass that GString to a method taking a String as parameter 4 The signature of the takeString() method explicitly says its sole parameter is a String 5 We also verify that the parameter is indeed a String and not a GString. 4.4.4. GString and String hashCodes Although interpolated strings can be used in lieu of plain Java strings, they differ with strings in a particular way: their hashCodes are different. Plain Java strings are immutable, whereas the resulting String representation of a GString can vary, depending on its interpolated values. Even for the same resulting string, GStrings and Strings don’t have the same hashCode. assert "one: ${1}".hashCode() != "one: 1".hashCode() GString and Strings having different hashCode values, using GString as Map keys should be avoided, especially if we try to retrieve an associated value with a String instead of a GString. def key = "a" def m = ["${key}": "letter ${key}"] (1) assert m["a"] == null (2) 1 The map is created with an initial pair whose key is a GString 2 When we try to fetch the value with a String key, we will not find it, as Strings and GString have different hashCode values 4.5. Triple-double-quoted string Triple-double-quoted strings behave like double-quoted strings, with the addition that they are multiline, like the triple-single-quoted strings. def name = 'Groovy' def template = """ Dear Mr ${name}, You're the winner of the lottery! Yours sincerly, Dave """ assert template.toString().contains('Groovy') Neither double quotes nor single quotes need be escaped in triple-double-quoted strings. 4.6. Slashy string Beyond the usual quoted strings, Groovy offers slashy strings, which use / as the opening and closing delimiter. Slashy strings are particularly useful for defining regular expressions and patterns, as there is no need to escape backslashes. Example of a slashy string: def fooPattern = /.*foo.*/ assert fooPattern == '.*foo.*' Only forward slashes need to be escaped with a backslash: def escapeSlash = /The character \/ is a forward slash/ assert escapeSlash == 'The character / is a forward slash' Slashy strings are multiline: def multilineSlashy = /one two three/ assert multilineSlashy.contains('\n') Slashy strings can be thought of as just another way to define a GString but with different escaping rules. They hence support interpolation: def color = 'blue' def interpolatedSlashy = /a ${color} car/ assert interpolatedSlashy == 'a blue car' 4.6.1. Special cases An empty slashy string cannot be represented with a double forward slash, as it’s understood by the Groovy parser as a line comment. That’s why the following assert would actually not compile as it would look like a non-terminated statement: assert '' == // As slashy strings were mostly designed to make regexp easier so a few things that are errors in GStrings like $() or $5 will work with slashy strings. Remember that escaping backslashes is not required. An alternative way of thinking of this is that in fact escaping is not supported. The slashy string /\t/ won’t contain a tab but instead a backslash followed by the character 't'. Escaping is only allowed for the slash character, i.e. /\/folder/ will be a slashy string containing '/folder' . A consequence of slash escaping is that a slashy string can’t end with a backslash. Otherwise that will escape the slashy string terminator. You can instead use a special trick, /ends with slash ${'\\'}/ . But best just avoid using a slashy string in such a case. 4.7. Dollar slashy string Dollar slashy strings are multiline GStrings delimited with an opening $/ and a closing /$ . The escaping character is the dollar sign, and it can escape another dollar, or a forward slash. Escaping for the dollar and forward slash characters is only needed where conflicts arise with the special use of those characters. The characters $foo would normally indicate a GString placeholder, so those four characters can be entered into a dollar slashy string by escaping the dollar, i.e. $$foo . Similarly, you will need to escape a dollar slashy closing delimiter if you want it to appear in your string. Here are a few examples: def name = "Guillaume" def date = "April, 1st" def dollarSlashy = $/ Hello $name, today we're ${date}. $ dollar sign $$ escaped dollar sign \ backslash / forward slash $/ escaped forward slash $$$/ escaped opening dollar slashy $/$$ escaped closing dollar slashy /$ assert [ 'Guillaume', 'April, 1st', '$ dollar sign', '$ escaped dollar sign', '\\ backslash', '/ forward slash', '/ escaped forward slash', '$/ escaped opening dollar slashy', '/$ escaped closing dollar slashy' ].every { dollarSlashy.contains(it) } It was created to overcome some of the limitations of the slashy string escaping rules. Use it when its escaping rules suit your string contents (typically if it has some slashes you don’t want to escape). 4.8. String summary table String name String syntax Interpolated Multiline Escape character Single-quoted '…​' \ Triple-single-quoted '''…​''' \ Double-quoted "…​" \ Triple-double-quoted """…​""" \ Slashy /…​/ \ Dollar slashy $/…​/$ $ 4.9. Characters Unlike Java, Groovy doesn’t have an explicit character literal. However, you can be explicit about making a Groovy string an actual character, by three different means: char c1 = 'A' (1) assert c1 instanceof Character def c2 = 'B' as char (2) assert c2 instanceof Character def c3 = (char)'C' (3) assert c3 instanceof Character 1 by being explicit when declaring a variable holding the character by specifying the char type 2 by using type coercion with the as operator 3 by using a cast to char operation The first option 1 is interesting when the character is held in a variable, while the other two ( 2 and 3 ) are more interesting when a char value must be passed as argument of a method call. 5. Numbers Groovy supports different kinds of integral literals and decimal literals, backed by the usual Number types of Java. 5.1. Integral literals The integral literal types are the same as in Java: byte char short int long java.math.BigInteger You can create integral numbers of those types with the following declarations: // primitive types byte b = 1 char c = 2 short s = 3 int i = 4 long l = 5 // infinite precision BigInteger bi = 6 If you use optional typing by using the def keyword, the type of the integral number will vary: it’ll adapt to the capacity of the type that can hold that number. For positive numbers: def a = 1 assert a instanceof Integer // Integer.MAX_VALUE def b = 2147483647 assert b instanceof Integer // Integer.MAX_VALUE + 1 def c = 2147483648 assert c instanceof Long // Long.MAX_VALUE def d = 9223372036854775807 assert d instanceof Long // Long.MAX_VALUE + 1 def e = 9223372036854775808 assert e instanceof BigInteger As well as for negative numbers: def na = -1 assert na instanceof Integer // Integer.MIN_VALUE def nb = -2147483648 assert nb instanceof Integer // Integer.MIN_VALUE - 1 def nc = -2147483649 assert nc instanceof Long // Long.MIN_VALUE def nd = -9223372036854775808 assert nd instanceof Long // Long.MIN_VALUE - 1 def ne = -9223372036854775809 assert ne instanceof BigInteger 5.1.1. Alternative non-base 10 representations Numbers can also be represented in binary, octal, hexadecimal and decimal bases. Binary literal Binary numbers start with a 0b prefix: int xInt = 0b10101111 assert xInt == 175 short xShort = 0b11001001 assert xShort == 201 as short byte xByte = 0b11 assert xByte == 3 as byte long xLong = 0b101101101101 assert xLong == 2925l BigInteger xBigInteger = 0b111100100001 assert xBigInteger == 3873g int xNegativeInt = -0b10101111 assert xNegativeInt == -175 Octal literal Octal numbers are specified in the typical format of 0 followed by octal digits. int xInt = 077 assert xInt == 63 short xShort = 011 assert xShort == 9 as short byte xByte = 032 assert xByte == 26 as byte long xLong = 0246 assert xLong == 166l BigInteger xBigInteger = 01111 assert xBigInteger == 585g int xNegativeInt = -077 assert xNegativeInt == -63 Hexadecimal literal Hexadecimal numbers are specified in the typical format of 0x followed by hex digits. int xInt = 0x77 assert xInt == 119 short xShort = 0xaa assert xShort == 170 as short byte xByte = 0x3a assert xByte == 58 as byte long xLong = 0xffff assert xLong == 65535l BigInteger xBigInteger = 0xaaaa assert xBigInteger == 43690g Double xDouble = new Double('0x1.0p0') assert xDouble == 1.0d int xNegativeInt = -0x77 assert xNegativeInt == -119 5.2. Decimal literals The decimal literal types are the same as in Java: float double java.math.BigDecimal You can create decimal numbers of those types with the following declarations: // primitive types float f = 1.234 double d = 2.345 // infinite precision BigDecimal bd = 3.456 Decimals can use exponents, with the e or E exponent letter, followed by an optional sign, and an integral number representing the exponent: assert 1e3 == 1_000.0 assert 2E4 == 20_000.0 assert 3e+1 == 30.0 assert 4E-2 == 0.04 assert 5e-1 == 0.5 Conveniently for exact decimal number calculations, Groovy chooses java.math.BigDecimal as its decimal number type. In addition, both float and double are supported, but require an explicit type declaration, type coercion or suffix. Even if BigDecimal is the default for decimal numbers, such literals are accepted in methods or closures taking float or double as parameter types. Decimal numbers can’t be represented using a binary, octal or hexadecimal representation. 5.3. Underscore in literals When writing long literal numbers, it’s harder on the eye to figure out how some numbers are grouped together, for example with groups of thousands, of words, etc. By allowing you to place underscore in number literals, it’s easier to spot those groups: long creditCardNumber = 1234_5678_9012_3456L long socialSecurityNumbers = 999_99_9999L double monetaryAmount = 12_345_132.12 long hexBytes = 0xFF_EC_DE_5E long hexWords = 0xFFEC_DE5E long maxLong = 0x7fff_ffff_ffff_ffffL long alsoMaxLong = 9_223_372_036_854_775_807L long bytes = 0b11010010_01101001_10010100_10010010 5.4. Number type suffixes We can force a number (including binary, octals and hexadecimals) to have a specific type by giving a suffix (see table below), either uppercase or lowercase. Type Suffix BigInteger G or g Long L or l Integer I or i BigDecimal G or g Double D or d Float F or f Examples: assert 42I == Integer.valueOf('42') assert 42i == Integer.valueOf('42') // lowercase i more readable assert 123L == Long.valueOf("123") // uppercase L more readable assert 2147483648 == Long.valueOf('2147483648') // Long type used, value too large for an Integer assert 456G == new BigInteger('456') assert 456g == new BigInteger('456') assert 123.45 == new BigDecimal('123.45') // default BigDecimal type used assert .321 == new BigDecimal('.321') assert 1.200065D == Double.valueOf('1.200065') assert 1.234F == Float.valueOf('1.234') assert 1.23E23D == Double.valueOf('1.23E23') assert 0b1111L.class == Long // binary assert 0xFFi.class == Integer // hexadecimal assert 034G.class == BigInteger // octal 5.5. Math operations Although operators are covered in more detail elsewhere, it’s important to discuss the behavior of math operations and what their resulting types are. Division and power binary operations aside (covered below), binary operations between byte , char , short and int result in int binary operations involving long with byte , char , short and int result in long binary operations involving BigInteger and any other integral type result in BigInteger binary operations involving BigDecimal with byte , char , short , int and BigInteger result in BigDecimal binary operations between float , double and BigDecimal result in double binary operations between two BigDecimal result in BigDecimal The following table summarizes those rules: byte char short int long BigInteger float double BigDecimal byte int int int int long BigInteger double double BigDecimal char int int int long BigInteger double double BigDecimal short int int long BigInteger double double BigDecimal int int long BigInteger double double BigDecimal long long BigInteger double double BigDecimal BigInteger BigInteger double double BigDecimal float double double double double double double BigDecimal BigDecimal Thanks to Groovy’s operator overloading, the usual arithmetic operators work as well with BigInteger and BigDecimal , unlike in Java where you have to use explicit methods for operating on those numbers. 5.5.1. The case of the division operator The division operators / (and /= for division and assignment) produce a double result if either operand is a float or double , and a BigDecimal result otherwise (when both operands are any combination of an integral type short , char , byte , int , long , BigInteger or BigDecimal ). BigDecimal division is performed with the divide() method if the division is exact (i.e. yielding a result that can be represented within the bounds of the same precision and scale), or using a MathContext with a precision of the maximum of the two operands' precision plus an extra precision of 10, and a scale of the maximum of 10 and the maximum of the operands' scale. For integer division like in Java, you should use the intdiv() method, as Groovy doesn’t provide a dedicated integer division operator symbol. 5.5.2. The case of the power operator The power operation is represented by the ** operator, with two parameters: the base and the exponent. The result of the power operation depends on its operands, and the result of the operation (in particular if the result can be represented as an integral value). The following rules are used by Groovy’s power operation to determine the resulting type: If the exponent is a decimal value if the result can be represented as an Integer , then return an Integer else if the result can be represented as a Long , then return a Long otherwise return a Double If the exponent is an integral value if the exponent is strictly negative, then return an Integer , Long or Double if the result value fits in that type if the exponent is positive or zero if the base is a BigDecimal , then return a BigDecimal result value if the base is a BigInteger , then return a BigInteger result value if the base is an Integer , then return an Integer if the result value fits in it, otherwise a BigInteger if the base is a Long , then return a Long if the result value fits in it, otherwise a BigInteger We can illustrate those rules with a few examples: // base and exponent are ints and the result can be represented by an Integer assert 2 ** 3 instanceof Integer // 8 assert 10 ** 9 instanceof Integer // 1_000_000_000 // the base is a long, so fit the result in a Long // (although it could have fit in an Integer) assert 5L ** 2 instanceof Long // 25 // the result can't be represented as an Integer or Long, so return a BigInteger assert 100 ** 10 instanceof BigInteger // 10e20 assert 1234 ** 123 instanceof BigInteger // 170515806212727042875... // the base is a BigDecimal and the exponent a negative int // but the result can be represented as an Integer assert 0.5 ** -2 instanceof Integer // 4 // the base is an int, and the exponent a negative float // but again, the result can be represented as an Integer assert 1 ** -0.3f instanceof Integer // 1 // the base is an int, and the exponent a negative int // but the result will be calculated as a Double // (both base and exponent are actually converted to doubles) assert 10 ** -1 instanceof Double // 0.1 // the base is a BigDecimal, and the exponent is an int, so return a BigDecimal assert 1.2 ** 10 instanceof BigDecimal // 6.1917364224 // the base is a float or double, and the exponent is an int // but the result can only be represented as a Double value assert 3.4f ** 5 instanceof Double // 454.35430372146965 assert 5.6d ** 2 instanceof Double // 31.359999999999996 // the exponent is a decimal value // and the result can only be represented as a Double value assert 7.8 ** 1.9 instanceof Double // 49.542708423868476 assert 2 ** 0.1f instanceof Double // 1.0717734636432956 6. Booleans Boolean is a special data type that is used to represent truth values: true and false . Use this data type for simple flags that track true/false conditions . Boolean values can be stored in variables, assigned into fields, just like any other data type: def myBooleanVariable = true boolean untypedBooleanVar = false booleanField = true true and false are the only two primitive boolean values. But more complex boolean expressions can be represented using logical operators . In addition, Groovy has special rules (often referred to as Groovy Truth ) for coercing non-boolean objects to a boolean value. 7. Lists Groovy uses a comma-separated list of values, surrounded by square brackets, to denote lists. Groovy lists are plain JDK java.util.List , as Groovy doesn’t define its own collection classes. The concrete list implementation used when defining list literals are java.util.ArrayList by default, unless you decide to specify otherwise, as we shall see later on. def numbers = [1, 2, 3] (1) assert numbers instanceof List (2) assert numbers.size() == 3 (3) 1 We define a list numbers delimited by commas and surrounded by square brackets, and we assign that list into a variable 2 The list is an instance of Java’s java.util.List interface 3 The size of the list can be queried with the size() method, and shows our list contains 3 elements In the above example, we used a homogeneous list, but you can also create lists containing values of heterogeneous types: def heterogeneous = [1, "a", true] (1) 1 Our list here contains a number, a string and a boolean value We mentioned that by default, list literals are actually instances of java.util.ArrayList , but it is possible to use a different backing type for our lists, thanks to using type coercion with the as operator, or with explicit type declaration for your variables: def arrayList = [1, 2, 3] assert arrayList instanceof java.util.ArrayList def linkedList = [2, 3, 4] as LinkedList (1) assert linkedList instanceof java.util.LinkedList LinkedList otherLinked = [3, 4, 5] (2) assert otherLinked instanceof java.util.LinkedList 1 We use coercion with the as operator to explicitly request a java.util.LinkedList implementation 2 We can say that the variable holding the list literal is of type java.util.LinkedList You can access elements of the list with the [] subscript operator (both for reading and setting values) with positive indices or negative indices to access elements from the end of the list, as well as with ranges, and use the << leftShift operator to append elements to a list: def letters = ['a', 'b', 'c', 'd'] assert letters[0] == 'a' (1) assert letters[1] == 'b' assert letters[-1] == 'd' (2) assert letters[-2] == 'c' letters[2] = 'C' (3) assert letters[2] == 'C' letters << 'e' (4) assert letters[ 4] == 'e' assert letters[-1] == 'e' assert letters[1, 3] == ['b', 'd'] (5) assert letters[2..4] == ['C', 'd', 'e'] (6) 1 Access the first element of the list (zero-based counting) 2 Access the last element of the list with a negative index: -1 is the first element from the end of the list 3 Use an assignment to set a new value for the third element of the list 4 Use the << leftShift operator to append an element at the end of the list 5 Access two elements at once, returning a new list containing those two elements 6 Use a range to access a range of values from the list, from a start to an end element position As lists can be heterogeneous in nature, lists can also contain other lists to create multidimensional lists: def multi = [[0, 1], [2, 3]] (1) assert multi[1][0] == 2 (2) 1 Define a list of numbers 2 Access the second element of the top-most list, and the first element of the inner list 8. Arrays Groovy reuses the list notation for arrays, but to make such literals arrays, you need to explicitly define the type of the array through coercion or type declaration. String[] arrStr = ['Ananas', 'Banana', 'Kiwi'] (1) assert arrStr instanceof String[] (2) assert !(arrStr instanceof List) def numArr = [1, 2, 3] as int[] (3) assert numArr instanceof int[] (4) assert numArr.size() == 3 1 Define an array of strings using explicit variable type declaration 2 Assert that we created an array of strings 3 Create an array of ints with the as operator 4 Assert that we created an array of primitive ints You can also create multi-dimensional arrays: def matrix3 = new Integer[3][3] (1) assert matrix3.size() == 3 Integer[][] matrix2 (2) matrix2 = [[1, 2], [3, 4]] assert matrix2 instanceof Integer[][] 1 You can define the bounds of a new array 2 Or declare an array without specifying its bounds Access to elements of an array follows the same notation as for lists: String[] names = ['Cédric', 'Guillaume', 'Jochen', 'Paul'] assert names[0] == 'Cédric' (1) names[2] = 'Blackdrag' (2) assert names[2] == 'Blackdrag' 1 Retrieve the first element of the array 2 Set the value of the third element of the array to a new value 8.1. Java-style array initialization Groovy has always supported literal list/array definitions using square brackets and has avoided Java-style curly braces so as not to conflict with closure definitions. In the case where the curly braces come immediately after an array type declaration however, there is no ambiguity with closure definitions, so Groovy 3 and above support that variant of the Java array initialization expression. Examples: def primes = new int[] {2, 3, 5, 7, 11} assert primes.size() == 5 && primes.sum() == 28 assert primes.class.name == '[I' def pets = new String[] {'cat', 'dog'} assert pets.size() == 2 && pets.sum() == 'catdog' assert pets.class.name == '[Ljava.lang.String;' // traditional Groovy alternative still supported String[] groovyBooks = [ 'Groovy in Action', 'Making Java Groovy' ] assert groovyBooks.every{ it.contains('Groovy') } 9. Maps Sometimes called dictionaries or associative arrays in other languages, Groovy features maps. Maps associate keys to values, separating keys and values with colons, and each key/value pairs with commas, and the whole keys and values surrounded by square brackets. def colors = [red: '#FF0000', green: '#00FF00', blue: '#0000FF'] (1) assert colors['red'] == '#FF0000' (2) assert colors.green == '#00FF00' (3) colors['pink'] = '#FF00FF' (4) colors.yellow = '#FFFF00' (5) assert colors.pink == '#FF00FF' assert colors['yellow'] == '#FFFF00' assert colors instanceof java.util.LinkedHashMap 1 We define a map of string color names, associated with their hexadecimal-coded html colors 2 We use the subscript notation to check the content associated with the red key 3 We can also use the property notation to assert the color green’s hexadecimal representation 4 Similarly, we can use the subscript notation to add a new key/value pair 5 Or the property notation, to add the yellow color When using names for the keys, we actually define string keys in the map. Groovy creates maps that are actually instances of java.util.LinkedHashMap . If you try to access a key which is not present in the map: assert colors.unknown == null def emptyMap = [:] assert emptyMap.anyKey == null You will retrieve a null result. In the examples above, we used string keys, but you can also use values of other types as keys: def numbers = [1: 'one', 2: 'two'] assert numbers[1] == 'one' Here, we used numbers as keys, as numbers can unambiguously be recognized as numbers, so Groovy will not create a string key like in our previous examples. But consider the case you want to pass a variable in lieu of the key, to have the value of that variable become the key: def key = 'name' def person = [key: 'Guillaume'] (1) assert !person.containsKey('name') (2) assert person.containsKey('key') (3) 1 The key associated with the 'Guillaume' name will actually be the "key" string, not the value associated with the key variable 2 The map doesn’t contain the 'name' key 3 Instead, the map contains a 'key' key You can also pass quoted strings as well as keys: ["name": "Guillaume"]. This is mandatory if your key string isn’t a valid identifier, for example if you wanted to create a string key containing a dash like in: ["street-name": "Main street"]. When you need to pass variable values as keys in your map definitions, you must surround the variable or expression with parentheses: person = [(key): 'Guillaume'] (1) assert person.containsKey('name') (2) assert !person.containsKey('key') (3) 1 This time, we surround the key variable with parentheses, to instruct the parser we are passing a variable rather than defining a string key 2 The map does contain the name key 3 But the map doesn’t contain the key key as before Groovy Learn Documentation Download Support Contribute Ecosystem Blog posts About Source code Security Books Thanks Sponsorship FAQ Search Socialize Discuss on the mailing-list Groovy on X Groovy on Bluesky Groovy on Mastodon Groovy on LinkedIn Events and conferences Source code on GitHub Report issues in Jira Stack Overflow questions Slack Community The Groovy programming language is supported by the Apache Software Foundation and the Groovy community. Apache, Apache Groovy, Groovy, and the ASF logo are either registered trademarks or trademarks of The Apache Software Foundation. © 2003-2025 the Apache Groovy project — Groovy is Open Source: license , privacy policy . | 2026-01-13T09:29:32 |
https://docs.aws.amazon.com/pt_br/cost-management/latest/userguide/add-tags-to-dashboards.html | Adicionar etiquetas a painéis - AWS Gestão de custos Adicionar etiquetas a painéis - AWS Gestão de custos Documentação AWS Billing and Cost Management Manual do usuário As traduções são geradas por tradução automática. Em caso de conflito entre o conteúdo da tradução e da versão original em inglês, a versão em inglês prevalecerá. Adicionar etiquetas a painéis Etiquetas ajudam você a identificar, organizar e gerenciar seus painéis adicionando rótulos descritivos. Você pode marcar seus painéis para identificar qual departamento os criou, rastreá-los por projeto ou iniciativa, rotular sua finalidade ou marcá-los para diferentes ambientes. Por exemplo, você pode usar etiquetas como Departamento = Marketing ou Projeto = Otimização de Custo-2025 para categorizar seus painéis. Quando existem muitos painéis em sua organização, as etiquetas se tornam particularmente valiosas. Eles permitem filtrar e pesquisar painéis específicos, controlar o acesso por meio de políticas do IAM com base nos valores das etiquetas e rastrear painéis que atendem a propósitos semelhantes em equipes diferentes. Se você usa a AWS CLI ou o SDK, etiquetas também ajudam a gerenciar painéis relacionados como um grupo. Para adicionar etiquetas a um painel Abra o console de Gerenciamento de Faturamento e Custos da em https://console.aws.amazon.com/costmanagement/ . No painel de navegação, escolha Painéis . Selecione o tipo de painel que você deseja marcar. Escolha Ações e, em seguida, Gerenciar etiquetas na lista suspensa. Selecione Adicionar nova tag . Insira a chave e o valor (opcional) para a etiqueta. Selecione Adicionar nova tag para adicionar mais tags. O número máximo de tags que podem ser adicionadas é 50 Escolha Salvar alterações . Depois de salvar as alterações, as etiquetas são aplicadas ao seu painel e podem ser usadas para filtragem e controle de acesso. O Javascript está desativado ou não está disponível no seu navegador. Para usar a documentação da AWS, o Javascript deve estar ativado. Consulte as páginas de Ajuda do navegador para obter instruções. Convenções do documento Duplicar painéis Analisando seus custos e uso com o AWS Cost Explorer Essa página foi útil? - Sim Obrigado por nos informar que estamos fazendo um bom trabalho! Se tiver tempo, conte-nos sobre o que você gostou para que possamos melhorar ainda mais. Essa página foi útil? - Não Obrigado por nos informar que precisamos melhorar a página. Lamentamos ter decepcionado você. Se tiver tempo, conte-nos como podemos melhorar a documentação. | 2026-01-13T09:29:32 |
http://groovy-lang.org/syntax.html#_alternative_non_base_10_representations | The Apache Groovy programming language - Syntax Socialize Discuss on the mailing-list Groovy on X Groovy on Bluesky Groovy on Mastodon Groovy on LinkedIn Events and conferences Source code on GitHub Report issues in Jira Stack Overflow questions Slack Community You are using an outdated browser. Please upgrade your browser to improve your experience. Apache Groovy™ Learn Documentation Download Support Contribute Ecosystem Blog posts Socialize Table of contents 1. Comments 1.1. Single-line comment 1.2. Multiline comment 1.3. Groovydoc comment 1.4. Shebang line 2. Keywords 3. Identifiers 3.1. Normal identifiers 3.2. Quoted identifiers 4. Strings 4.1. Single-quoted string 4.2. String concatenation 4.3. Triple-single-quoted string 4.3.1. Escaping special characters 4.3.2. Unicode escape sequence 4.4. Double-quoted string 4.4.1. String interpolation 4.4.2. Special case of interpolating closure expressions 4.4.3. Interoperability with Java 4.4.4. GString and String hashCodes 4.5. Triple-double-quoted string 4.6. Slashy string 4.6.1. Special cases 4.7. Dollar slashy string 4.8. String summary table 4.9. Characters 5. Numbers 5.1. Integral literals 5.1.1. Alternative non-base 10 representations Binary literal Octal literal Hexadecimal literal 5.2. Decimal literals 5.3. Underscore in literals 5.4. Number type suffixes 5.5. Math operations 5.5.1. The case of the division operator 5.5.2. The case of the power operator 6. Booleans 7. Lists 8. Arrays 8.1. Java-style array initialization 9. Maps Syntax This chapter covers the syntax of the Groovy programming language. The grammar of the language derives from the Java grammar, but enhances it with specific constructs for Groovy, and allows certain simplifications. 1. Comments 1.1. Single-line comment Single-line comments start with // and can be found at any position in the line. The characters following // , until the end of the line, are considered part of the comment. // a standalone single line comment println "hello" // a comment till the end of the line 1.2. Multiline comment A multiline comment starts with /* and can be found at any position in the line. The characters following /* will be considered part of the comment, including new line characters, up to the first */ closing the comment. Multiline comments can thus be put at the end of a statement, or even inside a statement. /* a standalone multiline comment spanning two lines */ println "hello" /* a multiline comment starting at the end of a statement */ println 1 /* one */ + 2 /* two */ 1.3. Groovydoc comment Similarly to multiline comments, Groovydoc comments are multiline, but start with /** and end with */ . Lines following the first Groovydoc comment line can optionally start with a star * . Those comments are associated with: type definitions (classes, interfaces, enums, annotations), fields and properties definitions methods definitions Although the compiler will not complain about Groovydoc comments not being associated with the above language elements, you should prepend those constructs with the comment right before it. /** * A Class description */ class Person { /** the name of the person */ String name /** * Creates a greeting method for a certain person. * * @param otherPerson the person to greet * @return a greeting message */ String greet(String otherPerson) { "Hello ${otherPerson}" } } Groovydoc follows the same conventions as Java’s own Javadoc. So you’ll be able to use the same tags as with Javadoc. In addition, Groovy supports Runtime Groovydoc since 3.0.0, i.e. Groovydoc can be retained at runtime. Runtime Groovydoc is disabled by default. It can be enabled by adding JVM option -Dgroovy.attach.runtime.groovydoc=true The Runtime Groovydoc starts with /**@ and ends with */ , for example: /**@ * Some class groovydoc for Foo */ class Foo { /**@ * Some method groovydoc for bar */ void bar() { } } assert Foo.class.groovydoc.content.contains('Some class groovydoc for Foo') (1) assert Foo.class.getMethod('bar', new Class[0]).groovydoc.content.contains('Some method groovydoc for bar') (2) 1 Get the runtime groovydoc for class Foo 2 Get the runtime groovydoc for method bar 1.4. Shebang line Beside the single-line comment, there is a special line comment, often called the shebang line understood by UNIX systems which allows scripts to be run directly from the command-line, provided you have installed the Groovy distribution and the groovy command is available on the PATH . #!/usr/bin/env groovy println "Hello from the shebang line" The # character must be the first character of the file. Any indentation would yield a compilation error. 2. Keywords Groovy has the following reserved keywords: Table 1. Reserved Keywords abstract assert break case catch class const continue def default do else enum extends final finally for goto if implements import instanceof interface native new null non-sealed package public protected private return static strictfp super switch synchronized this threadsafe throw throws transient try while Of these, const , goto , strictfp , and threadsafe are not currently in use. The reserved keywords can’t in general be used for variable, field and method names. A trick allows methods to be defined having the same name as a keyword by surrounding the name in quotes as shown in the following example: // reserved keywords can be used for method names if quoted def "abstract"() { true } // when calling such methods, the name must be qualified using "this." this.abstract() Using such names might be confusing and is often best to avoid. The trick is primarily intended to enable certain Java integration scenarios and certain DSL scenarios where having "verbs" and "nouns" with the same name as keywords may be desirable. In addition, Groovy has the following contextual keywords: Table 2. Contextual Keywords as in permits record sealed trait var yields These words are only keywords in certain contexts and can be more freely used in some places, in particular for variables, fields and method names. This extra lenience allows using method or variable names that were not keywords in earlier versions of Groovy or are not keywords in Java. Examples are shown here: // contextual keywords can be used for field and variable names def as = true assert as // contextual keywords can be used for method names def in() { true } // when calling such methods, the name only needs to be qualified using "this." in scenarios which would be ambiguous this.in() Groovy programmers familiar with these contextual keywords may still wish to avoid using those names unless there is a good reason to use such a name. The restrictions on reserved keywords also apply for the primitive types, the boolean literals and the null literal (all of which are discussed later): Table 3. Other reserved words null true false boolean char byte short int long float double While not recommended, the same trick as for reserved keywords can be used: def "null"() { true } // not recommended; potentially confusing assert this.null() // must be qualified Using such words as method names is potentially confusing and is often best to avoid, however, it might be useful for certain kinds of DSLs . 3. Identifiers 3.1. Normal identifiers Identifiers start with a letter, a dollar or an underscore. They cannot start with a number. A letter can be in the following ranges: 'a' to 'z' (lowercase ascii letter) 'A' to 'Z' (uppercase ascii letter) '\u00C0' to '\u00D6' '\u00D8' to '\u00F6' '\u00F8' to '\u00FF' '\u0100' to '\uFFFE' Then following characters can contain letters and numbers. Here are a few examples of valid identifiers (here, variable names): def name def item3 def with_underscore def $dollarStart But the following ones are invalid identifiers: def 3tier def a+b def a#b All keywords are also valid identifiers when following a dot: foo.as foo.assert foo.break foo.case foo.catch 3.2. Quoted identifiers Quoted identifiers appear after the dot of a dotted expression. For instance, the name part of the person.name expression can be quoted with person."name" or person.'name' . This is particularly interesting when certain identifiers contain illegal characters that are forbidden by the Java Language Specification, but which are allowed by Groovy when quoted. For example, characters like a dash, a space, an exclamation mark, etc. def map = [:] map."an identifier with a space and double quotes" = "ALLOWED" map.'with-dash-signs-and-single-quotes' = "ALLOWED" assert map."an identifier with a space and double quotes" == "ALLOWED" assert map.'with-dash-signs-and-single-quotes' == "ALLOWED" As we shall see in the following section on strings , Groovy provides different string literals. All kind of strings are actually allowed after the dot: map.'single quote' map."double quote" map.'''triple single quote''' map."""triple double quote""" map./slashy string/ map.$/dollar slashy string/$ There’s a difference between plain character strings and Groovy’s GStrings (interpolated strings), as in that the latter case, the interpolated values are inserted in the final string for evaluating the whole identifier: def firstname = "Homer" map."Simpson-${firstname}" = "Homer Simpson" assert map.'Simpson-Homer' == "Homer Simpson" 4. Strings Text literals are represented in the form of chain of characters called strings. Groovy lets you instantiate java.lang.String objects, as well as GStrings ( groovy.lang.GString ) which are also called interpolated strings in other programming languages. 4.1. Single-quoted string Single-quoted strings are a series of characters surrounded by single quotes: 'a single-quoted string' Single-quoted strings are plain java.lang.String and don’t support interpolation. 4.2. String concatenation All the Groovy strings can be concatenated with the + operator: assert 'ab' == 'a' + 'b' 4.3. Triple-single-quoted string Triple-single-quoted strings are a series of characters surrounded by triplets of single quotes: '''a triple-single-quoted string''' Triple-single-quoted strings are plain java.lang.String and don’t support interpolation. Triple-single-quoted strings may span multiple lines. The content of the string can cross line boundaries without the need to split the string in several pieces and without concatenation or newline escape characters: def aMultilineString = '''line one line two line three''' If your code is indented, for example in the body of the method of a class, your string will contain the whitespace of the indentation. The Groovy Development Kit contains methods for stripping out the indentation with the String#stripIndent() method, and with the String#stripMargin() method that takes a delimiter character to identify the text to remove from the beginning of a string. When creating a string as follows: def startingAndEndingWithANewline = ''' line one line two line three ''' You will notice that the resulting string contains a newline character as first character. It is possible to strip that character by escaping the newline with a backslash: def strippedFirstNewline = '''\ line one line two line three ''' assert !strippedFirstNewline.startsWith('\n') 4.3.1. Escaping special characters You can escape single quotes with the backslash character to avoid terminating the string literal: 'an escaped single quote: \' needs a backslash' And you can escape the escape character itself with a double backslash: 'an escaped escape character: \\ needs a double backslash' Some special characters also use the backslash as escape character: Escape sequence Character \b backspace \f formfeed \n newline \r carriage return \s single space \t tabulation \\ backslash \' single quote within a single-quoted string (and optional for triple-single-quoted and double-quoted strings) \" double quote within a double-quoted string (and optional for triple-double-quoted and single-quoted strings) We’ll see some more escaping details when it comes to other types of strings discussed later. 4.3.2. Unicode escape sequence For characters that are not present on your keyboard, you can use unicode escape sequences: a backslash, followed by 'u', then 4 hexadecimal digits. For example, the Euro currency symbol can be represented with: 'The Euro currency symbol: \u20AC' 4.4. Double-quoted string Double-quoted strings are a series of characters surrounded by double quotes: "a double-quoted string" Double-quoted strings are plain java.lang.String if there’s no interpolated expression, but are groovy.lang.GString instances if interpolation is present. To escape a double quote, you can use the backslash character: "A double quote: \"". 4.4.1. String interpolation Any Groovy expression can be interpolated in all string literals, apart from single and triple-single-quoted strings. Interpolation is the act of replacing a placeholder in the string with its value upon evaluation of the string. The placeholder expressions are surrounded by ${} . The curly braces may be omitted for unambiguous dotted expressions, i.e. we can use just a $ prefix in those cases. If the GString is ever passed to a method taking a String, the expression value inside the placeholder is evaluated to its string representation (by calling toString() on that expression) and the resulting String is passed to the method. Here, we have a string with a placeholder referencing a local variable: def name = 'Guillaume' // a plain string def greeting = "Hello ${name}" assert greeting.toString() == 'Hello Guillaume' Any Groovy expression is valid, as we can see in this example with an arithmetic expression: def sum = "The sum of 2 and 3 equals ${2 + 3}" assert sum.toString() == 'The sum of 2 and 3 equals 5' Not only are expressions allowed in between the ${} placeholder, but so are statements. However, a statement’s value is just null . So if several statements are inserted in that placeholder, the last one should somehow return a meaningful value to be inserted. For instance, "The sum of 1 and 2 is equal to ${def a = 1; def b = 2; a + b}" is supported and works as expected but a good practice is usually to stick to simple expressions inside GString placeholders. In addition to ${} placeholders, we can also use a lone $ sign prefixing a dotted expression: def person = [name: 'Guillaume', age: 36] assert "$person.name is $person.age years old" == 'Guillaume is 36 years old' But only dotted expressions of the form a.b , a.b.c , etc, are valid. Expressions containing parentheses like method calls, curly braces for closures, dots which aren’t part of a property expression or arithmetic operators would be invalid. Given the following variable definition of a number: def number = 3.14 The following statement will throw a groovy.lang.MissingPropertyException because Groovy believes you’re trying to access the toString property of that number, which doesn’t exist: shouldFail(MissingPropertyException) { println "$number.toString()" } You can think of "$number.toString()" as being interpreted by the parser as "${number.toString}()" . Similarly, if the expression is ambiguous, you need to keep the curly braces: String thing = 'treasure' assert 'The x-coordinate of the treasure is represented by treasure.x' == "The x-coordinate of the $thing is represented by $thing.x" // <= Not allowed: ambiguous!! assert 'The x-coordinate of the treasure is represented by treasure.x' == "The x-coordinate of the $thing is represented by ${thing}.x" // <= Curly braces required If you need to escape the $ or ${} placeholders in a GString so they appear as is without interpolation, you just need to use a \ backslash character to escape the dollar sign: assert '$5' == "\$5" assert '${name}' == "\${name}" 4.4.2. Special case of interpolating closure expressions So far, we’ve seen we could interpolate arbitrary expressions inside the ${} placeholder, but there is a special case and notation for closure expressions. When the placeholder contains an arrow, ${→} , the expression is actually a closure expression — you can think of it as a closure with a dollar prepended in front of it: def sParameterLessClosure = "1 + 2 == ${-> 3}" (1) assert sParameterLessClosure == '1 + 2 == 3' def sOneParamClosure = "1 + 2 == ${ w -> w << 3}" (2) assert sOneParamClosure == '1 + 2 == 3' 1 The closure is a parameterless closure which doesn’t take arguments. 2 Here, the closure takes a single java.io.StringWriter argument, to which you can append content with the << leftShift operator. In either case, both placeholders are embedded closures. In appearance, it looks like a more verbose way of defining expressions to be interpolated, but closures have an interesting advantage over mere expressions: lazy evaluation. Let’s consider the following sample: def number = 1 (1) def eagerGString = "value == ${number}" def lazyGString = "value == ${ -> number }" assert eagerGString == "value == 1" (2) assert lazyGString == "value == 1" (3) number = 2 (4) assert eagerGString == "value == 1" (5) assert lazyGString == "value == 2" (6) 1 We define a number variable containing 1 that we then interpolate within two GStrings, as an expression in eagerGString and as a closure in lazyGString . 2 We expect the resulting string to contain the same string value of 1 for eagerGString . 3 Similarly for lazyGString 4 Then we change the value of the variable to a new number 5 With a plain interpolated expression, the value was actually bound at the time of creation of the GString. 6 But with a closure expression, the closure is called upon each coercion of the GString into String, resulting in an updated string containing the new number value. An embedded closure expression taking more than one parameter will generate an exception at runtime. Only closures with zero or one parameter are allowed. 4.4.3. Interoperability with Java When a method (whether implemented in Java or Groovy) expects a java.lang.String , but we pass a groovy.lang.GString instance, the toString() method of the GString is automatically and transparently called. String takeString(String message) { (4) assert message instanceof String (5) return message } def message = "The message is ${'hello'}" (1) assert message instanceof GString (2) def result = takeString(message) (3) assert result instanceof String assert result == 'The message is hello' 1 We create a GString variable 2 We double-check it’s an instance of the GString 3 We then pass that GString to a method taking a String as parameter 4 The signature of the takeString() method explicitly says its sole parameter is a String 5 We also verify that the parameter is indeed a String and not a GString. 4.4.4. GString and String hashCodes Although interpolated strings can be used in lieu of plain Java strings, they differ with strings in a particular way: their hashCodes are different. Plain Java strings are immutable, whereas the resulting String representation of a GString can vary, depending on its interpolated values. Even for the same resulting string, GStrings and Strings don’t have the same hashCode. assert "one: ${1}".hashCode() != "one: 1".hashCode() GString and Strings having different hashCode values, using GString as Map keys should be avoided, especially if we try to retrieve an associated value with a String instead of a GString. def key = "a" def m = ["${key}": "letter ${key}"] (1) assert m["a"] == null (2) 1 The map is created with an initial pair whose key is a GString 2 When we try to fetch the value with a String key, we will not find it, as Strings and GString have different hashCode values 4.5. Triple-double-quoted string Triple-double-quoted strings behave like double-quoted strings, with the addition that they are multiline, like the triple-single-quoted strings. def name = 'Groovy' def template = """ Dear Mr ${name}, You're the winner of the lottery! Yours sincerly, Dave """ assert template.toString().contains('Groovy') Neither double quotes nor single quotes need be escaped in triple-double-quoted strings. 4.6. Slashy string Beyond the usual quoted strings, Groovy offers slashy strings, which use / as the opening and closing delimiter. Slashy strings are particularly useful for defining regular expressions and patterns, as there is no need to escape backslashes. Example of a slashy string: def fooPattern = /.*foo.*/ assert fooPattern == '.*foo.*' Only forward slashes need to be escaped with a backslash: def escapeSlash = /The character \/ is a forward slash/ assert escapeSlash == 'The character / is a forward slash' Slashy strings are multiline: def multilineSlashy = /one two three/ assert multilineSlashy.contains('\n') Slashy strings can be thought of as just another way to define a GString but with different escaping rules. They hence support interpolation: def color = 'blue' def interpolatedSlashy = /a ${color} car/ assert interpolatedSlashy == 'a blue car' 4.6.1. Special cases An empty slashy string cannot be represented with a double forward slash, as it’s understood by the Groovy parser as a line comment. That’s why the following assert would actually not compile as it would look like a non-terminated statement: assert '' == // As slashy strings were mostly designed to make regexp easier so a few things that are errors in GStrings like $() or $5 will work with slashy strings. Remember that escaping backslashes is not required. An alternative way of thinking of this is that in fact escaping is not supported. The slashy string /\t/ won’t contain a tab but instead a backslash followed by the character 't'. Escaping is only allowed for the slash character, i.e. /\/folder/ will be a slashy string containing '/folder' . A consequence of slash escaping is that a slashy string can’t end with a backslash. Otherwise that will escape the slashy string terminator. You can instead use a special trick, /ends with slash ${'\\'}/ . But best just avoid using a slashy string in such a case. 4.7. Dollar slashy string Dollar slashy strings are multiline GStrings delimited with an opening $/ and a closing /$ . The escaping character is the dollar sign, and it can escape another dollar, or a forward slash. Escaping for the dollar and forward slash characters is only needed where conflicts arise with the special use of those characters. The characters $foo would normally indicate a GString placeholder, so those four characters can be entered into a dollar slashy string by escaping the dollar, i.e. $$foo . Similarly, you will need to escape a dollar slashy closing delimiter if you want it to appear in your string. Here are a few examples: def name = "Guillaume" def date = "April, 1st" def dollarSlashy = $/ Hello $name, today we're ${date}. $ dollar sign $$ escaped dollar sign \ backslash / forward slash $/ escaped forward slash $$$/ escaped opening dollar slashy $/$$ escaped closing dollar slashy /$ assert [ 'Guillaume', 'April, 1st', '$ dollar sign', '$ escaped dollar sign', '\\ backslash', '/ forward slash', '/ escaped forward slash', '$/ escaped opening dollar slashy', '/$ escaped closing dollar slashy' ].every { dollarSlashy.contains(it) } It was created to overcome some of the limitations of the slashy string escaping rules. Use it when its escaping rules suit your string contents (typically if it has some slashes you don’t want to escape). 4.8. String summary table String name String syntax Interpolated Multiline Escape character Single-quoted '…​' \ Triple-single-quoted '''…​''' \ Double-quoted "…​" \ Triple-double-quoted """…​""" \ Slashy /…​/ \ Dollar slashy $/…​/$ $ 4.9. Characters Unlike Java, Groovy doesn’t have an explicit character literal. However, you can be explicit about making a Groovy string an actual character, by three different means: char c1 = 'A' (1) assert c1 instanceof Character def c2 = 'B' as char (2) assert c2 instanceof Character def c3 = (char)'C' (3) assert c3 instanceof Character 1 by being explicit when declaring a variable holding the character by specifying the char type 2 by using type coercion with the as operator 3 by using a cast to char operation The first option 1 is interesting when the character is held in a variable, while the other two ( 2 and 3 ) are more interesting when a char value must be passed as argument of a method call. 5. Numbers Groovy supports different kinds of integral literals and decimal literals, backed by the usual Number types of Java. 5.1. Integral literals The integral literal types are the same as in Java: byte char short int long java.math.BigInteger You can create integral numbers of those types with the following declarations: // primitive types byte b = 1 char c = 2 short s = 3 int i = 4 long l = 5 // infinite precision BigInteger bi = 6 If you use optional typing by using the def keyword, the type of the integral number will vary: it’ll adapt to the capacity of the type that can hold that number. For positive numbers: def a = 1 assert a instanceof Integer // Integer.MAX_VALUE def b = 2147483647 assert b instanceof Integer // Integer.MAX_VALUE + 1 def c = 2147483648 assert c instanceof Long // Long.MAX_VALUE def d = 9223372036854775807 assert d instanceof Long // Long.MAX_VALUE + 1 def e = 9223372036854775808 assert e instanceof BigInteger As well as for negative numbers: def na = -1 assert na instanceof Integer // Integer.MIN_VALUE def nb = -2147483648 assert nb instanceof Integer // Integer.MIN_VALUE - 1 def nc = -2147483649 assert nc instanceof Long // Long.MIN_VALUE def nd = -9223372036854775808 assert nd instanceof Long // Long.MIN_VALUE - 1 def ne = -9223372036854775809 assert ne instanceof BigInteger 5.1.1. Alternative non-base 10 representations Numbers can also be represented in binary, octal, hexadecimal and decimal bases. Binary literal Binary numbers start with a 0b prefix: int xInt = 0b10101111 assert xInt == 175 short xShort = 0b11001001 assert xShort == 201 as short byte xByte = 0b11 assert xByte == 3 as byte long xLong = 0b101101101101 assert xLong == 2925l BigInteger xBigInteger = 0b111100100001 assert xBigInteger == 3873g int xNegativeInt = -0b10101111 assert xNegativeInt == -175 Octal literal Octal numbers are specified in the typical format of 0 followed by octal digits. int xInt = 077 assert xInt == 63 short xShort = 011 assert xShort == 9 as short byte xByte = 032 assert xByte == 26 as byte long xLong = 0246 assert xLong == 166l BigInteger xBigInteger = 01111 assert xBigInteger == 585g int xNegativeInt = -077 assert xNegativeInt == -63 Hexadecimal literal Hexadecimal numbers are specified in the typical format of 0x followed by hex digits. int xInt = 0x77 assert xInt == 119 short xShort = 0xaa assert xShort == 170 as short byte xByte = 0x3a assert xByte == 58 as byte long xLong = 0xffff assert xLong == 65535l BigInteger xBigInteger = 0xaaaa assert xBigInteger == 43690g Double xDouble = new Double('0x1.0p0') assert xDouble == 1.0d int xNegativeInt = -0x77 assert xNegativeInt == -119 5.2. Decimal literals The decimal literal types are the same as in Java: float double java.math.BigDecimal You can create decimal numbers of those types with the following declarations: // primitive types float f = 1.234 double d = 2.345 // infinite precision BigDecimal bd = 3.456 Decimals can use exponents, with the e or E exponent letter, followed by an optional sign, and an integral number representing the exponent: assert 1e3 == 1_000.0 assert 2E4 == 20_000.0 assert 3e+1 == 30.0 assert 4E-2 == 0.04 assert 5e-1 == 0.5 Conveniently for exact decimal number calculations, Groovy chooses java.math.BigDecimal as its decimal number type. In addition, both float and double are supported, but require an explicit type declaration, type coercion or suffix. Even if BigDecimal is the default for decimal numbers, such literals are accepted in methods or closures taking float or double as parameter types. Decimal numbers can’t be represented using a binary, octal or hexadecimal representation. 5.3. Underscore in literals When writing long literal numbers, it’s harder on the eye to figure out how some numbers are grouped together, for example with groups of thousands, of words, etc. By allowing you to place underscore in number literals, it’s easier to spot those groups: long creditCardNumber = 1234_5678_9012_3456L long socialSecurityNumbers = 999_99_9999L double monetaryAmount = 12_345_132.12 long hexBytes = 0xFF_EC_DE_5E long hexWords = 0xFFEC_DE5E long maxLong = 0x7fff_ffff_ffff_ffffL long alsoMaxLong = 9_223_372_036_854_775_807L long bytes = 0b11010010_01101001_10010100_10010010 5.4. Number type suffixes We can force a number (including binary, octals and hexadecimals) to have a specific type by giving a suffix (see table below), either uppercase or lowercase. Type Suffix BigInteger G or g Long L or l Integer I or i BigDecimal G or g Double D or d Float F or f Examples: assert 42I == Integer.valueOf('42') assert 42i == Integer.valueOf('42') // lowercase i more readable assert 123L == Long.valueOf("123") // uppercase L more readable assert 2147483648 == Long.valueOf('2147483648') // Long type used, value too large for an Integer assert 456G == new BigInteger('456') assert 456g == new BigInteger('456') assert 123.45 == new BigDecimal('123.45') // default BigDecimal type used assert .321 == new BigDecimal('.321') assert 1.200065D == Double.valueOf('1.200065') assert 1.234F == Float.valueOf('1.234') assert 1.23E23D == Double.valueOf('1.23E23') assert 0b1111L.class == Long // binary assert 0xFFi.class == Integer // hexadecimal assert 034G.class == BigInteger // octal 5.5. Math operations Although operators are covered in more detail elsewhere, it’s important to discuss the behavior of math operations and what their resulting types are. Division and power binary operations aside (covered below), binary operations between byte , char , short and int result in int binary operations involving long with byte , char , short and int result in long binary operations involving BigInteger and any other integral type result in BigInteger binary operations involving BigDecimal with byte , char , short , int and BigInteger result in BigDecimal binary operations between float , double and BigDecimal result in double binary operations between two BigDecimal result in BigDecimal The following table summarizes those rules: byte char short int long BigInteger float double BigDecimal byte int int int int long BigInteger double double BigDecimal char int int int long BigInteger double double BigDecimal short int int long BigInteger double double BigDecimal int int long BigInteger double double BigDecimal long long BigInteger double double BigDecimal BigInteger BigInteger double double BigDecimal float double double double double double double BigDecimal BigDecimal Thanks to Groovy’s operator overloading, the usual arithmetic operators work as well with BigInteger and BigDecimal , unlike in Java where you have to use explicit methods for operating on those numbers. 5.5.1. The case of the division operator The division operators / (and /= for division and assignment) produce a double result if either operand is a float or double , and a BigDecimal result otherwise (when both operands are any combination of an integral type short , char , byte , int , long , BigInteger or BigDecimal ). BigDecimal division is performed with the divide() method if the division is exact (i.e. yielding a result that can be represented within the bounds of the same precision and scale), or using a MathContext with a precision of the maximum of the two operands' precision plus an extra precision of 10, and a scale of the maximum of 10 and the maximum of the operands' scale. For integer division like in Java, you should use the intdiv() method, as Groovy doesn’t provide a dedicated integer division operator symbol. 5.5.2. The case of the power operator The power operation is represented by the ** operator, with two parameters: the base and the exponent. The result of the power operation depends on its operands, and the result of the operation (in particular if the result can be represented as an integral value). The following rules are used by Groovy’s power operation to determine the resulting type: If the exponent is a decimal value if the result can be represented as an Integer , then return an Integer else if the result can be represented as a Long , then return a Long otherwise return a Double If the exponent is an integral value if the exponent is strictly negative, then return an Integer , Long or Double if the result value fits in that type if the exponent is positive or zero if the base is a BigDecimal , then return a BigDecimal result value if the base is a BigInteger , then return a BigInteger result value if the base is an Integer , then return an Integer if the result value fits in it, otherwise a BigInteger if the base is a Long , then return a Long if the result value fits in it, otherwise a BigInteger We can illustrate those rules with a few examples: // base and exponent are ints and the result can be represented by an Integer assert 2 ** 3 instanceof Integer // 8 assert 10 ** 9 instanceof Integer // 1_000_000_000 // the base is a long, so fit the result in a Long // (although it could have fit in an Integer) assert 5L ** 2 instanceof Long // 25 // the result can't be represented as an Integer or Long, so return a BigInteger assert 100 ** 10 instanceof BigInteger // 10e20 assert 1234 ** 123 instanceof BigInteger // 170515806212727042875... // the base is a BigDecimal and the exponent a negative int // but the result can be represented as an Integer assert 0.5 ** -2 instanceof Integer // 4 // the base is an int, and the exponent a negative float // but again, the result can be represented as an Integer assert 1 ** -0.3f instanceof Integer // 1 // the base is an int, and the exponent a negative int // but the result will be calculated as a Double // (both base and exponent are actually converted to doubles) assert 10 ** -1 instanceof Double // 0.1 // the base is a BigDecimal, and the exponent is an int, so return a BigDecimal assert 1.2 ** 10 instanceof BigDecimal // 6.1917364224 // the base is a float or double, and the exponent is an int // but the result can only be represented as a Double value assert 3.4f ** 5 instanceof Double // 454.35430372146965 assert 5.6d ** 2 instanceof Double // 31.359999999999996 // the exponent is a decimal value // and the result can only be represented as a Double value assert 7.8 ** 1.9 instanceof Double // 49.542708423868476 assert 2 ** 0.1f instanceof Double // 1.0717734636432956 6. Booleans Boolean is a special data type that is used to represent truth values: true and false . Use this data type for simple flags that track true/false conditions . Boolean values can be stored in variables, assigned into fields, just like any other data type: def myBooleanVariable = true boolean untypedBooleanVar = false booleanField = true true and false are the only two primitive boolean values. But more complex boolean expressions can be represented using logical operators . In addition, Groovy has special rules (often referred to as Groovy Truth ) for coercing non-boolean objects to a boolean value. 7. Lists Groovy uses a comma-separated list of values, surrounded by square brackets, to denote lists. Groovy lists are plain JDK java.util.List , as Groovy doesn’t define its own collection classes. The concrete list implementation used when defining list literals are java.util.ArrayList by default, unless you decide to specify otherwise, as we shall see later on. def numbers = [1, 2, 3] (1) assert numbers instanceof List (2) assert numbers.size() == 3 (3) 1 We define a list numbers delimited by commas and surrounded by square brackets, and we assign that list into a variable 2 The list is an instance of Java’s java.util.List interface 3 The size of the list can be queried with the size() method, and shows our list contains 3 elements In the above example, we used a homogeneous list, but you can also create lists containing values of heterogeneous types: def heterogeneous = [1, "a", true] (1) 1 Our list here contains a number, a string and a boolean value We mentioned that by default, list literals are actually instances of java.util.ArrayList , but it is possible to use a different backing type for our lists, thanks to using type coercion with the as operator, or with explicit type declaration for your variables: def arrayList = [1, 2, 3] assert arrayList instanceof java.util.ArrayList def linkedList = [2, 3, 4] as LinkedList (1) assert linkedList instanceof java.util.LinkedList LinkedList otherLinked = [3, 4, 5] (2) assert otherLinked instanceof java.util.LinkedList 1 We use coercion with the as operator to explicitly request a java.util.LinkedList implementation 2 We can say that the variable holding the list literal is of type java.util.LinkedList You can access elements of the list with the [] subscript operator (both for reading and setting values) with positive indices or negative indices to access elements from the end of the list, as well as with ranges, and use the << leftShift operator to append elements to a list: def letters = ['a', 'b', 'c', 'd'] assert letters[0] == 'a' (1) assert letters[1] == 'b' assert letters[-1] == 'd' (2) assert letters[-2] == 'c' letters[2] = 'C' (3) assert letters[2] == 'C' letters << 'e' (4) assert letters[ 4] == 'e' assert letters[-1] == 'e' assert letters[1, 3] == ['b', 'd'] (5) assert letters[2..4] == ['C', 'd', 'e'] (6) 1 Access the first element of the list (zero-based counting) 2 Access the last element of the list with a negative index: -1 is the first element from the end of the list 3 Use an assignment to set a new value for the third element of the list 4 Use the << leftShift operator to append an element at the end of the list 5 Access two elements at once, returning a new list containing those two elements 6 Use a range to access a range of values from the list, from a start to an end element position As lists can be heterogeneous in nature, lists can also contain other lists to create multidimensional lists: def multi = [[0, 1], [2, 3]] (1) assert multi[1][0] == 2 (2) 1 Define a list of numbers 2 Access the second element of the top-most list, and the first element of the inner list 8. Arrays Groovy reuses the list notation for arrays, but to make such literals arrays, you need to explicitly define the type of the array through coercion or type declaration. String[] arrStr = ['Ananas', 'Banana', 'Kiwi'] (1) assert arrStr instanceof String[] (2) assert !(arrStr instanceof List) def numArr = [1, 2, 3] as int[] (3) assert numArr instanceof int[] (4) assert numArr.size() == 3 1 Define an array of strings using explicit variable type declaration 2 Assert that we created an array of strings 3 Create an array of ints with the as operator 4 Assert that we created an array of primitive ints You can also create multi-dimensional arrays: def matrix3 = new Integer[3][3] (1) assert matrix3.size() == 3 Integer[][] matrix2 (2) matrix2 = [[1, 2], [3, 4]] assert matrix2 instanceof Integer[][] 1 You can define the bounds of a new array 2 Or declare an array without specifying its bounds Access to elements of an array follows the same notation as for lists: String[] names = ['Cédric', 'Guillaume', 'Jochen', 'Paul'] assert names[0] == 'Cédric' (1) names[2] = 'Blackdrag' (2) assert names[2] == 'Blackdrag' 1 Retrieve the first element of the array 2 Set the value of the third element of the array to a new value 8.1. Java-style array initialization Groovy has always supported literal list/array definitions using square brackets and has avoided Java-style curly braces so as not to conflict with closure definitions. In the case where the curly braces come immediately after an array type declaration however, there is no ambiguity with closure definitions, so Groovy 3 and above support that variant of the Java array initialization expression. Examples: def primes = new int[] {2, 3, 5, 7, 11} assert primes.size() == 5 && primes.sum() == 28 assert primes.class.name == '[I' def pets = new String[] {'cat', 'dog'} assert pets.size() == 2 && pets.sum() == 'catdog' assert pets.class.name == '[Ljava.lang.String;' // traditional Groovy alternative still supported String[] groovyBooks = [ 'Groovy in Action', 'Making Java Groovy' ] assert groovyBooks.every{ it.contains('Groovy') } 9. Maps Sometimes called dictionaries or associative arrays in other languages, Groovy features maps. Maps associate keys to values, separating keys and values with colons, and each key/value pairs with commas, and the whole keys and values surrounded by square brackets. def colors = [red: '#FF0000', green: '#00FF00', blue: '#0000FF'] (1) assert colors['red'] == '#FF0000' (2) assert colors.green == '#00FF00' (3) colors['pink'] = '#FF00FF' (4) colors.yellow = '#FFFF00' (5) assert colors.pink == '#FF00FF' assert colors['yellow'] == '#FFFF00' assert colors instanceof java.util.LinkedHashMap 1 We define a map of string color names, associated with their hexadecimal-coded html colors 2 We use the subscript notation to check the content associated with the red key 3 We can also use the property notation to assert the color green’s hexadecimal representation 4 Similarly, we can use the subscript notation to add a new key/value pair 5 Or the property notation, to add the yellow color When using names for the keys, we actually define string keys in the map. Groovy creates maps that are actually instances of java.util.LinkedHashMap . If you try to access a key which is not present in the map: assert colors.unknown == null def emptyMap = [:] assert emptyMap.anyKey == null You will retrieve a null result. In the examples above, we used string keys, but you can also use values of other types as keys: def numbers = [1: 'one', 2: 'two'] assert numbers[1] == 'one' Here, we used numbers as keys, as numbers can unambiguously be recognized as numbers, so Groovy will not create a string key like in our previous examples. But consider the case you want to pass a variable in lieu of the key, to have the value of that variable become the key: def key = 'name' def person = [key: 'Guillaume'] (1) assert !person.containsKey('name') (2) assert person.containsKey('key') (3) 1 The key associated with the 'Guillaume' name will actually be the "key" string, not the value associated with the key variable 2 The map doesn’t contain the 'name' key 3 Instead, the map contains a 'key' key You can also pass quoted strings as well as keys: ["name": "Guillaume"]. This is mandatory if your key string isn’t a valid identifier, for example if you wanted to create a string key containing a dash like in: ["street-name": "Main street"]. When you need to pass variable values as keys in your map definitions, you must surround the variable or expression with parentheses: person = [(key): 'Guillaume'] (1) assert person.containsKey('name') (2) assert !person.containsKey('key') (3) 1 This time, we surround the key variable with parentheses, to instruct the parser we are passing a variable rather than defining a string key 2 The map does contain the name key 3 But the map doesn’t contain the key key as before Groovy Learn Documentation Download Support Contribute Ecosystem Blog posts About Source code Security Books Thanks Sponsorship FAQ Search Socialize Discuss on the mailing-list Groovy on X Groovy on Bluesky Groovy on Mastodon Groovy on LinkedIn Events and conferences Source code on GitHub Report issues in Jira Stack Overflow questions Slack Community The Groovy programming language is supported by the Apache Software Foundation and the Groovy community. Apache, Apache Groovy, Groovy, and the ASF logo are either registered trademarks or trademarks of The Apache Software Foundation. © 2003-2025 the Apache Groovy project — Groovy is Open Source: license , privacy policy . | 2026-01-13T09:29:32 |
https://pix.webm.ink/site/kb/sharing-media#collapse1 | Pixelfed Help Center minkpix Help Center — Sharing Photos & Videos Getting Started Sharing Media Profile Hashtags Discover Timelines Instagram Import Community Guidelines Safety Tips Sharing Photos & Videos How do I create a post? To create a post using a desktop web browser: Go to https://pix.webm.ink . Click on the link at the top of the page. Upload your photo(s) or video(s), add an optional caption and set other options. Click on the Create Post button. To create a post using a mobile web browser: Go to https://pix.webm.ink . Click on the button at the bottom of the page. Upload your photo(s) or video(s), add an optional caption and set other options. Click on the Create Post button. How do I share a post with multiple photos or videos? During the compose process, you can select multiple files at a single time, or add each photo/video individually. How do I add a caption before sharing my photos or videos on Pixelfed? During the compose process, you will see the Caption input. Captions are optional and limited to 500 characters. How do I add a filter to my photos? This is an experimental feature, filters are not federated yet! To add a filter to media during the compose post process: Click the Options button if media preview is not displayed. Select a filter from the Select Filter dropdown. How do I add a description to each photo or video for the visually impaired? This is an experimental feature! You need to use the experimental compose UI found here . Add media by clicking the Add Photo/Video button. Set a image description by clicking the Media Description button. Image descriptions are federated to instances where supported. What types of photos or videos can I upload? You can upload the following media types: image/jpeg image/png image/gif video/mp4 image/webp How can I disable comments/replies on my post? To enable or disable comments/replies using a desktop or mobile browser: Open the menu, click the button Click on Enable Comments or Disable Comments How many people can I tag or mention in my comments or posts? You can tag or mention up to 5 profiles per comment or post. What does archive mean? You can archive your posts which prevents anyone from interacting or viewing it. Archived posts cannot be deleted or otherwise interacted with. You may not recieve interactions (comments, likes, shares) from other servers while a post is archived. How can I archive my posts? To archive your posts: Navigate to the post Open the menu, click the or button Click on Archive How do I unarchive my posts? To unarchive your posts: Navigate to your profile Click on the ARCHIVES tab Scroll to the post you want to unarchive Open the menu, click the or button Click on Unarchive About Help Terms Privacy Language © 2026 pix.webm.ink · Powered by Pixelfed · v0.12.6 | 2026-01-13T09:29:32 |
https://chromewebstore.google.com/detail/category/detail/volume-master/detail/jetwriter-ai-reply-emails/collection/detail/adobe-acrobat-pdf-edit-co/efaidnbmnnnibpcajpcglclefindmkaj | Chrome Web Store Skip to main content Chrome Web Store My extensions & themes Developer Dashboard Give feedback Sign in Discover Extensions Themes Welcome to Chrome Web Store Welcome to the Chrome Web Store Supercharge your browser with extensions and themes for Chrome See collection Favorites of 2025 Discover the standout AI extensions that made our year See collection Every day is Earth Day Plant trees, shop sustainably, and more See collection Adobe Photoshop Easily remove backgrounds, adjust colors and more. Plus, get 6 months free access to Photoshop web. 3.7 600K Users See details The future of writing Elevate your writing and create engaging and high-quality content effortlessly See collection 1 / 5 Top categories Shopping Entertainment Tools Art & Design Accessibility Top charts Trending Kami for Google Chrome™ Education 4.6 Average rating 4.6 out of 5 stars. Learn more about results and reviews. BetterCampus (prev. BetterCanvas) Education 4.9 Average rating 4.9 out of 5 stars. Learn more about results and reviews. Read&Write for Google Chrome™ Accessibility 3.4 Average rating 3.4 out of 5 stars. Learn more about results and reviews. See more Popular Volume Master Accessibility 4.8 Average rating 4.8 out of 5 stars. Learn more about results and reviews. Free VPN for Chrome - VPN Proxy VeePN Workflow & Planning 4.5 Average rating 4.5 out of 5 stars. Learn more about results and reviews. AdBlock — block ads across the web Workflow & Planning 4.5 Average rating 4.5 out of 5 stars. Learn more about results and reviews. See more New and notable Ad Block Wonder Privacy & Security 4.3 Average rating 4.3 out of 5 stars. Learn more about results and reviews. Smart popup blocker Tools 4.6 Average rating 4.6 out of 5 stars. Learn more about results and reviews. Manus AI Browser Operator Tools 4.5 Average rating 4.5 out of 5 stars. Learn more about results and reviews. See more Editors' Picks for you Handpicked by Chrome Editors See collection Extend your browser See more Discover a new level of convenience and customization with side panel extensions Chat with all AI models (Gemini, Claude, DeepSeek…) & AI Agents | AITOPIA 4.9 Average rating 4.9 out of 5 stars. Learn more about results and reviews. AI Agent Marketplace & AI Sidebar with all AI models (Gemini, Claude, DeepSeek & more) and hundreds of AI Agents Adobe Photoshop 3.7 Average rating 3.7 out of 5 stars. Learn more about results and reviews. Easily remove backgrounds, adjust colors and more. Plus, get 6 months free access to Photoshop web. BrowserGPT: ChatGPT Anywhere Powered by GPT 4 4.4 Average rating 4.4 out of 5 stars. Learn more about results and reviews. Write, reword, and translate 8x faster. Reply to emails in a click. Works on Google Docs, Gmail, YouTube, Twitter, Instagram, etc. Sidebar: ChatGPT, Bookmarks, GPT-4o | Meomni 4.8 Average rating 4.8 out of 5 stars. Learn more about results and reviews. Ultimate Sidebar ChatGPT Assistant, Bookmarks with AI, Calendar and Tasks Fleeting Notes 4.6 Average rating 4.6 out of 5 stars. Learn more about results and reviews. Quick notes from the browser to Obsidian Eclipse your screen Dim the lights with our dark mode selections See collection Chrome monthly spotlight Promising extensions to try out Web Highlights: PDF & Web Highlighter + Notes & AI Summary Productivity Highlighter & Annotation Tool for Websites & PDFs with AI Summary - free, easy to use, no sign-up required. Moonlight: AI Colleague for Research Papers Everything you need to read a paper: explanation, summary, translation, chat, and reference search. Reboost - Track Water Intake and Set Reminders Track your water intake and set custom reminders. Stay hydrated, stay on track, and never miss a break! ✨ YouTube Notes to Notion with Udemy, Coursera, BiliBili and more by Snipo Take YouTube notes directly to Notion, generate AI flashcards, capture screenshots, and sync learning courses with Notion Works with Gmail See more Boost your email productivity Boomerang for Gmail 4.2 Average rating 4.2 out of 5 stars. Learn more about results and reviews. Meeting scheduling and email management tool trusted by millions. Schedule meetings, track responses, send later, and more. Checker Plus for Gmail™ 4.7 Average rating 4.7 out of 5 stars. Learn more about results and reviews. Get notifications, read, listen to or delete emails without opening Gmail and easily manage multiple accounts. Email Tracker by Mailtrack® 4.4 Average rating 4.4 out of 5 stars. Learn more about results and reviews. Free, unlimited email tracker for Gmail, trusted by millions. Accurate, reliable, GDPR-compliant, and Google-audited. Streak CRM for Gmail 4.5 Average rating 4.5 out of 5 stars. Learn more about results and reviews. Manage sales and customer relationships directly inside Gmail. GMass: Powerful mail merge for Gmail 4.8 Average rating 4.8 out of 5 stars. Learn more about results and reviews. A powerful mass email and mail merge system for Gmail. Just for fun Bring some joy to your browser See collection Learn a new language See more Study while you browse Google Translate 4.2 Average rating 4.2 out of 5 stars. Learn more about results and reviews. View translations easily as you browse the web. By the Google Translate team. Rememberry - Translate and Memorize with Flashcards 4.6 Average rating 4.6 out of 5 stars. Learn more about results and reviews. Translate words while browsing and turn them into spaced repetition flashcards to build foreign language vocabulary. DeepL: translate and write with AI 4.7 Average rating 4.7 out of 5 stars. Learn more about results and reviews. Translate while you read and write with DeepL Translate, the world’s most accurate translator. Relingo - Master vocabulary while browsing websites and watching YouTube 4.6 Average rating 4.6 out of 5 stars. Learn more about results and reviews. Relingo extract words, full-text immersive translation while browsing. Also supports bilingual subtitles for Youtube, Netflix, etc. Readlang Web Reader 4.3 Average rating 4.3 out of 5 stars. Learn more about results and reviews. Read websites in the language you're learning, translate words you don't know, and we'll create flashcards to help you remember. Game on See more Beat boredom with bite-sized games in your browser BattleTabs 4.7 Average rating 4.7 out of 5 stars. Learn more about results and reviews. Multiplayer Battles in your New Tab Tiny Tycoon 4.7 Average rating 4.7 out of 5 stars. Learn more about results and reviews. Build a tiny tycoon on a tiny planet. Boxel 3D 4.6 Average rating 4.6 out of 5 stars. Learn more about results and reviews. Boxel 3D is a speedrunning game packed with challenging levels, custom skins, online multiplayer, and a creative level editor. Ice Dodo 4.6 Average rating 4.6 out of 5 stars. Learn more about results and reviews. Play 3D game easily by clicking the little icon at the top right corner of your browser. Boxel Golf 4.7 Average rating 4.7 out of 5 stars. Learn more about results and reviews. Boxel Golf is a multiplayer golf game packed with challenging courses, custom hats, and a powerful level builder. Work smarter, not harder with AI Automate tasks and stay focused and organized with AI-powered productivity extensions See collection For music lovers See more Equalizers, radios, playlists, and more Volume Master 4.8 Average rating 4.8 out of 5 stars. Learn more about results and reviews. Up to 600% volume boost Music Mode for YouTube™ 4.5 Average rating 4.5 out of 5 stars. Learn more about results and reviews. Hides the video and thumbnails on YouTube. Blocks the video keeping only the audio on YouTube Music. Smart Mute 4.5 Average rating 4.5 out of 5 stars. Learn more about results and reviews. Listen to audio one tab at a time. Modest Guitar | Columns for Ultimate-Guitar 4.8 Average rating 4.8 out of 5 stars. Learn more about results and reviews. Multiple columns and fullscreen for Ultimate-Guitar tabs Chrome Piano 4.5 Average rating 4.5 out of 5 stars. Learn more about results and reviews. Play the piano in your browser Google apps About Chrome Web Store Developer Dashboard Privacy Policy Terms of Service Help | 2026-01-13T09:29:32 |
https://chromewebstore.google.com/detail/category/detail/volume-master/detail/jetwriter-ai-reply-emails/collection/detail/grammarly-ai-writing-assi/kbfnbcaeplbcioakkpcpgfkobkghlhen | Chrome Web Store Skip to main content Chrome Web Store My extensions & themes Developer Dashboard Give feedback Sign in Discover Extensions Themes Welcome to Chrome Web Store Welcome to the Chrome Web Store Supercharge your browser with extensions and themes for Chrome See collection Favorites of 2025 Discover the standout AI extensions that made our year See collection Every day is Earth Day Plant trees, shop sustainably, and more See collection Adobe Photoshop Easily remove backgrounds, adjust colors and more. Plus, get 6 months free access to Photoshop web. 3.7 600K Users See details The future of writing Elevate your writing and create engaging and high-quality content effortlessly See collection 1 / 5 Top categories Shopping Entertainment Tools Art & Design Accessibility Top charts Trending Kami for Google Chrome™ Education 4.6 Average rating 4.6 out of 5 stars. Learn more about results and reviews. BetterCampus (prev. BetterCanvas) Education 4.9 Average rating 4.9 out of 5 stars. Learn more about results and reviews. Read&Write for Google Chrome™ Accessibility 3.4 Average rating 3.4 out of 5 stars. Learn more about results and reviews. See more Popular Volume Master Accessibility 4.8 Average rating 4.8 out of 5 stars. Learn more about results and reviews. Free VPN for Chrome - VPN Proxy VeePN Workflow & Planning 4.5 Average rating 4.5 out of 5 stars. Learn more about results and reviews. AdBlock — block ads across the web Workflow & Planning 4.5 Average rating 4.5 out of 5 stars. Learn more about results and reviews. See more New and notable Ad Block Wonder Privacy & Security 4.3 Average rating 4.3 out of 5 stars. Learn more about results and reviews. Smart popup blocker Tools 4.6 Average rating 4.6 out of 5 stars. Learn more about results and reviews. Manus AI Browser Operator Tools 4.5 Average rating 4.5 out of 5 stars. Learn more about results and reviews. See more Editors' Picks for you Handpicked by Chrome Editors See collection Extend your browser See more Discover a new level of convenience and customization with side panel extensions Chat with all AI models (Gemini, Claude, DeepSeek…) & AI Agents | AITOPIA 4.9 Average rating 4.9 out of 5 stars. Learn more about results and reviews. AI Agent Marketplace & AI Sidebar with all AI models (Gemini, Claude, DeepSeek & more) and hundreds of AI Agents Adobe Photoshop 3.7 Average rating 3.7 out of 5 stars. Learn more about results and reviews. Easily remove backgrounds, adjust colors and more. Plus, get 6 months free access to Photoshop web. BrowserGPT: ChatGPT Anywhere Powered by GPT 4 4.4 Average rating 4.4 out of 5 stars. Learn more about results and reviews. Write, reword, and translate 8x faster. Reply to emails in a click. Works on Google Docs, Gmail, YouTube, Twitter, Instagram, etc. Sidebar: ChatGPT, Bookmarks, GPT-4o | Meomni 4.8 Average rating 4.8 out of 5 stars. Learn more about results and reviews. Ultimate Sidebar ChatGPT Assistant, Bookmarks with AI, Calendar and Tasks Fleeting Notes 4.6 Average rating 4.6 out of 5 stars. Learn more about results and reviews. Quick notes from the browser to Obsidian Eclipse your screen Dim the lights with our dark mode selections See collection Chrome monthly spotlight Promising extensions to try out Web Highlights: PDF & Web Highlighter + Notes & AI Summary Productivity Highlighter & Annotation Tool for Websites & PDFs with AI Summary - free, easy to use, no sign-up required. Moonlight: AI Colleague for Research Papers Everything you need to read a paper: explanation, summary, translation, chat, and reference search. Reboost - Track Water Intake and Set Reminders Track your water intake and set custom reminders. Stay hydrated, stay on track, and never miss a break! ✨ YouTube Notes to Notion with Udemy, Coursera, BiliBili and more by Snipo Take YouTube notes directly to Notion, generate AI flashcards, capture screenshots, and sync learning courses with Notion Works with Gmail See more Boost your email productivity Boomerang for Gmail 4.2 Average rating 4.2 out of 5 stars. Learn more about results and reviews. Meeting scheduling and email management tool trusted by millions. Schedule meetings, track responses, send later, and more. Checker Plus for Gmail™ 4.7 Average rating 4.7 out of 5 stars. Learn more about results and reviews. Get notifications, read, listen to or delete emails without opening Gmail and easily manage multiple accounts. Email Tracker by Mailtrack® 4.4 Average rating 4.4 out of 5 stars. Learn more about results and reviews. Free, unlimited email tracker for Gmail, trusted by millions. Accurate, reliable, GDPR-compliant, and Google-audited. Streak CRM for Gmail 4.5 Average rating 4.5 out of 5 stars. Learn more about results and reviews. Manage sales and customer relationships directly inside Gmail. GMass: Powerful mail merge for Gmail 4.8 Average rating 4.8 out of 5 stars. Learn more about results and reviews. A powerful mass email and mail merge system for Gmail. Just for fun Bring some joy to your browser See collection Learn a new language See more Study while you browse Google Translate 4.2 Average rating 4.2 out of 5 stars. Learn more about results and reviews. View translations easily as you browse the web. By the Google Translate team. Rememberry - Translate and Memorize with Flashcards 4.6 Average rating 4.6 out of 5 stars. Learn more about results and reviews. Translate words while browsing and turn them into spaced repetition flashcards to build foreign language vocabulary. DeepL: translate and write with AI 4.7 Average rating 4.7 out of 5 stars. Learn more about results and reviews. Translate while you read and write with DeepL Translate, the world’s most accurate translator. Relingo - Master vocabulary while browsing websites and watching YouTube 4.6 Average rating 4.6 out of 5 stars. Learn more about results and reviews. Relingo extract words, full-text immersive translation while browsing. Also supports bilingual subtitles for Youtube, Netflix, etc. Readlang Web Reader 4.3 Average rating 4.3 out of 5 stars. Learn more about results and reviews. Read websites in the language you're learning, translate words you don't know, and we'll create flashcards to help you remember. Game on See more Beat boredom with bite-sized games in your browser BattleTabs 4.7 Average rating 4.7 out of 5 stars. Learn more about results and reviews. Multiplayer Battles in your New Tab Tiny Tycoon 4.7 Average rating 4.7 out of 5 stars. Learn more about results and reviews. Build a tiny tycoon on a tiny planet. Boxel 3D 4.6 Average rating 4.6 out of 5 stars. Learn more about results and reviews. Boxel 3D is a speedrunning game packed with challenging levels, custom skins, online multiplayer, and a creative level editor. Ice Dodo 4.6 Average rating 4.6 out of 5 stars. Learn more about results and reviews. Play 3D game easily by clicking the little icon at the top right corner of your browser. Boxel Golf 4.7 Average rating 4.7 out of 5 stars. Learn more about results and reviews. Boxel Golf is a multiplayer golf game packed with challenging courses, custom hats, and a powerful level builder. Work smarter, not harder with AI Automate tasks and stay focused and organized with AI-powered productivity extensions See collection For music lovers See more Equalizers, radios, playlists, and more Volume Master 4.8 Average rating 4.8 out of 5 stars. Learn more about results and reviews. Up to 600% volume boost Music Mode for YouTube™ 4.5 Average rating 4.5 out of 5 stars. Learn more about results and reviews. Hides the video and thumbnails on YouTube. Blocks the video keeping only the audio on YouTube Music. Smart Mute 4.5 Average rating 4.5 out of 5 stars. Learn more about results and reviews. Listen to audio one tab at a time. Modest Guitar | Columns for Ultimate-Guitar 4.8 Average rating 4.8 out of 5 stars. Learn more about results and reviews. Multiple columns and fullscreen for Ultimate-Guitar tabs Chrome Piano 4.5 Average rating 4.5 out of 5 stars. Learn more about results and reviews. Play the piano in your browser Google apps About Chrome Web Store Developer Dashboard Privacy Policy Terms of Service Help | 2026-01-13T09:29:32 |
http://groovy-lang.org/syntax.html#_numbers | The Apache Groovy programming language - Syntax Socialize Discuss on the mailing-list Groovy on X Groovy on Bluesky Groovy on Mastodon Groovy on LinkedIn Events and conferences Source code on GitHub Report issues in Jira Stack Overflow questions Slack Community You are using an outdated browser. Please upgrade your browser to improve your experience. Apache Groovy™ Learn Documentation Download Support Contribute Ecosystem Blog posts Socialize Table of contents 1. Comments 1.1. Single-line comment 1.2. Multiline comment 1.3. Groovydoc comment 1.4. Shebang line 2. Keywords 3. Identifiers 3.1. Normal identifiers 3.2. Quoted identifiers 4. Strings 4.1. Single-quoted string 4.2. String concatenation 4.3. Triple-single-quoted string 4.3.1. Escaping special characters 4.3.2. Unicode escape sequence 4.4. Double-quoted string 4.4.1. String interpolation 4.4.2. Special case of interpolating closure expressions 4.4.3. Interoperability with Java 4.4.4. GString and String hashCodes 4.5. Triple-double-quoted string 4.6. Slashy string 4.6.1. Special cases 4.7. Dollar slashy string 4.8. String summary table 4.9. Characters 5. Numbers 5.1. Integral literals 5.1.1. Alternative non-base 10 representations Binary literal Octal literal Hexadecimal literal 5.2. Decimal literals 5.3. Underscore in literals 5.4. Number type suffixes 5.5. Math operations 5.5.1. The case of the division operator 5.5.2. The case of the power operator 6. Booleans 7. Lists 8. Arrays 8.1. Java-style array initialization 9. Maps Syntax This chapter covers the syntax of the Groovy programming language. The grammar of the language derives from the Java grammar, but enhances it with specific constructs for Groovy, and allows certain simplifications. 1. Comments 1.1. Single-line comment Single-line comments start with // and can be found at any position in the line. The characters following // , until the end of the line, are considered part of the comment. // a standalone single line comment println "hello" // a comment till the end of the line 1.2. Multiline comment A multiline comment starts with /* and can be found at any position in the line. The characters following /* will be considered part of the comment, including new line characters, up to the first */ closing the comment. Multiline comments can thus be put at the end of a statement, or even inside a statement. /* a standalone multiline comment spanning two lines */ println "hello" /* a multiline comment starting at the end of a statement */ println 1 /* one */ + 2 /* two */ 1.3. Groovydoc comment Similarly to multiline comments, Groovydoc comments are multiline, but start with /** and end with */ . Lines following the first Groovydoc comment line can optionally start with a star * . Those comments are associated with: type definitions (classes, interfaces, enums, annotations), fields and properties definitions methods definitions Although the compiler will not complain about Groovydoc comments not being associated with the above language elements, you should prepend those constructs with the comment right before it. /** * A Class description */ class Person { /** the name of the person */ String name /** * Creates a greeting method for a certain person. * * @param otherPerson the person to greet * @return a greeting message */ String greet(String otherPerson) { "Hello ${otherPerson}" } } Groovydoc follows the same conventions as Java’s own Javadoc. So you’ll be able to use the same tags as with Javadoc. In addition, Groovy supports Runtime Groovydoc since 3.0.0, i.e. Groovydoc can be retained at runtime. Runtime Groovydoc is disabled by default. It can be enabled by adding JVM option -Dgroovy.attach.runtime.groovydoc=true The Runtime Groovydoc starts with /**@ and ends with */ , for example: /**@ * Some class groovydoc for Foo */ class Foo { /**@ * Some method groovydoc for bar */ void bar() { } } assert Foo.class.groovydoc.content.contains('Some class groovydoc for Foo') (1) assert Foo.class.getMethod('bar', new Class[0]).groovydoc.content.contains('Some method groovydoc for bar') (2) 1 Get the runtime groovydoc for class Foo 2 Get the runtime groovydoc for method bar 1.4. Shebang line Beside the single-line comment, there is a special line comment, often called the shebang line understood by UNIX systems which allows scripts to be run directly from the command-line, provided you have installed the Groovy distribution and the groovy command is available on the PATH . #!/usr/bin/env groovy println "Hello from the shebang line" The # character must be the first character of the file. Any indentation would yield a compilation error. 2. Keywords Groovy has the following reserved keywords: Table 1. Reserved Keywords abstract assert break case catch class const continue def default do else enum extends final finally for goto if implements import instanceof interface native new null non-sealed package public protected private return static strictfp super switch synchronized this threadsafe throw throws transient try while Of these, const , goto , strictfp , and threadsafe are not currently in use. The reserved keywords can’t in general be used for variable, field and method names. A trick allows methods to be defined having the same name as a keyword by surrounding the name in quotes as shown in the following example: // reserved keywords can be used for method names if quoted def "abstract"() { true } // when calling such methods, the name must be qualified using "this." this.abstract() Using such names might be confusing and is often best to avoid. The trick is primarily intended to enable certain Java integration scenarios and certain DSL scenarios where having "verbs" and "nouns" with the same name as keywords may be desirable. In addition, Groovy has the following contextual keywords: Table 2. Contextual Keywords as in permits record sealed trait var yields These words are only keywords in certain contexts and can be more freely used in some places, in particular for variables, fields and method names. This extra lenience allows using method or variable names that were not keywords in earlier versions of Groovy or are not keywords in Java. Examples are shown here: // contextual keywords can be used for field and variable names def as = true assert as // contextual keywords can be used for method names def in() { true } // when calling such methods, the name only needs to be qualified using "this." in scenarios which would be ambiguous this.in() Groovy programmers familiar with these contextual keywords may still wish to avoid using those names unless there is a good reason to use such a name. The restrictions on reserved keywords also apply for the primitive types, the boolean literals and the null literal (all of which are discussed later): Table 3. Other reserved words null true false boolean char byte short int long float double While not recommended, the same trick as for reserved keywords can be used: def "null"() { true } // not recommended; potentially confusing assert this.null() // must be qualified Using such words as method names is potentially confusing and is often best to avoid, however, it might be useful for certain kinds of DSLs . 3. Identifiers 3.1. Normal identifiers Identifiers start with a letter, a dollar or an underscore. They cannot start with a number. A letter can be in the following ranges: 'a' to 'z' (lowercase ascii letter) 'A' to 'Z' (uppercase ascii letter) '\u00C0' to '\u00D6' '\u00D8' to '\u00F6' '\u00F8' to '\u00FF' '\u0100' to '\uFFFE' Then following characters can contain letters and numbers. Here are a few examples of valid identifiers (here, variable names): def name def item3 def with_underscore def $dollarStart But the following ones are invalid identifiers: def 3tier def a+b def a#b All keywords are also valid identifiers when following a dot: foo.as foo.assert foo.break foo.case foo.catch 3.2. Quoted identifiers Quoted identifiers appear after the dot of a dotted expression. For instance, the name part of the person.name expression can be quoted with person."name" or person.'name' . This is particularly interesting when certain identifiers contain illegal characters that are forbidden by the Java Language Specification, but which are allowed by Groovy when quoted. For example, characters like a dash, a space, an exclamation mark, etc. def map = [:] map."an identifier with a space and double quotes" = "ALLOWED" map.'with-dash-signs-and-single-quotes' = "ALLOWED" assert map."an identifier with a space and double quotes" == "ALLOWED" assert map.'with-dash-signs-and-single-quotes' == "ALLOWED" As we shall see in the following section on strings , Groovy provides different string literals. All kind of strings are actually allowed after the dot: map.'single quote' map."double quote" map.'''triple single quote''' map."""triple double quote""" map./slashy string/ map.$/dollar slashy string/$ There’s a difference between plain character strings and Groovy’s GStrings (interpolated strings), as in that the latter case, the interpolated values are inserted in the final string for evaluating the whole identifier: def firstname = "Homer" map."Simpson-${firstname}" = "Homer Simpson" assert map.'Simpson-Homer' == "Homer Simpson" 4. Strings Text literals are represented in the form of chain of characters called strings. Groovy lets you instantiate java.lang.String objects, as well as GStrings ( groovy.lang.GString ) which are also called interpolated strings in other programming languages. 4.1. Single-quoted string Single-quoted strings are a series of characters surrounded by single quotes: 'a single-quoted string' Single-quoted strings are plain java.lang.String and don’t support interpolation. 4.2. String concatenation All the Groovy strings can be concatenated with the + operator: assert 'ab' == 'a' + 'b' 4.3. Triple-single-quoted string Triple-single-quoted strings are a series of characters surrounded by triplets of single quotes: '''a triple-single-quoted string''' Triple-single-quoted strings are plain java.lang.String and don’t support interpolation. Triple-single-quoted strings may span multiple lines. The content of the string can cross line boundaries without the need to split the string in several pieces and without concatenation or newline escape characters: def aMultilineString = '''line one line two line three''' If your code is indented, for example in the body of the method of a class, your string will contain the whitespace of the indentation. The Groovy Development Kit contains methods for stripping out the indentation with the String#stripIndent() method, and with the String#stripMargin() method that takes a delimiter character to identify the text to remove from the beginning of a string. When creating a string as follows: def startingAndEndingWithANewline = ''' line one line two line three ''' You will notice that the resulting string contains a newline character as first character. It is possible to strip that character by escaping the newline with a backslash: def strippedFirstNewline = '''\ line one line two line three ''' assert !strippedFirstNewline.startsWith('\n') 4.3.1. Escaping special characters You can escape single quotes with the backslash character to avoid terminating the string literal: 'an escaped single quote: \' needs a backslash' And you can escape the escape character itself with a double backslash: 'an escaped escape character: \\ needs a double backslash' Some special characters also use the backslash as escape character: Escape sequence Character \b backspace \f formfeed \n newline \r carriage return \s single space \t tabulation \\ backslash \' single quote within a single-quoted string (and optional for triple-single-quoted and double-quoted strings) \" double quote within a double-quoted string (and optional for triple-double-quoted and single-quoted strings) We’ll see some more escaping details when it comes to other types of strings discussed later. 4.3.2. Unicode escape sequence For characters that are not present on your keyboard, you can use unicode escape sequences: a backslash, followed by 'u', then 4 hexadecimal digits. For example, the Euro currency symbol can be represented with: 'The Euro currency symbol: \u20AC' 4.4. Double-quoted string Double-quoted strings are a series of characters surrounded by double quotes: "a double-quoted string" Double-quoted strings are plain java.lang.String if there’s no interpolated expression, but are groovy.lang.GString instances if interpolation is present. To escape a double quote, you can use the backslash character: "A double quote: \"". 4.4.1. String interpolation Any Groovy expression can be interpolated in all string literals, apart from single and triple-single-quoted strings. Interpolation is the act of replacing a placeholder in the string with its value upon evaluation of the string. The placeholder expressions are surrounded by ${} . The curly braces may be omitted for unambiguous dotted expressions, i.e. we can use just a $ prefix in those cases. If the GString is ever passed to a method taking a String, the expression value inside the placeholder is evaluated to its string representation (by calling toString() on that expression) and the resulting String is passed to the method. Here, we have a string with a placeholder referencing a local variable: def name = 'Guillaume' // a plain string def greeting = "Hello ${name}" assert greeting.toString() == 'Hello Guillaume' Any Groovy expression is valid, as we can see in this example with an arithmetic expression: def sum = "The sum of 2 and 3 equals ${2 + 3}" assert sum.toString() == 'The sum of 2 and 3 equals 5' Not only are expressions allowed in between the ${} placeholder, but so are statements. However, a statement’s value is just null . So if several statements are inserted in that placeholder, the last one should somehow return a meaningful value to be inserted. For instance, "The sum of 1 and 2 is equal to ${def a = 1; def b = 2; a + b}" is supported and works as expected but a good practice is usually to stick to simple expressions inside GString placeholders. In addition to ${} placeholders, we can also use a lone $ sign prefixing a dotted expression: def person = [name: 'Guillaume', age: 36] assert "$person.name is $person.age years old" == 'Guillaume is 36 years old' But only dotted expressions of the form a.b , a.b.c , etc, are valid. Expressions containing parentheses like method calls, curly braces for closures, dots which aren’t part of a property expression or arithmetic operators would be invalid. Given the following variable definition of a number: def number = 3.14 The following statement will throw a groovy.lang.MissingPropertyException because Groovy believes you’re trying to access the toString property of that number, which doesn’t exist: shouldFail(MissingPropertyException) { println "$number.toString()" } You can think of "$number.toString()" as being interpreted by the parser as "${number.toString}()" . Similarly, if the expression is ambiguous, you need to keep the curly braces: String thing = 'treasure' assert 'The x-coordinate of the treasure is represented by treasure.x' == "The x-coordinate of the $thing is represented by $thing.x" // <= Not allowed: ambiguous!! assert 'The x-coordinate of the treasure is represented by treasure.x' == "The x-coordinate of the $thing is represented by ${thing}.x" // <= Curly braces required If you need to escape the $ or ${} placeholders in a GString so they appear as is without interpolation, you just need to use a \ backslash character to escape the dollar sign: assert '$5' == "\$5" assert '${name}' == "\${name}" 4.4.2. Special case of interpolating closure expressions So far, we’ve seen we could interpolate arbitrary expressions inside the ${} placeholder, but there is a special case and notation for closure expressions. When the placeholder contains an arrow, ${→} , the expression is actually a closure expression — you can think of it as a closure with a dollar prepended in front of it: def sParameterLessClosure = "1 + 2 == ${-> 3}" (1) assert sParameterLessClosure == '1 + 2 == 3' def sOneParamClosure = "1 + 2 == ${ w -> w << 3}" (2) assert sOneParamClosure == '1 + 2 == 3' 1 The closure is a parameterless closure which doesn’t take arguments. 2 Here, the closure takes a single java.io.StringWriter argument, to which you can append content with the << leftShift operator. In either case, both placeholders are embedded closures. In appearance, it looks like a more verbose way of defining expressions to be interpolated, but closures have an interesting advantage over mere expressions: lazy evaluation. Let’s consider the following sample: def number = 1 (1) def eagerGString = "value == ${number}" def lazyGString = "value == ${ -> number }" assert eagerGString == "value == 1" (2) assert lazyGString == "value == 1" (3) number = 2 (4) assert eagerGString == "value == 1" (5) assert lazyGString == "value == 2" (6) 1 We define a number variable containing 1 that we then interpolate within two GStrings, as an expression in eagerGString and as a closure in lazyGString . 2 We expect the resulting string to contain the same string value of 1 for eagerGString . 3 Similarly for lazyGString 4 Then we change the value of the variable to a new number 5 With a plain interpolated expression, the value was actually bound at the time of creation of the GString. 6 But with a closure expression, the closure is called upon each coercion of the GString into String, resulting in an updated string containing the new number value. An embedded closure expression taking more than one parameter will generate an exception at runtime. Only closures with zero or one parameter are allowed. 4.4.3. Interoperability with Java When a method (whether implemented in Java or Groovy) expects a java.lang.String , but we pass a groovy.lang.GString instance, the toString() method of the GString is automatically and transparently called. String takeString(String message) { (4) assert message instanceof String (5) return message } def message = "The message is ${'hello'}" (1) assert message instanceof GString (2) def result = takeString(message) (3) assert result instanceof String assert result == 'The message is hello' 1 We create a GString variable 2 We double-check it’s an instance of the GString 3 We then pass that GString to a method taking a String as parameter 4 The signature of the takeString() method explicitly says its sole parameter is a String 5 We also verify that the parameter is indeed a String and not a GString. 4.4.4. GString and String hashCodes Although interpolated strings can be used in lieu of plain Java strings, they differ with strings in a particular way: their hashCodes are different. Plain Java strings are immutable, whereas the resulting String representation of a GString can vary, depending on its interpolated values. Even for the same resulting string, GStrings and Strings don’t have the same hashCode. assert "one: ${1}".hashCode() != "one: 1".hashCode() GString and Strings having different hashCode values, using GString as Map keys should be avoided, especially if we try to retrieve an associated value with a String instead of a GString. def key = "a" def m = ["${key}": "letter ${key}"] (1) assert m["a"] == null (2) 1 The map is created with an initial pair whose key is a GString 2 When we try to fetch the value with a String key, we will not find it, as Strings and GString have different hashCode values 4.5. Triple-double-quoted string Triple-double-quoted strings behave like double-quoted strings, with the addition that they are multiline, like the triple-single-quoted strings. def name = 'Groovy' def template = """ Dear Mr ${name}, You're the winner of the lottery! Yours sincerly, Dave """ assert template.toString().contains('Groovy') Neither double quotes nor single quotes need be escaped in triple-double-quoted strings. 4.6. Slashy string Beyond the usual quoted strings, Groovy offers slashy strings, which use / as the opening and closing delimiter. Slashy strings are particularly useful for defining regular expressions and patterns, as there is no need to escape backslashes. Example of a slashy string: def fooPattern = /.*foo.*/ assert fooPattern == '.*foo.*' Only forward slashes need to be escaped with a backslash: def escapeSlash = /The character \/ is a forward slash/ assert escapeSlash == 'The character / is a forward slash' Slashy strings are multiline: def multilineSlashy = /one two three/ assert multilineSlashy.contains('\n') Slashy strings can be thought of as just another way to define a GString but with different escaping rules. They hence support interpolation: def color = 'blue' def interpolatedSlashy = /a ${color} car/ assert interpolatedSlashy == 'a blue car' 4.6.1. Special cases An empty slashy string cannot be represented with a double forward slash, as it’s understood by the Groovy parser as a line comment. That’s why the following assert would actually not compile as it would look like a non-terminated statement: assert '' == // As slashy strings were mostly designed to make regexp easier so a few things that are errors in GStrings like $() or $5 will work with slashy strings. Remember that escaping backslashes is not required. An alternative way of thinking of this is that in fact escaping is not supported. The slashy string /\t/ won’t contain a tab but instead a backslash followed by the character 't'. Escaping is only allowed for the slash character, i.e. /\/folder/ will be a slashy string containing '/folder' . A consequence of slash escaping is that a slashy string can’t end with a backslash. Otherwise that will escape the slashy string terminator. You can instead use a special trick, /ends with slash ${'\\'}/ . But best just avoid using a slashy string in such a case. 4.7. Dollar slashy string Dollar slashy strings are multiline GStrings delimited with an opening $/ and a closing /$ . The escaping character is the dollar sign, and it can escape another dollar, or a forward slash. Escaping for the dollar and forward slash characters is only needed where conflicts arise with the special use of those characters. The characters $foo would normally indicate a GString placeholder, so those four characters can be entered into a dollar slashy string by escaping the dollar, i.e. $$foo . Similarly, you will need to escape a dollar slashy closing delimiter if you want it to appear in your string. Here are a few examples: def name = "Guillaume" def date = "April, 1st" def dollarSlashy = $/ Hello $name, today we're ${date}. $ dollar sign $$ escaped dollar sign \ backslash / forward slash $/ escaped forward slash $$$/ escaped opening dollar slashy $/$$ escaped closing dollar slashy /$ assert [ 'Guillaume', 'April, 1st', '$ dollar sign', '$ escaped dollar sign', '\\ backslash', '/ forward slash', '/ escaped forward slash', '$/ escaped opening dollar slashy', '/$ escaped closing dollar slashy' ].every { dollarSlashy.contains(it) } It was created to overcome some of the limitations of the slashy string escaping rules. Use it when its escaping rules suit your string contents (typically if it has some slashes you don’t want to escape). 4.8. String summary table String name String syntax Interpolated Multiline Escape character Single-quoted '…​' \ Triple-single-quoted '''…​''' \ Double-quoted "…​" \ Triple-double-quoted """…​""" \ Slashy /…​/ \ Dollar slashy $/…​/$ $ 4.9. Characters Unlike Java, Groovy doesn’t have an explicit character literal. However, you can be explicit about making a Groovy string an actual character, by three different means: char c1 = 'A' (1) assert c1 instanceof Character def c2 = 'B' as char (2) assert c2 instanceof Character def c3 = (char)'C' (3) assert c3 instanceof Character 1 by being explicit when declaring a variable holding the character by specifying the char type 2 by using type coercion with the as operator 3 by using a cast to char operation The first option 1 is interesting when the character is held in a variable, while the other two ( 2 and 3 ) are more interesting when a char value must be passed as argument of a method call. 5. Numbers Groovy supports different kinds of integral literals and decimal literals, backed by the usual Number types of Java. 5.1. Integral literals The integral literal types are the same as in Java: byte char short int long java.math.BigInteger You can create integral numbers of those types with the following declarations: // primitive types byte b = 1 char c = 2 short s = 3 int i = 4 long l = 5 // infinite precision BigInteger bi = 6 If you use optional typing by using the def keyword, the type of the integral number will vary: it’ll adapt to the capacity of the type that can hold that number. For positive numbers: def a = 1 assert a instanceof Integer // Integer.MAX_VALUE def b = 2147483647 assert b instanceof Integer // Integer.MAX_VALUE + 1 def c = 2147483648 assert c instanceof Long // Long.MAX_VALUE def d = 9223372036854775807 assert d instanceof Long // Long.MAX_VALUE + 1 def e = 9223372036854775808 assert e instanceof BigInteger As well as for negative numbers: def na = -1 assert na instanceof Integer // Integer.MIN_VALUE def nb = -2147483648 assert nb instanceof Integer // Integer.MIN_VALUE - 1 def nc = -2147483649 assert nc instanceof Long // Long.MIN_VALUE def nd = -9223372036854775808 assert nd instanceof Long // Long.MIN_VALUE - 1 def ne = -9223372036854775809 assert ne instanceof BigInteger 5.1.1. Alternative non-base 10 representations Numbers can also be represented in binary, octal, hexadecimal and decimal bases. Binary literal Binary numbers start with a 0b prefix: int xInt = 0b10101111 assert xInt == 175 short xShort = 0b11001001 assert xShort == 201 as short byte xByte = 0b11 assert xByte == 3 as byte long xLong = 0b101101101101 assert xLong == 2925l BigInteger xBigInteger = 0b111100100001 assert xBigInteger == 3873g int xNegativeInt = -0b10101111 assert xNegativeInt == -175 Octal literal Octal numbers are specified in the typical format of 0 followed by octal digits. int xInt = 077 assert xInt == 63 short xShort = 011 assert xShort == 9 as short byte xByte = 032 assert xByte == 26 as byte long xLong = 0246 assert xLong == 166l BigInteger xBigInteger = 01111 assert xBigInteger == 585g int xNegativeInt = -077 assert xNegativeInt == -63 Hexadecimal literal Hexadecimal numbers are specified in the typical format of 0x followed by hex digits. int xInt = 0x77 assert xInt == 119 short xShort = 0xaa assert xShort == 170 as short byte xByte = 0x3a assert xByte == 58 as byte long xLong = 0xffff assert xLong == 65535l BigInteger xBigInteger = 0xaaaa assert xBigInteger == 43690g Double xDouble = new Double('0x1.0p0') assert xDouble == 1.0d int xNegativeInt = -0x77 assert xNegativeInt == -119 5.2. Decimal literals The decimal literal types are the same as in Java: float double java.math.BigDecimal You can create decimal numbers of those types with the following declarations: // primitive types float f = 1.234 double d = 2.345 // infinite precision BigDecimal bd = 3.456 Decimals can use exponents, with the e or E exponent letter, followed by an optional sign, and an integral number representing the exponent: assert 1e3 == 1_000.0 assert 2E4 == 20_000.0 assert 3e+1 == 30.0 assert 4E-2 == 0.04 assert 5e-1 == 0.5 Conveniently for exact decimal number calculations, Groovy chooses java.math.BigDecimal as its decimal number type. In addition, both float and double are supported, but require an explicit type declaration, type coercion or suffix. Even if BigDecimal is the default for decimal numbers, such literals are accepted in methods or closures taking float or double as parameter types. Decimal numbers can’t be represented using a binary, octal or hexadecimal representation. 5.3. Underscore in literals When writing long literal numbers, it’s harder on the eye to figure out how some numbers are grouped together, for example with groups of thousands, of words, etc. By allowing you to place underscore in number literals, it’s easier to spot those groups: long creditCardNumber = 1234_5678_9012_3456L long socialSecurityNumbers = 999_99_9999L double monetaryAmount = 12_345_132.12 long hexBytes = 0xFF_EC_DE_5E long hexWords = 0xFFEC_DE5E long maxLong = 0x7fff_ffff_ffff_ffffL long alsoMaxLong = 9_223_372_036_854_775_807L long bytes = 0b11010010_01101001_10010100_10010010 5.4. Number type suffixes We can force a number (including binary, octals and hexadecimals) to have a specific type by giving a suffix (see table below), either uppercase or lowercase. Type Suffix BigInteger G or g Long L or l Integer I or i BigDecimal G or g Double D or d Float F or f Examples: assert 42I == Integer.valueOf('42') assert 42i == Integer.valueOf('42') // lowercase i more readable assert 123L == Long.valueOf("123") // uppercase L more readable assert 2147483648 == Long.valueOf('2147483648') // Long type used, value too large for an Integer assert 456G == new BigInteger('456') assert 456g == new BigInteger('456') assert 123.45 == new BigDecimal('123.45') // default BigDecimal type used assert .321 == new BigDecimal('.321') assert 1.200065D == Double.valueOf('1.200065') assert 1.234F == Float.valueOf('1.234') assert 1.23E23D == Double.valueOf('1.23E23') assert 0b1111L.class == Long // binary assert 0xFFi.class == Integer // hexadecimal assert 034G.class == BigInteger // octal 5.5. Math operations Although operators are covered in more detail elsewhere, it’s important to discuss the behavior of math operations and what their resulting types are. Division and power binary operations aside (covered below), binary operations between byte , char , short and int result in int binary operations involving long with byte , char , short and int result in long binary operations involving BigInteger and any other integral type result in BigInteger binary operations involving BigDecimal with byte , char , short , int and BigInteger result in BigDecimal binary operations between float , double and BigDecimal result in double binary operations between two BigDecimal result in BigDecimal The following table summarizes those rules: byte char short int long BigInteger float double BigDecimal byte int int int int long BigInteger double double BigDecimal char int int int long BigInteger double double BigDecimal short int int long BigInteger double double BigDecimal int int long BigInteger double double BigDecimal long long BigInteger double double BigDecimal BigInteger BigInteger double double BigDecimal float double double double double double double BigDecimal BigDecimal Thanks to Groovy’s operator overloading, the usual arithmetic operators work as well with BigInteger and BigDecimal , unlike in Java where you have to use explicit methods for operating on those numbers. 5.5.1. The case of the division operator The division operators / (and /= for division and assignment) produce a double result if either operand is a float or double , and a BigDecimal result otherwise (when both operands are any combination of an integral type short , char , byte , int , long , BigInteger or BigDecimal ). BigDecimal division is performed with the divide() method if the division is exact (i.e. yielding a result that can be represented within the bounds of the same precision and scale), or using a MathContext with a precision of the maximum of the two operands' precision plus an extra precision of 10, and a scale of the maximum of 10 and the maximum of the operands' scale. For integer division like in Java, you should use the intdiv() method, as Groovy doesn’t provide a dedicated integer division operator symbol. 5.5.2. The case of the power operator The power operation is represented by the ** operator, with two parameters: the base and the exponent. The result of the power operation depends on its operands, and the result of the operation (in particular if the result can be represented as an integral value). The following rules are used by Groovy’s power operation to determine the resulting type: If the exponent is a decimal value if the result can be represented as an Integer , then return an Integer else if the result can be represented as a Long , then return a Long otherwise return a Double If the exponent is an integral value if the exponent is strictly negative, then return an Integer , Long or Double if the result value fits in that type if the exponent is positive or zero if the base is a BigDecimal , then return a BigDecimal result value if the base is a BigInteger , then return a BigInteger result value if the base is an Integer , then return an Integer if the result value fits in it, otherwise a BigInteger if the base is a Long , then return a Long if the result value fits in it, otherwise a BigInteger We can illustrate those rules with a few examples: // base and exponent are ints and the result can be represented by an Integer assert 2 ** 3 instanceof Integer // 8 assert 10 ** 9 instanceof Integer // 1_000_000_000 // the base is a long, so fit the result in a Long // (although it could have fit in an Integer) assert 5L ** 2 instanceof Long // 25 // the result can't be represented as an Integer or Long, so return a BigInteger assert 100 ** 10 instanceof BigInteger // 10e20 assert 1234 ** 123 instanceof BigInteger // 170515806212727042875... // the base is a BigDecimal and the exponent a negative int // but the result can be represented as an Integer assert 0.5 ** -2 instanceof Integer // 4 // the base is an int, and the exponent a negative float // but again, the result can be represented as an Integer assert 1 ** -0.3f instanceof Integer // 1 // the base is an int, and the exponent a negative int // but the result will be calculated as a Double // (both base and exponent are actually converted to doubles) assert 10 ** -1 instanceof Double // 0.1 // the base is a BigDecimal, and the exponent is an int, so return a BigDecimal assert 1.2 ** 10 instanceof BigDecimal // 6.1917364224 // the base is a float or double, and the exponent is an int // but the result can only be represented as a Double value assert 3.4f ** 5 instanceof Double // 454.35430372146965 assert 5.6d ** 2 instanceof Double // 31.359999999999996 // the exponent is a decimal value // and the result can only be represented as a Double value assert 7.8 ** 1.9 instanceof Double // 49.542708423868476 assert 2 ** 0.1f instanceof Double // 1.0717734636432956 6. Booleans Boolean is a special data type that is used to represent truth values: true and false . Use this data type for simple flags that track true/false conditions . Boolean values can be stored in variables, assigned into fields, just like any other data type: def myBooleanVariable = true boolean untypedBooleanVar = false booleanField = true true and false are the only two primitive boolean values. But more complex boolean expressions can be represented using logical operators . In addition, Groovy has special rules (often referred to as Groovy Truth ) for coercing non-boolean objects to a boolean value. 7. Lists Groovy uses a comma-separated list of values, surrounded by square brackets, to denote lists. Groovy lists are plain JDK java.util.List , as Groovy doesn’t define its own collection classes. The concrete list implementation used when defining list literals are java.util.ArrayList by default, unless you decide to specify otherwise, as we shall see later on. def numbers = [1, 2, 3] (1) assert numbers instanceof List (2) assert numbers.size() == 3 (3) 1 We define a list numbers delimited by commas and surrounded by square brackets, and we assign that list into a variable 2 The list is an instance of Java’s java.util.List interface 3 The size of the list can be queried with the size() method, and shows our list contains 3 elements In the above example, we used a homogeneous list, but you can also create lists containing values of heterogeneous types: def heterogeneous = [1, "a", true] (1) 1 Our list here contains a number, a string and a boolean value We mentioned that by default, list literals are actually instances of java.util.ArrayList , but it is possible to use a different backing type for our lists, thanks to using type coercion with the as operator, or with explicit type declaration for your variables: def arrayList = [1, 2, 3] assert arrayList instanceof java.util.ArrayList def linkedList = [2, 3, 4] as LinkedList (1) assert linkedList instanceof java.util.LinkedList LinkedList otherLinked = [3, 4, 5] (2) assert otherLinked instanceof java.util.LinkedList 1 We use coercion with the as operator to explicitly request a java.util.LinkedList implementation 2 We can say that the variable holding the list literal is of type java.util.LinkedList You can access elements of the list with the [] subscript operator (both for reading and setting values) with positive indices or negative indices to access elements from the end of the list, as well as with ranges, and use the << leftShift operator to append elements to a list: def letters = ['a', 'b', 'c', 'd'] assert letters[0] == 'a' (1) assert letters[1] == 'b' assert letters[-1] == 'd' (2) assert letters[-2] == 'c' letters[2] = 'C' (3) assert letters[2] == 'C' letters << 'e' (4) assert letters[ 4] == 'e' assert letters[-1] == 'e' assert letters[1, 3] == ['b', 'd'] (5) assert letters[2..4] == ['C', 'd', 'e'] (6) 1 Access the first element of the list (zero-based counting) 2 Access the last element of the list with a negative index: -1 is the first element from the end of the list 3 Use an assignment to set a new value for the third element of the list 4 Use the << leftShift operator to append an element at the end of the list 5 Access two elements at once, returning a new list containing those two elements 6 Use a range to access a range of values from the list, from a start to an end element position As lists can be heterogeneous in nature, lists can also contain other lists to create multidimensional lists: def multi = [[0, 1], [2, 3]] (1) assert multi[1][0] == 2 (2) 1 Define a list of numbers 2 Access the second element of the top-most list, and the first element of the inner list 8. Arrays Groovy reuses the list notation for arrays, but to make such literals arrays, you need to explicitly define the type of the array through coercion or type declaration. String[] arrStr = ['Ananas', 'Banana', 'Kiwi'] (1) assert arrStr instanceof String[] (2) assert !(arrStr instanceof List) def numArr = [1, 2, 3] as int[] (3) assert numArr instanceof int[] (4) assert numArr.size() == 3 1 Define an array of strings using explicit variable type declaration 2 Assert that we created an array of strings 3 Create an array of ints with the as operator 4 Assert that we created an array of primitive ints You can also create multi-dimensional arrays: def matrix3 = new Integer[3][3] (1) assert matrix3.size() == 3 Integer[][] matrix2 (2) matrix2 = [[1, 2], [3, 4]] assert matrix2 instanceof Integer[][] 1 You can define the bounds of a new array 2 Or declare an array without specifying its bounds Access to elements of an array follows the same notation as for lists: String[] names = ['Cédric', 'Guillaume', 'Jochen', 'Paul'] assert names[0] == 'Cédric' (1) names[2] = 'Blackdrag' (2) assert names[2] == 'Blackdrag' 1 Retrieve the first element of the array 2 Set the value of the third element of the array to a new value 8.1. Java-style array initialization Groovy has always supported literal list/array definitions using square brackets and has avoided Java-style curly braces so as not to conflict with closure definitions. In the case where the curly braces come immediately after an array type declaration however, there is no ambiguity with closure definitions, so Groovy 3 and above support that variant of the Java array initialization expression. Examples: def primes = new int[] {2, 3, 5, 7, 11} assert primes.size() == 5 && primes.sum() == 28 assert primes.class.name == '[I' def pets = new String[] {'cat', 'dog'} assert pets.size() == 2 && pets.sum() == 'catdog' assert pets.class.name == '[Ljava.lang.String;' // traditional Groovy alternative still supported String[] groovyBooks = [ 'Groovy in Action', 'Making Java Groovy' ] assert groovyBooks.every{ it.contains('Groovy') } 9. Maps Sometimes called dictionaries or associative arrays in other languages, Groovy features maps. Maps associate keys to values, separating keys and values with colons, and each key/value pairs with commas, and the whole keys and values surrounded by square brackets. def colors = [red: '#FF0000', green: '#00FF00', blue: '#0000FF'] (1) assert colors['red'] == '#FF0000' (2) assert colors.green == '#00FF00' (3) colors['pink'] = '#FF00FF' (4) colors.yellow = '#FFFF00' (5) assert colors.pink == '#FF00FF' assert colors['yellow'] == '#FFFF00' assert colors instanceof java.util.LinkedHashMap 1 We define a map of string color names, associated with their hexadecimal-coded html colors 2 We use the subscript notation to check the content associated with the red key 3 We can also use the property notation to assert the color green’s hexadecimal representation 4 Similarly, we can use the subscript notation to add a new key/value pair 5 Or the property notation, to add the yellow color When using names for the keys, we actually define string keys in the map. Groovy creates maps that are actually instances of java.util.LinkedHashMap . If you try to access a key which is not present in the map: assert colors.unknown == null def emptyMap = [:] assert emptyMap.anyKey == null You will retrieve a null result. In the examples above, we used string keys, but you can also use values of other types as keys: def numbers = [1: 'one', 2: 'two'] assert numbers[1] == 'one' Here, we used numbers as keys, as numbers can unambiguously be recognized as numbers, so Groovy will not create a string key like in our previous examples. But consider the case you want to pass a variable in lieu of the key, to have the value of that variable become the key: def key = 'name' def person = [key: 'Guillaume'] (1) assert !person.containsKey('name') (2) assert person.containsKey('key') (3) 1 The key associated with the 'Guillaume' name will actually be the "key" string, not the value associated with the key variable 2 The map doesn’t contain the 'name' key 3 Instead, the map contains a 'key' key You can also pass quoted strings as well as keys: ["name": "Guillaume"]. This is mandatory if your key string isn’t a valid identifier, for example if you wanted to create a string key containing a dash like in: ["street-name": "Main street"]. When you need to pass variable values as keys in your map definitions, you must surround the variable or expression with parentheses: person = [(key): 'Guillaume'] (1) assert person.containsKey('name') (2) assert !person.containsKey('key') (3) 1 This time, we surround the key variable with parentheses, to instruct the parser we are passing a variable rather than defining a string key 2 The map does contain the name key 3 But the map doesn’t contain the key key as before Groovy Learn Documentation Download Support Contribute Ecosystem Blog posts About Source code Security Books Thanks Sponsorship FAQ Search Socialize Discuss on the mailing-list Groovy on X Groovy on Bluesky Groovy on Mastodon Groovy on LinkedIn Events and conferences Source code on GitHub Report issues in Jira Stack Overflow questions Slack Community The Groovy programming language is supported by the Apache Software Foundation and the Groovy community. Apache, Apache Groovy, Groovy, and the ASF logo are either registered trademarks or trademarks of The Apache Software Foundation. © 2003-2025 the Apache Groovy project — Groovy is Open Source: license , privacy policy . | 2026-01-13T09:29:32 |
https://www.chinadaily.com.cn/china/211flash | China Photos - Chinadaily.com.cn Search HOME CHINA WORLD BUSINESS LIFESTYLE CULTURE TRAVEL VIDEO SPORTS OPINION REGIONAL NEWSPAPER MOBILE Global Edition ASIA 中文 双语 Français HOME CHINA WORLD BUSINESS LIFESTYLE CULTURE TRAVEL VIDEO SPORTS OPINION REGIONAL NEWSPAPER China Daily PDF China Daily E-paper MOBILE Home / China / China Photos Home / China / China Photos Local farmers combat desertification in Moyu county of Xinjiang China tips scales toward healthier living trends Guangzhou's bald cypress trees turn red after cold snap University of Macao celebrates 45th anniversary Local farmers combat desertification in Moyu county of Xinjiang China tips scales toward healthier living trends Guangzhou's bald cypress trees turn red after cold snap University of Macao celebrates 45th anniversary Night view of Central Street in Harbin N China's Hohhot launches winter amusement programs to boost local economy Cornell students explore China's agricultural development Salute to everyday heroes Hunan students craft opera headpieces from recycled materials Xizang nursing home celebrates seniors on quake anniversary Century-old tunnel named after Taiwan's first governor reopens, revives historical memories Ten photos from across China: Jan 2 - 8 Chongqing's air-raid shelter-turned-bookstore becomes tourism touchstone Tsakhor village prepares for Losar New Year Global mayors learn to carve ice in Harbin Bringing care from afar Cold front coats Guizhou mountains in rime Tianmen grand bridge under construction in Guizhou International mayors attend ice and snow expo in Harbin 1 2 3 4 5 6 7 8 9 10 Next >>| 1/661 Next Top BACK TO THE TOP English 中文 HOME CHINA WORLD BUSINESS LIFESTYLE CULTURE TRAVEL VIDEO SPORTS OPINION REGIONAL NEWSPAPER China Daily PDF China Daily E-paper MOBILE Copyright 1994 - . All rights reserved. The content (including but not limited to text, photo, multimedia information, etc) published in this site belongs to China Daily Information Co (CDIC). Without written authorization from CDIC, such content shall not be republished or used in any form. Note: Browsers with 1024*768 or higher resolution are suggested for this site. License for publishing multimedia online 0108263 Registration Number: 130349 About China Daily Advertise on Site Contact Us Job Offer Expat Employment FOLLOW US Copyright 1994 - . All rights reserved. The content (including but not limited to text, photo, multimedia information, etc) published in this site belongs to China Daily Information Co (CDIC). Without written authorization from CDIC, such content shall not be republished or used in any form. --> | 2026-01-13T09:29:32 |
http://groovy-lang.org/syntax.html#_groovydoc_comment | The Apache Groovy programming language - Syntax Socialize Discuss on the mailing-list Groovy on X Groovy on Bluesky Groovy on Mastodon Groovy on LinkedIn Events and conferences Source code on GitHub Report issues in Jira Stack Overflow questions Slack Community You are using an outdated browser. Please upgrade your browser to improve your experience. Apache Groovy™ Learn Documentation Download Support Contribute Ecosystem Blog posts Socialize Table of contents 1. Comments 1.1. Single-line comment 1.2. Multiline comment 1.3. Groovydoc comment 1.4. Shebang line 2. Keywords 3. Identifiers 3.1. Normal identifiers 3.2. Quoted identifiers 4. Strings 4.1. Single-quoted string 4.2. String concatenation 4.3. Triple-single-quoted string 4.3.1. Escaping special characters 4.3.2. Unicode escape sequence 4.4. Double-quoted string 4.4.1. String interpolation 4.4.2. Special case of interpolating closure expressions 4.4.3. Interoperability with Java 4.4.4. GString and String hashCodes 4.5. Triple-double-quoted string 4.6. Slashy string 4.6.1. Special cases 4.7. Dollar slashy string 4.8. String summary table 4.9. Characters 5. Numbers 5.1. Integral literals 5.1.1. Alternative non-base 10 representations Binary literal Octal literal Hexadecimal literal 5.2. Decimal literals 5.3. Underscore in literals 5.4. Number type suffixes 5.5. Math operations 5.5.1. The case of the division operator 5.5.2. The case of the power operator 6. Booleans 7. Lists 8. Arrays 8.1. Java-style array initialization 9. Maps Syntax This chapter covers the syntax of the Groovy programming language. The grammar of the language derives from the Java grammar, but enhances it with specific constructs for Groovy, and allows certain simplifications. 1. Comments 1.1. Single-line comment Single-line comments start with // and can be found at any position in the line. The characters following // , until the end of the line, are considered part of the comment. // a standalone single line comment println "hello" // a comment till the end of the line 1.2. Multiline comment A multiline comment starts with /* and can be found at any position in the line. The characters following /* will be considered part of the comment, including new line characters, up to the first */ closing the comment. Multiline comments can thus be put at the end of a statement, or even inside a statement. /* a standalone multiline comment spanning two lines */ println "hello" /* a multiline comment starting at the end of a statement */ println 1 /* one */ + 2 /* two */ 1.3. Groovydoc comment Similarly to multiline comments, Groovydoc comments are multiline, but start with /** and end with */ . Lines following the first Groovydoc comment line can optionally start with a star * . Those comments are associated with: type definitions (classes, interfaces, enums, annotations), fields and properties definitions methods definitions Although the compiler will not complain about Groovydoc comments not being associated with the above language elements, you should prepend those constructs with the comment right before it. /** * A Class description */ class Person { /** the name of the person */ String name /** * Creates a greeting method for a certain person. * * @param otherPerson the person to greet * @return a greeting message */ String greet(String otherPerson) { "Hello ${otherPerson}" } } Groovydoc follows the same conventions as Java’s own Javadoc. So you’ll be able to use the same tags as with Javadoc. In addition, Groovy supports Runtime Groovydoc since 3.0.0, i.e. Groovydoc can be retained at runtime. Runtime Groovydoc is disabled by default. It can be enabled by adding JVM option -Dgroovy.attach.runtime.groovydoc=true The Runtime Groovydoc starts with /**@ and ends with */ , for example: /**@ * Some class groovydoc for Foo */ class Foo { /**@ * Some method groovydoc for bar */ void bar() { } } assert Foo.class.groovydoc.content.contains('Some class groovydoc for Foo') (1) assert Foo.class.getMethod('bar', new Class[0]).groovydoc.content.contains('Some method groovydoc for bar') (2) 1 Get the runtime groovydoc for class Foo 2 Get the runtime groovydoc for method bar 1.4. Shebang line Beside the single-line comment, there is a special line comment, often called the shebang line understood by UNIX systems which allows scripts to be run directly from the command-line, provided you have installed the Groovy distribution and the groovy command is available on the PATH . #!/usr/bin/env groovy println "Hello from the shebang line" The # character must be the first character of the file. Any indentation would yield a compilation error. 2. Keywords Groovy has the following reserved keywords: Table 1. Reserved Keywords abstract assert break case catch class const continue def default do else enum extends final finally for goto if implements import instanceof interface native new null non-sealed package public protected private return static strictfp super switch synchronized this threadsafe throw throws transient try while Of these, const , goto , strictfp , and threadsafe are not currently in use. The reserved keywords can’t in general be used for variable, field and method names. A trick allows methods to be defined having the same name as a keyword by surrounding the name in quotes as shown in the following example: // reserved keywords can be used for method names if quoted def "abstract"() { true } // when calling such methods, the name must be qualified using "this." this.abstract() Using such names might be confusing and is often best to avoid. The trick is primarily intended to enable certain Java integration scenarios and certain DSL scenarios where having "verbs" and "nouns" with the same name as keywords may be desirable. In addition, Groovy has the following contextual keywords: Table 2. Contextual Keywords as in permits record sealed trait var yields These words are only keywords in certain contexts and can be more freely used in some places, in particular for variables, fields and method names. This extra lenience allows using method or variable names that were not keywords in earlier versions of Groovy or are not keywords in Java. Examples are shown here: // contextual keywords can be used for field and variable names def as = true assert as // contextual keywords can be used for method names def in() { true } // when calling such methods, the name only needs to be qualified using "this." in scenarios which would be ambiguous this.in() Groovy programmers familiar with these contextual keywords may still wish to avoid using those names unless there is a good reason to use such a name. The restrictions on reserved keywords also apply for the primitive types, the boolean literals and the null literal (all of which are discussed later): Table 3. Other reserved words null true false boolean char byte short int long float double While not recommended, the same trick as for reserved keywords can be used: def "null"() { true } // not recommended; potentially confusing assert this.null() // must be qualified Using such words as method names is potentially confusing and is often best to avoid, however, it might be useful for certain kinds of DSLs . 3. Identifiers 3.1. Normal identifiers Identifiers start with a letter, a dollar or an underscore. They cannot start with a number. A letter can be in the following ranges: 'a' to 'z' (lowercase ascii letter) 'A' to 'Z' (uppercase ascii letter) '\u00C0' to '\u00D6' '\u00D8' to '\u00F6' '\u00F8' to '\u00FF' '\u0100' to '\uFFFE' Then following characters can contain letters and numbers. Here are a few examples of valid identifiers (here, variable names): def name def item3 def with_underscore def $dollarStart But the following ones are invalid identifiers: def 3tier def a+b def a#b All keywords are also valid identifiers when following a dot: foo.as foo.assert foo.break foo.case foo.catch 3.2. Quoted identifiers Quoted identifiers appear after the dot of a dotted expression. For instance, the name part of the person.name expression can be quoted with person."name" or person.'name' . This is particularly interesting when certain identifiers contain illegal characters that are forbidden by the Java Language Specification, but which are allowed by Groovy when quoted. For example, characters like a dash, a space, an exclamation mark, etc. def map = [:] map."an identifier with a space and double quotes" = "ALLOWED" map.'with-dash-signs-and-single-quotes' = "ALLOWED" assert map."an identifier with a space and double quotes" == "ALLOWED" assert map.'with-dash-signs-and-single-quotes' == "ALLOWED" As we shall see in the following section on strings , Groovy provides different string literals. All kind of strings are actually allowed after the dot: map.'single quote' map."double quote" map.'''triple single quote''' map."""triple double quote""" map./slashy string/ map.$/dollar slashy string/$ There’s a difference between plain character strings and Groovy’s GStrings (interpolated strings), as in that the latter case, the interpolated values are inserted in the final string for evaluating the whole identifier: def firstname = "Homer" map."Simpson-${firstname}" = "Homer Simpson" assert map.'Simpson-Homer' == "Homer Simpson" 4. Strings Text literals are represented in the form of chain of characters called strings. Groovy lets you instantiate java.lang.String objects, as well as GStrings ( groovy.lang.GString ) which are also called interpolated strings in other programming languages. 4.1. Single-quoted string Single-quoted strings are a series of characters surrounded by single quotes: 'a single-quoted string' Single-quoted strings are plain java.lang.String and don’t support interpolation. 4.2. String concatenation All the Groovy strings can be concatenated with the + operator: assert 'ab' == 'a' + 'b' 4.3. Triple-single-quoted string Triple-single-quoted strings are a series of characters surrounded by triplets of single quotes: '''a triple-single-quoted string''' Triple-single-quoted strings are plain java.lang.String and don’t support interpolation. Triple-single-quoted strings may span multiple lines. The content of the string can cross line boundaries without the need to split the string in several pieces and without concatenation or newline escape characters: def aMultilineString = '''line one line two line three''' If your code is indented, for example in the body of the method of a class, your string will contain the whitespace of the indentation. The Groovy Development Kit contains methods for stripping out the indentation with the String#stripIndent() method, and with the String#stripMargin() method that takes a delimiter character to identify the text to remove from the beginning of a string. When creating a string as follows: def startingAndEndingWithANewline = ''' line one line two line three ''' You will notice that the resulting string contains a newline character as first character. It is possible to strip that character by escaping the newline with a backslash: def strippedFirstNewline = '''\ line one line two line three ''' assert !strippedFirstNewline.startsWith('\n') 4.3.1. Escaping special characters You can escape single quotes with the backslash character to avoid terminating the string literal: 'an escaped single quote: \' needs a backslash' And you can escape the escape character itself with a double backslash: 'an escaped escape character: \\ needs a double backslash' Some special characters also use the backslash as escape character: Escape sequence Character \b backspace \f formfeed \n newline \r carriage return \s single space \t tabulation \\ backslash \' single quote within a single-quoted string (and optional for triple-single-quoted and double-quoted strings) \" double quote within a double-quoted string (and optional for triple-double-quoted and single-quoted strings) We’ll see some more escaping details when it comes to other types of strings discussed later. 4.3.2. Unicode escape sequence For characters that are not present on your keyboard, you can use unicode escape sequences: a backslash, followed by 'u', then 4 hexadecimal digits. For example, the Euro currency symbol can be represented with: 'The Euro currency symbol: \u20AC' 4.4. Double-quoted string Double-quoted strings are a series of characters surrounded by double quotes: "a double-quoted string" Double-quoted strings are plain java.lang.String if there’s no interpolated expression, but are groovy.lang.GString instances if interpolation is present. To escape a double quote, you can use the backslash character: "A double quote: \"". 4.4.1. String interpolation Any Groovy expression can be interpolated in all string literals, apart from single and triple-single-quoted strings. Interpolation is the act of replacing a placeholder in the string with its value upon evaluation of the string. The placeholder expressions are surrounded by ${} . The curly braces may be omitted for unambiguous dotted expressions, i.e. we can use just a $ prefix in those cases. If the GString is ever passed to a method taking a String, the expression value inside the placeholder is evaluated to its string representation (by calling toString() on that expression) and the resulting String is passed to the method. Here, we have a string with a placeholder referencing a local variable: def name = 'Guillaume' // a plain string def greeting = "Hello ${name}" assert greeting.toString() == 'Hello Guillaume' Any Groovy expression is valid, as we can see in this example with an arithmetic expression: def sum = "The sum of 2 and 3 equals ${2 + 3}" assert sum.toString() == 'The sum of 2 and 3 equals 5' Not only are expressions allowed in between the ${} placeholder, but so are statements. However, a statement’s value is just null . So if several statements are inserted in that placeholder, the last one should somehow return a meaningful value to be inserted. For instance, "The sum of 1 and 2 is equal to ${def a = 1; def b = 2; a + b}" is supported and works as expected but a good practice is usually to stick to simple expressions inside GString placeholders. In addition to ${} placeholders, we can also use a lone $ sign prefixing a dotted expression: def person = [name: 'Guillaume', age: 36] assert "$person.name is $person.age years old" == 'Guillaume is 36 years old' But only dotted expressions of the form a.b , a.b.c , etc, are valid. Expressions containing parentheses like method calls, curly braces for closures, dots which aren’t part of a property expression or arithmetic operators would be invalid. Given the following variable definition of a number: def number = 3.14 The following statement will throw a groovy.lang.MissingPropertyException because Groovy believes you’re trying to access the toString property of that number, which doesn’t exist: shouldFail(MissingPropertyException) { println "$number.toString()" } You can think of "$number.toString()" as being interpreted by the parser as "${number.toString}()" . Similarly, if the expression is ambiguous, you need to keep the curly braces: String thing = 'treasure' assert 'The x-coordinate of the treasure is represented by treasure.x' == "The x-coordinate of the $thing is represented by $thing.x" // <= Not allowed: ambiguous!! assert 'The x-coordinate of the treasure is represented by treasure.x' == "The x-coordinate of the $thing is represented by ${thing}.x" // <= Curly braces required If you need to escape the $ or ${} placeholders in a GString so they appear as is without interpolation, you just need to use a \ backslash character to escape the dollar sign: assert '$5' == "\$5" assert '${name}' == "\${name}" 4.4.2. Special case of interpolating closure expressions So far, we’ve seen we could interpolate arbitrary expressions inside the ${} placeholder, but there is a special case and notation for closure expressions. When the placeholder contains an arrow, ${→} , the expression is actually a closure expression — you can think of it as a closure with a dollar prepended in front of it: def sParameterLessClosure = "1 + 2 == ${-> 3}" (1) assert sParameterLessClosure == '1 + 2 == 3' def sOneParamClosure = "1 + 2 == ${ w -> w << 3}" (2) assert sOneParamClosure == '1 + 2 == 3' 1 The closure is a parameterless closure which doesn’t take arguments. 2 Here, the closure takes a single java.io.StringWriter argument, to which you can append content with the << leftShift operator. In either case, both placeholders are embedded closures. In appearance, it looks like a more verbose way of defining expressions to be interpolated, but closures have an interesting advantage over mere expressions: lazy evaluation. Let’s consider the following sample: def number = 1 (1) def eagerGString = "value == ${number}" def lazyGString = "value == ${ -> number }" assert eagerGString == "value == 1" (2) assert lazyGString == "value == 1" (3) number = 2 (4) assert eagerGString == "value == 1" (5) assert lazyGString == "value == 2" (6) 1 We define a number variable containing 1 that we then interpolate within two GStrings, as an expression in eagerGString and as a closure in lazyGString . 2 We expect the resulting string to contain the same string value of 1 for eagerGString . 3 Similarly for lazyGString 4 Then we change the value of the variable to a new number 5 With a plain interpolated expression, the value was actually bound at the time of creation of the GString. 6 But with a closure expression, the closure is called upon each coercion of the GString into String, resulting in an updated string containing the new number value. An embedded closure expression taking more than one parameter will generate an exception at runtime. Only closures with zero or one parameter are allowed. 4.4.3. Interoperability with Java When a method (whether implemented in Java or Groovy) expects a java.lang.String , but we pass a groovy.lang.GString instance, the toString() method of the GString is automatically and transparently called. String takeString(String message) { (4) assert message instanceof String (5) return message } def message = "The message is ${'hello'}" (1) assert message instanceof GString (2) def result = takeString(message) (3) assert result instanceof String assert result == 'The message is hello' 1 We create a GString variable 2 We double-check it’s an instance of the GString 3 We then pass that GString to a method taking a String as parameter 4 The signature of the takeString() method explicitly says its sole parameter is a String 5 We also verify that the parameter is indeed a String and not a GString. 4.4.4. GString and String hashCodes Although interpolated strings can be used in lieu of plain Java strings, they differ with strings in a particular way: their hashCodes are different. Plain Java strings are immutable, whereas the resulting String representation of a GString can vary, depending on its interpolated values. Even for the same resulting string, GStrings and Strings don’t have the same hashCode. assert "one: ${1}".hashCode() != "one: 1".hashCode() GString and Strings having different hashCode values, using GString as Map keys should be avoided, especially if we try to retrieve an associated value with a String instead of a GString. def key = "a" def m = ["${key}": "letter ${key}"] (1) assert m["a"] == null (2) 1 The map is created with an initial pair whose key is a GString 2 When we try to fetch the value with a String key, we will not find it, as Strings and GString have different hashCode values 4.5. Triple-double-quoted string Triple-double-quoted strings behave like double-quoted strings, with the addition that they are multiline, like the triple-single-quoted strings. def name = 'Groovy' def template = """ Dear Mr ${name}, You're the winner of the lottery! Yours sincerly, Dave """ assert template.toString().contains('Groovy') Neither double quotes nor single quotes need be escaped in triple-double-quoted strings. 4.6. Slashy string Beyond the usual quoted strings, Groovy offers slashy strings, which use / as the opening and closing delimiter. Slashy strings are particularly useful for defining regular expressions and patterns, as there is no need to escape backslashes. Example of a slashy string: def fooPattern = /.*foo.*/ assert fooPattern == '.*foo.*' Only forward slashes need to be escaped with a backslash: def escapeSlash = /The character \/ is a forward slash/ assert escapeSlash == 'The character / is a forward slash' Slashy strings are multiline: def multilineSlashy = /one two three/ assert multilineSlashy.contains('\n') Slashy strings can be thought of as just another way to define a GString but with different escaping rules. They hence support interpolation: def color = 'blue' def interpolatedSlashy = /a ${color} car/ assert interpolatedSlashy == 'a blue car' 4.6.1. Special cases An empty slashy string cannot be represented with a double forward slash, as it’s understood by the Groovy parser as a line comment. That’s why the following assert would actually not compile as it would look like a non-terminated statement: assert '' == // As slashy strings were mostly designed to make regexp easier so a few things that are errors in GStrings like $() or $5 will work with slashy strings. Remember that escaping backslashes is not required. An alternative way of thinking of this is that in fact escaping is not supported. The slashy string /\t/ won’t contain a tab but instead a backslash followed by the character 't'. Escaping is only allowed for the slash character, i.e. /\/folder/ will be a slashy string containing '/folder' . A consequence of slash escaping is that a slashy string can’t end with a backslash. Otherwise that will escape the slashy string terminator. You can instead use a special trick, /ends with slash ${'\\'}/ . But best just avoid using a slashy string in such a case. 4.7. Dollar slashy string Dollar slashy strings are multiline GStrings delimited with an opening $/ and a closing /$ . The escaping character is the dollar sign, and it can escape another dollar, or a forward slash. Escaping for the dollar and forward slash characters is only needed where conflicts arise with the special use of those characters. The characters $foo would normally indicate a GString placeholder, so those four characters can be entered into a dollar slashy string by escaping the dollar, i.e. $$foo . Similarly, you will need to escape a dollar slashy closing delimiter if you want it to appear in your string. Here are a few examples: def name = "Guillaume" def date = "April, 1st" def dollarSlashy = $/ Hello $name, today we're ${date}. $ dollar sign $$ escaped dollar sign \ backslash / forward slash $/ escaped forward slash $$$/ escaped opening dollar slashy $/$$ escaped closing dollar slashy /$ assert [ 'Guillaume', 'April, 1st', '$ dollar sign', '$ escaped dollar sign', '\\ backslash', '/ forward slash', '/ escaped forward slash', '$/ escaped opening dollar slashy', '/$ escaped closing dollar slashy' ].every { dollarSlashy.contains(it) } It was created to overcome some of the limitations of the slashy string escaping rules. Use it when its escaping rules suit your string contents (typically if it has some slashes you don’t want to escape). 4.8. String summary table String name String syntax Interpolated Multiline Escape character Single-quoted '…​' \ Triple-single-quoted '''…​''' \ Double-quoted "…​" \ Triple-double-quoted """…​""" \ Slashy /…​/ \ Dollar slashy $/…​/$ $ 4.9. Characters Unlike Java, Groovy doesn’t have an explicit character literal. However, you can be explicit about making a Groovy string an actual character, by three different means: char c1 = 'A' (1) assert c1 instanceof Character def c2 = 'B' as char (2) assert c2 instanceof Character def c3 = (char)'C' (3) assert c3 instanceof Character 1 by being explicit when declaring a variable holding the character by specifying the char type 2 by using type coercion with the as operator 3 by using a cast to char operation The first option 1 is interesting when the character is held in a variable, while the other two ( 2 and 3 ) are more interesting when a char value must be passed as argument of a method call. 5. Numbers Groovy supports different kinds of integral literals and decimal literals, backed by the usual Number types of Java. 5.1. Integral literals The integral literal types are the same as in Java: byte char short int long java.math.BigInteger You can create integral numbers of those types with the following declarations: // primitive types byte b = 1 char c = 2 short s = 3 int i = 4 long l = 5 // infinite precision BigInteger bi = 6 If you use optional typing by using the def keyword, the type of the integral number will vary: it’ll adapt to the capacity of the type that can hold that number. For positive numbers: def a = 1 assert a instanceof Integer // Integer.MAX_VALUE def b = 2147483647 assert b instanceof Integer // Integer.MAX_VALUE + 1 def c = 2147483648 assert c instanceof Long // Long.MAX_VALUE def d = 9223372036854775807 assert d instanceof Long // Long.MAX_VALUE + 1 def e = 9223372036854775808 assert e instanceof BigInteger As well as for negative numbers: def na = -1 assert na instanceof Integer // Integer.MIN_VALUE def nb = -2147483648 assert nb instanceof Integer // Integer.MIN_VALUE - 1 def nc = -2147483649 assert nc instanceof Long // Long.MIN_VALUE def nd = -9223372036854775808 assert nd instanceof Long // Long.MIN_VALUE - 1 def ne = -9223372036854775809 assert ne instanceof BigInteger 5.1.1. Alternative non-base 10 representations Numbers can also be represented in binary, octal, hexadecimal and decimal bases. Binary literal Binary numbers start with a 0b prefix: int xInt = 0b10101111 assert xInt == 175 short xShort = 0b11001001 assert xShort == 201 as short byte xByte = 0b11 assert xByte == 3 as byte long xLong = 0b101101101101 assert xLong == 2925l BigInteger xBigInteger = 0b111100100001 assert xBigInteger == 3873g int xNegativeInt = -0b10101111 assert xNegativeInt == -175 Octal literal Octal numbers are specified in the typical format of 0 followed by octal digits. int xInt = 077 assert xInt == 63 short xShort = 011 assert xShort == 9 as short byte xByte = 032 assert xByte == 26 as byte long xLong = 0246 assert xLong == 166l BigInteger xBigInteger = 01111 assert xBigInteger == 585g int xNegativeInt = -077 assert xNegativeInt == -63 Hexadecimal literal Hexadecimal numbers are specified in the typical format of 0x followed by hex digits. int xInt = 0x77 assert xInt == 119 short xShort = 0xaa assert xShort == 170 as short byte xByte = 0x3a assert xByte == 58 as byte long xLong = 0xffff assert xLong == 65535l BigInteger xBigInteger = 0xaaaa assert xBigInteger == 43690g Double xDouble = new Double('0x1.0p0') assert xDouble == 1.0d int xNegativeInt = -0x77 assert xNegativeInt == -119 5.2. Decimal literals The decimal literal types are the same as in Java: float double java.math.BigDecimal You can create decimal numbers of those types with the following declarations: // primitive types float f = 1.234 double d = 2.345 // infinite precision BigDecimal bd = 3.456 Decimals can use exponents, with the e or E exponent letter, followed by an optional sign, and an integral number representing the exponent: assert 1e3 == 1_000.0 assert 2E4 == 20_000.0 assert 3e+1 == 30.0 assert 4E-2 == 0.04 assert 5e-1 == 0.5 Conveniently for exact decimal number calculations, Groovy chooses java.math.BigDecimal as its decimal number type. In addition, both float and double are supported, but require an explicit type declaration, type coercion or suffix. Even if BigDecimal is the default for decimal numbers, such literals are accepted in methods or closures taking float or double as parameter types. Decimal numbers can’t be represented using a binary, octal or hexadecimal representation. 5.3. Underscore in literals When writing long literal numbers, it’s harder on the eye to figure out how some numbers are grouped together, for example with groups of thousands, of words, etc. By allowing you to place underscore in number literals, it’s easier to spot those groups: long creditCardNumber = 1234_5678_9012_3456L long socialSecurityNumbers = 999_99_9999L double monetaryAmount = 12_345_132.12 long hexBytes = 0xFF_EC_DE_5E long hexWords = 0xFFEC_DE5E long maxLong = 0x7fff_ffff_ffff_ffffL long alsoMaxLong = 9_223_372_036_854_775_807L long bytes = 0b11010010_01101001_10010100_10010010 5.4. Number type suffixes We can force a number (including binary, octals and hexadecimals) to have a specific type by giving a suffix (see table below), either uppercase or lowercase. Type Suffix BigInteger G or g Long L or l Integer I or i BigDecimal G or g Double D or d Float F or f Examples: assert 42I == Integer.valueOf('42') assert 42i == Integer.valueOf('42') // lowercase i more readable assert 123L == Long.valueOf("123") // uppercase L more readable assert 2147483648 == Long.valueOf('2147483648') // Long type used, value too large for an Integer assert 456G == new BigInteger('456') assert 456g == new BigInteger('456') assert 123.45 == new BigDecimal('123.45') // default BigDecimal type used assert .321 == new BigDecimal('.321') assert 1.200065D == Double.valueOf('1.200065') assert 1.234F == Float.valueOf('1.234') assert 1.23E23D == Double.valueOf('1.23E23') assert 0b1111L.class == Long // binary assert 0xFFi.class == Integer // hexadecimal assert 034G.class == BigInteger // octal 5.5. Math operations Although operators are covered in more detail elsewhere, it’s important to discuss the behavior of math operations and what their resulting types are. Division and power binary operations aside (covered below), binary operations between byte , char , short and int result in int binary operations involving long with byte , char , short and int result in long binary operations involving BigInteger and any other integral type result in BigInteger binary operations involving BigDecimal with byte , char , short , int and BigInteger result in BigDecimal binary operations between float , double and BigDecimal result in double binary operations between two BigDecimal result in BigDecimal The following table summarizes those rules: byte char short int long BigInteger float double BigDecimal byte int int int int long BigInteger double double BigDecimal char int int int long BigInteger double double BigDecimal short int int long BigInteger double double BigDecimal int int long BigInteger double double BigDecimal long long BigInteger double double BigDecimal BigInteger BigInteger double double BigDecimal float double double double double double double BigDecimal BigDecimal Thanks to Groovy’s operator overloading, the usual arithmetic operators work as well with BigInteger and BigDecimal , unlike in Java where you have to use explicit methods for operating on those numbers. 5.5.1. The case of the division operator The division operators / (and /= for division and assignment) produce a double result if either operand is a float or double , and a BigDecimal result otherwise (when both operands are any combination of an integral type short , char , byte , int , long , BigInteger or BigDecimal ). BigDecimal division is performed with the divide() method if the division is exact (i.e. yielding a result that can be represented within the bounds of the same precision and scale), or using a MathContext with a precision of the maximum of the two operands' precision plus an extra precision of 10, and a scale of the maximum of 10 and the maximum of the operands' scale. For integer division like in Java, you should use the intdiv() method, as Groovy doesn’t provide a dedicated integer division operator symbol. 5.5.2. The case of the power operator The power operation is represented by the ** operator, with two parameters: the base and the exponent. The result of the power operation depends on its operands, and the result of the operation (in particular if the result can be represented as an integral value). The following rules are used by Groovy’s power operation to determine the resulting type: If the exponent is a decimal value if the result can be represented as an Integer , then return an Integer else if the result can be represented as a Long , then return a Long otherwise return a Double If the exponent is an integral value if the exponent is strictly negative, then return an Integer , Long or Double if the result value fits in that type if the exponent is positive or zero if the base is a BigDecimal , then return a BigDecimal result value if the base is a BigInteger , then return a BigInteger result value if the base is an Integer , then return an Integer if the result value fits in it, otherwise a BigInteger if the base is a Long , then return a Long if the result value fits in it, otherwise a BigInteger We can illustrate those rules with a few examples: // base and exponent are ints and the result can be represented by an Integer assert 2 ** 3 instanceof Integer // 8 assert 10 ** 9 instanceof Integer // 1_000_000_000 // the base is a long, so fit the result in a Long // (although it could have fit in an Integer) assert 5L ** 2 instanceof Long // 25 // the result can't be represented as an Integer or Long, so return a BigInteger assert 100 ** 10 instanceof BigInteger // 10e20 assert 1234 ** 123 instanceof BigInteger // 170515806212727042875... // the base is a BigDecimal and the exponent a negative int // but the result can be represented as an Integer assert 0.5 ** -2 instanceof Integer // 4 // the base is an int, and the exponent a negative float // but again, the result can be represented as an Integer assert 1 ** -0.3f instanceof Integer // 1 // the base is an int, and the exponent a negative int // but the result will be calculated as a Double // (both base and exponent are actually converted to doubles) assert 10 ** -1 instanceof Double // 0.1 // the base is a BigDecimal, and the exponent is an int, so return a BigDecimal assert 1.2 ** 10 instanceof BigDecimal // 6.1917364224 // the base is a float or double, and the exponent is an int // but the result can only be represented as a Double value assert 3.4f ** 5 instanceof Double // 454.35430372146965 assert 5.6d ** 2 instanceof Double // 31.359999999999996 // the exponent is a decimal value // and the result can only be represented as a Double value assert 7.8 ** 1.9 instanceof Double // 49.542708423868476 assert 2 ** 0.1f instanceof Double // 1.0717734636432956 6. Booleans Boolean is a special data type that is used to represent truth values: true and false . Use this data type for simple flags that track true/false conditions . Boolean values can be stored in variables, assigned into fields, just like any other data type: def myBooleanVariable = true boolean untypedBooleanVar = false booleanField = true true and false are the only two primitive boolean values. But more complex boolean expressions can be represented using logical operators . In addition, Groovy has special rules (often referred to as Groovy Truth ) for coercing non-boolean objects to a boolean value. 7. Lists Groovy uses a comma-separated list of values, surrounded by square brackets, to denote lists. Groovy lists are plain JDK java.util.List , as Groovy doesn’t define its own collection classes. The concrete list implementation used when defining list literals are java.util.ArrayList by default, unless you decide to specify otherwise, as we shall see later on. def numbers = [1, 2, 3] (1) assert numbers instanceof List (2) assert numbers.size() == 3 (3) 1 We define a list numbers delimited by commas and surrounded by square brackets, and we assign that list into a variable 2 The list is an instance of Java’s java.util.List interface 3 The size of the list can be queried with the size() method, and shows our list contains 3 elements In the above example, we used a homogeneous list, but you can also create lists containing values of heterogeneous types: def heterogeneous = [1, "a", true] (1) 1 Our list here contains a number, a string and a boolean value We mentioned that by default, list literals are actually instances of java.util.ArrayList , but it is possible to use a different backing type for our lists, thanks to using type coercion with the as operator, or with explicit type declaration for your variables: def arrayList = [1, 2, 3] assert arrayList instanceof java.util.ArrayList def linkedList = [2, 3, 4] as LinkedList (1) assert linkedList instanceof java.util.LinkedList LinkedList otherLinked = [3, 4, 5] (2) assert otherLinked instanceof java.util.LinkedList 1 We use coercion with the as operator to explicitly request a java.util.LinkedList implementation 2 We can say that the variable holding the list literal is of type java.util.LinkedList You can access elements of the list with the [] subscript operator (both for reading and setting values) with positive indices or negative indices to access elements from the end of the list, as well as with ranges, and use the << leftShift operator to append elements to a list: def letters = ['a', 'b', 'c', 'd'] assert letters[0] == 'a' (1) assert letters[1] == 'b' assert letters[-1] == 'd' (2) assert letters[-2] == 'c' letters[2] = 'C' (3) assert letters[2] == 'C' letters << 'e' (4) assert letters[ 4] == 'e' assert letters[-1] == 'e' assert letters[1, 3] == ['b', 'd'] (5) assert letters[2..4] == ['C', 'd', 'e'] (6) 1 Access the first element of the list (zero-based counting) 2 Access the last element of the list with a negative index: -1 is the first element from the end of the list 3 Use an assignment to set a new value for the third element of the list 4 Use the << leftShift operator to append an element at the end of the list 5 Access two elements at once, returning a new list containing those two elements 6 Use a range to access a range of values from the list, from a start to an end element position As lists can be heterogeneous in nature, lists can also contain other lists to create multidimensional lists: def multi = [[0, 1], [2, 3]] (1) assert multi[1][0] == 2 (2) 1 Define a list of numbers 2 Access the second element of the top-most list, and the first element of the inner list 8. Arrays Groovy reuses the list notation for arrays, but to make such literals arrays, you need to explicitly define the type of the array through coercion or type declaration. String[] arrStr = ['Ananas', 'Banana', 'Kiwi'] (1) assert arrStr instanceof String[] (2) assert !(arrStr instanceof List) def numArr = [1, 2, 3] as int[] (3) assert numArr instanceof int[] (4) assert numArr.size() == 3 1 Define an array of strings using explicit variable type declaration 2 Assert that we created an array of strings 3 Create an array of ints with the as operator 4 Assert that we created an array of primitive ints You can also create multi-dimensional arrays: def matrix3 = new Integer[3][3] (1) assert matrix3.size() == 3 Integer[][] matrix2 (2) matrix2 = [[1, 2], [3, 4]] assert matrix2 instanceof Integer[][] 1 You can define the bounds of a new array 2 Or declare an array without specifying its bounds Access to elements of an array follows the same notation as for lists: String[] names = ['Cédric', 'Guillaume', 'Jochen', 'Paul'] assert names[0] == 'Cédric' (1) names[2] = 'Blackdrag' (2) assert names[2] == 'Blackdrag' 1 Retrieve the first element of the array 2 Set the value of the third element of the array to a new value 8.1. Java-style array initialization Groovy has always supported literal list/array definitions using square brackets and has avoided Java-style curly braces so as not to conflict with closure definitions. In the case where the curly braces come immediately after an array type declaration however, there is no ambiguity with closure definitions, so Groovy 3 and above support that variant of the Java array initialization expression. Examples: def primes = new int[] {2, 3, 5, 7, 11} assert primes.size() == 5 && primes.sum() == 28 assert primes.class.name == '[I' def pets = new String[] {'cat', 'dog'} assert pets.size() == 2 && pets.sum() == 'catdog' assert pets.class.name == '[Ljava.lang.String;' // traditional Groovy alternative still supported String[] groovyBooks = [ 'Groovy in Action', 'Making Java Groovy' ] assert groovyBooks.every{ it.contains('Groovy') } 9. Maps Sometimes called dictionaries or associative arrays in other languages, Groovy features maps. Maps associate keys to values, separating keys and values with colons, and each key/value pairs with commas, and the whole keys and values surrounded by square brackets. def colors = [red: '#FF0000', green: '#00FF00', blue: '#0000FF'] (1) assert colors['red'] == '#FF0000' (2) assert colors.green == '#00FF00' (3) colors['pink'] = '#FF00FF' (4) colors.yellow = '#FFFF00' (5) assert colors.pink == '#FF00FF' assert colors['yellow'] == '#FFFF00' assert colors instanceof java.util.LinkedHashMap 1 We define a map of string color names, associated with their hexadecimal-coded html colors 2 We use the subscript notation to check the content associated with the red key 3 We can also use the property notation to assert the color green’s hexadecimal representation 4 Similarly, we can use the subscript notation to add a new key/value pair 5 Or the property notation, to add the yellow color When using names for the keys, we actually define string keys in the map. Groovy creates maps that are actually instances of java.util.LinkedHashMap . If you try to access a key which is not present in the map: assert colors.unknown == null def emptyMap = [:] assert emptyMap.anyKey == null You will retrieve a null result. In the examples above, we used string keys, but you can also use values of other types as keys: def numbers = [1: 'one', 2: 'two'] assert numbers[1] == 'one' Here, we used numbers as keys, as numbers can unambiguously be recognized as numbers, so Groovy will not create a string key like in our previous examples. But consider the case you want to pass a variable in lieu of the key, to have the value of that variable become the key: def key = 'name' def person = [key: 'Guillaume'] (1) assert !person.containsKey('name') (2) assert person.containsKey('key') (3) 1 The key associated with the 'Guillaume' name will actually be the "key" string, not the value associated with the key variable 2 The map doesn’t contain the 'name' key 3 Instead, the map contains a 'key' key You can also pass quoted strings as well as keys: ["name": "Guillaume"]. This is mandatory if your key string isn’t a valid identifier, for example if you wanted to create a string key containing a dash like in: ["street-name": "Main street"]. When you need to pass variable values as keys in your map definitions, you must surround the variable or expression with parentheses: person = [(key): 'Guillaume'] (1) assert person.containsKey('name') (2) assert !person.containsKey('key') (3) 1 This time, we surround the key variable with parentheses, to instruct the parser we are passing a variable rather than defining a string key 2 The map does contain the name key 3 But the map doesn’t contain the key key as before Groovy Learn Documentation Download Support Contribute Ecosystem Blog posts About Source code Security Books Thanks Sponsorship FAQ Search Socialize Discuss on the mailing-list Groovy on X Groovy on Bluesky Groovy on Mastodon Groovy on LinkedIn Events and conferences Source code on GitHub Report issues in Jira Stack Overflow questions Slack Community The Groovy programming language is supported by the Apache Software Foundation and the Groovy community. Apache, Apache Groovy, Groovy, and the ASF logo are either registered trademarks or trademarks of The Apache Software Foundation. © 2003-2025 the Apache Groovy project — Groovy is Open Source: license , privacy policy . | 2026-01-13T09:29:32 |
https://www.chinadaily.com.cn/a/202512/15/WS693f9e71a310d6866eb2ea92.html | Workers build giant snowman in Heilongjiang - Chinadaily.com.cn Search HOME CHINA WORLD BUSINESS LIFESTYLE CULTURE TRAVEL WATCHTHIS SPORTS OPINION REGIONAL FORUM NEWSPAPER MOBILE Home China Society Home / China / Society Workers build giant snowman in Heilongjiang Xinhua | Updated: 2025-12-15 13:36 Share Share - WeChat --> CLOSE A drone photo shows workers building a giant snowman at the Qunli music park in Harbin, Northeast China's Heilongjiang province, Dec 14, 2025. This year's giant snowman, 19 meters in height and made with some 3,000 cubic meters of snow, is one meter taller than that of last year. [Photo/Xinhua] --> 1 2 3 4 Next >>| --> 1/4 Next Photo LIVE: SCIO briefing on national economic performance of November Breathing new life into lakes Zhejiang banks bet big on high-tech drivers Thrills designed for 'wimps' make giant leap in tourism Geminid meteor shower seen across China Archives detailing crimes of Japanese unit released --> --> Top BACK TO THE TOP English 中文 HOME CHINA WORLD BUSINESS LIFESTYLE CULTURE TRAVEL VIDEO SPORTS OPINION REGIONAL NEWSPAPER China Daily PDF China Daily E-paper MOBILE Copyright 1994 - . All rights reserved. The content (including but not limited to text, photo, multimedia information, etc) published in this site belongs to China Daily Information Co (CDIC). Without written authorization from CDIC, such content shall not be republished or used in any form. Note: Browsers with 1024*768 or higher resolution are suggested for this site. License for publishing multimedia online 0108263 Registration Number: 130349 About China Daily Advertise on Site Contact Us Job Offer Expat Employment FOLLOW US Copyright 1994 - . All rights reserved. The content (including but not limited to text, photo, multimedia information, etc) published in this site belongs to China Daily Information Co (CDIC). Without written authorization from CDIC, such content shall not be republished or used in any form. --> | 2026-01-13T09:29:32 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.