├── README.md ├── SUMMARY.md ├── _book ├── GLOSSARY.html ├── gitbook │ ├── app.js │ ├── fonts │ │ ├── fontawesome │ │ │ ├── FontAwesome.otf │ │ │ ├── fontawesome-webfont.eot │ │ │ ├── fontawesome-webfont.svg │ │ │ ├── fontawesome-webfont.ttf │ │ │ └── fontawesome-webfont.woff │ │ ├── merriweather │ │ │ ├── 250.woff │ │ │ ├── 250i.woff │ │ │ ├── 400.woff │ │ │ ├── 400i.woff │ │ │ ├── 700.woff │ │ │ ├── 700i.woff │ │ │ ├── 900.woff │ │ │ └── 900i.woff │ │ └── opensans │ │ │ ├── 300.woff │ │ │ ├── 300i.woff │ │ │ ├── 400.woff │ │ │ ├── 400i.woff │ │ │ ├── 600.woff │ │ │ ├── 600i.woff │ │ │ ├── 700.woff │ │ │ └── 700i.woff │ ├── images │ │ ├── apple-touch-icon-precomposed-152.png │ │ └── favicon.ico │ ├── plugins │ │ └── gitbook-plugin-mathjax │ │ │ └── plugin.js │ ├── print.css │ └── style.css ├── glossary_index.json ├── index.html └── search_index.json ├── config.json ├── cover ├── background.jpg └── logo.png ├── formatting ├── README.md ├── annotations.md ├── arrays.md ├── block-indentation.md ├── blocks-k-r-style.md ├── braces-always-used.md ├── braces-empty-blocks.md ├── braces.md ├── column-limit.md ├── comments.md ├── enum-classes.md ├── grouping-parentheses.md ├── horizontal-alignment.md ├── horizontal-whitespace.md ├── line-wrapping-indent.md ├── line-wrapping-where-to-break.md ├── line-wrapping.md ├── modifiers.md ├── one-statement-per-line.md ├── specific-constructs.md ├── switch.md ├── variable-declarations.md ├── vertical-whitespace.md └── whitespace.md ├── introduction ├── README.md ├── guide-notes.md └── terminology.md ├── javadoc ├── README.md ├── javadoc-at-clauses.md ├── javadoc-exception-overrides.md ├── javadoc-exception-self-explanatory.md ├── javadoc-formatting.md ├── javadoc-multi-line.md ├── javadoc-optional.md ├── javadoc-paragraphs.md ├── javadoc-where-required.md └── summary-fragment.md ├── naming ├── README.md ├── camel-case.md ├── class-names.md ├── constant-names.md ├── identifier-names.md ├── local-variable-names.md ├── method-names.md ├── non-constant-field-names.md ├── package-names.md ├── parameter-names.md ├── specific-identifier-names.md └── type-variable-names.md ├── programming-practices ├── README.md ├── caught-exceptions.md ├── finalizers.md ├── override-annotation.md └── static-members.md ├── source-file-basics ├── README.md ├── file-encoding.md ├── file-name.md ├── non-ascii-characters.md ├── special-characters.md ├── special-escape-sequences.md └── whitespace-characters.md └── source-file-structure ├── README.md ├── class-declaration.md ├── class-member-ordering.md ├── copyright-statement.md ├── import-line-wrapping.md ├── import-ordering-and-spacing.md ├── import-statements.md ├── one-top-level-class.md ├── overloads-never-split.md ├── package-statement.md └── wildcard-imports.md /README.md: -------------------------------------------------------------------------------- 1 | # Google Java编程风格规范 2 | 3 | Google Java编程风格规范 gitbook 版本,内容来至Hastein的中文翻译。 4 | 5 | > > 作者:Hawstein
6 | 出处:[http://hawstein.com/posts/google-java-style.html](http://hawstein.com/posts/google-java-style.html) 7 | 8 | -------------------------------------------------------------------------------- /SUMMARY.md: -------------------------------------------------------------------------------- 1 | # Summary 2 | 3 | * [说明](README.md) 4 | * [前言](introduction/README.md) 5 | * [术语说明](introduction/terminology.md) 6 | * [指南说明](introduction/guide-notes.md) 7 | * [源文件基础](source-file-basics/README.md) 8 | * [文件名](source-file-basics/file-name.md) 9 | * [文件编码:UTF-8](source-file-basics/file-encoding.md) 10 | * [特殊字符](source-file-basics/special-characters.md) 11 | * [空白字符](source-file-basics/whitespace-characters.md) 12 | * [特殊转义序列](source-file-basics/special-escape-sequences.md) 13 | * [非ASCII字符](source-file-basics/non-ascii-characters.md) 14 | * [源文件结构](source-file-structure/README.md) 15 | * [许可证或版权信息](source-file-structure/copyright-statement.md) 16 | * [package语句](source-file-structure/package-statement.md) 17 | * [import语句](source-file-structure/import-statements.md) 18 | * [import不要使用通配符](source-file-structure/wildcard-imports.md) 19 | * [不要换行](source-file-structure/import-line-wrapping.md) 20 | * [顺序和间距](source-file-structure/import-ordering-and-spacing.md) 21 | * [类声明](source-file-structure/class-declaration.md) 22 | * [只有一个顶级类声明](source-file-structure/one-top-level-class.md) 23 | * [类成员顺序](source-file-structure/class-member-ordering.md) 24 | * [格式](formatting/README.md) 25 | * [大括号](formatting/braces.md) 26 | * [使用大括号(即使是可选的)](formatting/braces-always-used.md) 27 | * [非空块:K & R 风格](formatting/blocks-k-r-style.md) 28 | * [空块:可以用简洁版本](formatting/braces-empty-blocks.md) 29 | * [块缩进:2个空格](formatting/block-indentation.md) 30 | * [一行一个语句](formatting/one-statement-per-line.md) 31 | * [列限制:80或100](formatting/column-limit.md) 32 | * [自动换行](formatting/line-wrapping.md) 33 | * [从哪里断开](formatting/line-wrapping-where-to-break.md) 34 | * [自动换行时缩进至少+4个空格](formatting/line-wrapping-indent.md) 35 | * [空白](formatting/whitespace.md) 36 | * [垂直空白](formatting/vertical-whitespace.md) 37 | * [水平空白](formatting/horizontal-whitespace.md) 38 | * [水平对齐:不做要求](formatting/horizontal-alignment.md) 39 | * [用小括号来限定组:推荐](formatting/grouping-parentheses.md) 40 | * [枚举类](formatting/specific-constructs.md) 41 | * [枚举类](formatting/enum-classes.md) 42 | * [变量声明](formatting/variable-declarations.md) 43 | * [数组](formatting/arrays.md) 44 | * [switch语句](formatting/switch.md) 45 | * [注解(Annotations)](formatting/annotations.md) 46 | * [注释](formatting/comments.md) 47 | * [Modifiers](formatting/modifiers.md) 48 | * [命名](naming/README.md) 49 | * [对所有标识符都通用的规则](naming/identifier-names.md) 50 | * [标识符类型的规则](naming/specific-identifier-names.md) 51 | * [包名](naming/package-names.md) 52 | * [类名](naming/class-names.md) 53 | * [方法名](naming/method-names.md) 54 | * [常量名](naming/constant-names.md) 55 | * [非常量字段名](naming/non-constant-field-names.md) 56 | * [参数名](naming/parameter-names.md) 57 | * [局部变量名](naming/local-variable-names.md) 58 | * [类型变量名](naming/type-variable-names.md) 59 | * [驼峰式命名法(CamelCase)](naming/camel-case.md) 60 | * [编程实践](programming-practices/README.md) 61 | * [@Override:能用则用](programming-practices/override-annotation.md) 62 | * [捕获的异常:不能忽视](programming-practices/caught-exceptions.md) 63 | * [静态成员:使用类进行调用](programming-practices/static-members.md) 64 | * [Finalizers: 禁用](programming-practices/finalizers.md) 65 | * [Javadoc](javadoc/README.md) 66 | * [格式](javadoc/javadoc-formatting.md) 67 | * [一般形式](javadoc/javadoc-multi-line.md) 68 | * [段落](javadoc/javadoc-paragraphs.md) 69 | * [Javadoc标记](javadoc/javadoc-at-clauses.md) 70 | * [摘要片段](javadoc/summary-fragment.md) 71 | * [哪里需要使用Javadoc](javadoc/javadoc-where-required.md) 72 | * [例外:不言自明的方法](javadoc/javadoc-exception-self-explanatory.md) 73 | * [例外:重载](javadoc/javadoc-exception-overrides.md) 74 | * [可选的Javadoc](javadoc/javadoc-optional.md) 75 | 76 | -------------------------------------------------------------------------------- /_book/GLOSSARY.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Glossary | My Book 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 |
38 | 39 | 40 |
41 | 44 | 77 |
78 | 79 |
80 |
81 |
82 | 83 | 84 | 85 | 86 | 113 | 114 | 115 | 116 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 |

148 | 149 | My Book 150 |

151 |
152 | 153 |
154 |
155 | 156 | 157 | 158 |
159 |
160 |
161 | 162 | 163 | 164 |
165 |
166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 184 | 185 | 186 | 187 | 188 | 189 | -------------------------------------------------------------------------------- /_book/gitbook/fonts/fontawesome/FontAwesome.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JervyShi/google-java-styleguide-zh/787d01bb3f64b7a4d216fab05d7cf26ff86def3c/_book/gitbook/fonts/fontawesome/FontAwesome.otf -------------------------------------------------------------------------------- /_book/gitbook/fonts/fontawesome/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JervyShi/google-java-styleguide-zh/787d01bb3f64b7a4d216fab05d7cf26ff86def3c/_book/gitbook/fonts/fontawesome/fontawesome-webfont.eot -------------------------------------------------------------------------------- /_book/gitbook/fonts/fontawesome/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JervyShi/google-java-styleguide-zh/787d01bb3f64b7a4d216fab05d7cf26ff86def3c/_book/gitbook/fonts/fontawesome/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /_book/gitbook/fonts/fontawesome/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JervyShi/google-java-styleguide-zh/787d01bb3f64b7a4d216fab05d7cf26ff86def3c/_book/gitbook/fonts/fontawesome/fontawesome-webfont.woff -------------------------------------------------------------------------------- /_book/gitbook/fonts/merriweather/250.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JervyShi/google-java-styleguide-zh/787d01bb3f64b7a4d216fab05d7cf26ff86def3c/_book/gitbook/fonts/merriweather/250.woff -------------------------------------------------------------------------------- /_book/gitbook/fonts/merriweather/250i.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JervyShi/google-java-styleguide-zh/787d01bb3f64b7a4d216fab05d7cf26ff86def3c/_book/gitbook/fonts/merriweather/250i.woff -------------------------------------------------------------------------------- /_book/gitbook/fonts/merriweather/400.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JervyShi/google-java-styleguide-zh/787d01bb3f64b7a4d216fab05d7cf26ff86def3c/_book/gitbook/fonts/merriweather/400.woff -------------------------------------------------------------------------------- /_book/gitbook/fonts/merriweather/400i.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JervyShi/google-java-styleguide-zh/787d01bb3f64b7a4d216fab05d7cf26ff86def3c/_book/gitbook/fonts/merriweather/400i.woff -------------------------------------------------------------------------------- /_book/gitbook/fonts/merriweather/700.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JervyShi/google-java-styleguide-zh/787d01bb3f64b7a4d216fab05d7cf26ff86def3c/_book/gitbook/fonts/merriweather/700.woff -------------------------------------------------------------------------------- /_book/gitbook/fonts/merriweather/700i.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JervyShi/google-java-styleguide-zh/787d01bb3f64b7a4d216fab05d7cf26ff86def3c/_book/gitbook/fonts/merriweather/700i.woff -------------------------------------------------------------------------------- /_book/gitbook/fonts/merriweather/900.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JervyShi/google-java-styleguide-zh/787d01bb3f64b7a4d216fab05d7cf26ff86def3c/_book/gitbook/fonts/merriweather/900.woff -------------------------------------------------------------------------------- /_book/gitbook/fonts/merriweather/900i.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JervyShi/google-java-styleguide-zh/787d01bb3f64b7a4d216fab05d7cf26ff86def3c/_book/gitbook/fonts/merriweather/900i.woff -------------------------------------------------------------------------------- /_book/gitbook/fonts/opensans/300.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JervyShi/google-java-styleguide-zh/787d01bb3f64b7a4d216fab05d7cf26ff86def3c/_book/gitbook/fonts/opensans/300.woff -------------------------------------------------------------------------------- /_book/gitbook/fonts/opensans/300i.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JervyShi/google-java-styleguide-zh/787d01bb3f64b7a4d216fab05d7cf26ff86def3c/_book/gitbook/fonts/opensans/300i.woff -------------------------------------------------------------------------------- /_book/gitbook/fonts/opensans/400.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JervyShi/google-java-styleguide-zh/787d01bb3f64b7a4d216fab05d7cf26ff86def3c/_book/gitbook/fonts/opensans/400.woff -------------------------------------------------------------------------------- /_book/gitbook/fonts/opensans/400i.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JervyShi/google-java-styleguide-zh/787d01bb3f64b7a4d216fab05d7cf26ff86def3c/_book/gitbook/fonts/opensans/400i.woff -------------------------------------------------------------------------------- /_book/gitbook/fonts/opensans/600.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JervyShi/google-java-styleguide-zh/787d01bb3f64b7a4d216fab05d7cf26ff86def3c/_book/gitbook/fonts/opensans/600.woff -------------------------------------------------------------------------------- /_book/gitbook/fonts/opensans/600i.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JervyShi/google-java-styleguide-zh/787d01bb3f64b7a4d216fab05d7cf26ff86def3c/_book/gitbook/fonts/opensans/600i.woff -------------------------------------------------------------------------------- /_book/gitbook/fonts/opensans/700.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JervyShi/google-java-styleguide-zh/787d01bb3f64b7a4d216fab05d7cf26ff86def3c/_book/gitbook/fonts/opensans/700.woff -------------------------------------------------------------------------------- /_book/gitbook/fonts/opensans/700i.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JervyShi/google-java-styleguide-zh/787d01bb3f64b7a4d216fab05d7cf26ff86def3c/_book/gitbook/fonts/opensans/700i.woff -------------------------------------------------------------------------------- /_book/gitbook/images/apple-touch-icon-precomposed-152.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JervyShi/google-java-styleguide-zh/787d01bb3f64b7a4d216fab05d7cf26ff86def3c/_book/gitbook/images/apple-touch-icon-precomposed-152.png -------------------------------------------------------------------------------- /_book/gitbook/images/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JervyShi/google-java-styleguide-zh/787d01bb3f64b7a4d216fab05d7cf26ff86def3c/_book/gitbook/images/favicon.ico -------------------------------------------------------------------------------- /_book/gitbook/plugins/gitbook-plugin-mathjax/plugin.js: -------------------------------------------------------------------------------- 1 | require(["gitbook"], function(gitbook) { 2 | MathJax.Hub.Config({ 3 | tex2jax: { 4 | processEscapes: true 5 | } 6 | }); 7 | 8 | 9 | gitbook.events.bind("page.change", function() { 10 | MathJax.Hub.Typeset() 11 | }); 12 | }); 13 | 14 | -------------------------------------------------------------------------------- /_book/gitbook/print.css: -------------------------------------------------------------------------------- 1 | .link-inherit{color:inherit}.link-inherit:hover,.link-inherit:focus{color:inherit}.hidden{display:none}.hljs-comment,.hljs-title{color:#8e908c}.hljs-variable,.hljs-attribute,.hljs-tag,.hljs-regexp,.ruby .hljs-constant,.xml .hljs-tag .hljs-title,.xml .hljs-pi,.xml .hljs-doctype,.html .hljs-doctype,.css .hljs-id,.css .hljs-class,.css .hljs-pseudo{color:#c82829}.hljs-number,.hljs-preprocessor,.hljs-pragma,.hljs-built_in,.hljs-literal,.hljs-params,.hljs-constant{color:#f5871f}.ruby .hljs-class .hljs-title,.css .hljs-rules .hljs-attribute{color:#eab700}.hljs-string,.hljs-value,.hljs-inheritance,.hljs-header,.ruby .hljs-symbol,.xml .hljs-cdata{color:#718c00}.css .hljs-hexcolor{color:#3e999f}.hljs-function,.python .hljs-decorator,.python .hljs-title,.ruby .hljs-function .hljs-title,.ruby .hljs-title .hljs-keyword,.perl .hljs-sub,.javascript .hljs-title,.coffeescript .hljs-title{color:#4271ae}.hljs-keyword,.javascript .hljs-function{color:#8959a8}.hljs{display:block;background:white;color:#4d4d4c;padding:.5em}.coffeescript .javascript,.javascript .xml,.tex .hljs-formula,.xml .javascript,.xml .vbscript,.xml .css,.xml .hljs-cdata{opacity:.5}.book-chapter{display:none}.exercise,.quiz{margin:1cm 0;padding:.4cm;page-break-inside:avoid;border:3px solid #ddd}.exercise .exercise-header,.quiz .exercise-header{margin-bottom:.4cm;padding-bottom:.2cm;border-bottom:1px solid #ddd}.exercise .question,.quiz .question{margin-top:.4cm}body{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;line-height:1.4;color:#333;overflow:hidden;line-height:1.6;word-wrap:break-word;display:block}body>*:first-child{margin-top:0!important}body>*:last-child{margin-bottom:0!important}body a{background:transparent}body a:active,body a:hover{outline:0}body strong{font-weight:bold}body h1{font-size:2em;margin:.67em 0}body img{border:0}body hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0}body pre{overflow:auto}body code,body pre{font-family:monospace,monospace;font-size:1em}body table{border-collapse:collapse;border-spacing:0}body td,body th{padding:0}body *{-moz-box-sizing:border-box;box-sizing:border-box}body a{color:#4183c4;text-decoration:none}body a:hover,body a:focus,body a:active{text-decoration:underline}body hr{height:0;margin:15px 0;overflow:hidden;background:transparent;border:0;border-bottom:1px solid #ddd}body hr:before,body hr:after{display:table;content:" "}body hr:after{clear:both}body h1,body h2,body h3,body h4,body h5,body h6{margin-top:15px;margin-bottom:15px;line-height:1.1}body h1{font-size:30px}body h2{font-size:21px}body h3{font-size:16px}body h4{font-size:14px}body h5{font-size:12px}body h6{font-size:11px}body blockquote{margin:0}body ul,body ol{padding:0;margin-top:0;margin-bottom:0}body ol ol{list-style-type:lower-roman}body dd{margin-left:0}body code,body pre{font-family:Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:12px}body pre{margin-top:0;margin-bottom:0}body .markdown-body>*:first-child{margin-top:0!important}body .markdown-body>*:last-child{margin-bottom:0!important}body .anchor{position:absolute;top:0;bottom:0;left:0;display:block;padding-right:6px;padding-left:30px;margin-left:-30px}body .anchor:focus{outline:0}body h1,body h2,body h3,body h4,body h5,body h6{position:relative;margin-top:1em;margin-bottom:16px;font-weight:bold;line-height:1.4}body h1{padding-bottom:.3em;font-size:2.25em;line-height:1.2;border-bottom:1px solid #eee}body h2{padding-bottom:.3em;font-size:1.75em;line-height:1.225;border-bottom:1px solid #eee}body h3{font-size:1.5em;line-height:1.43}body h4{font-size:1.25em}body h5{font-size:1em}body h6{font-size:1em;color:#777}body p,body blockquote,body ul,body ol,body dl,body table,body pre{margin-top:0;margin-bottom:16px}body hr{height:4px;padding:0;margin:16px 0;background-color:#e7e7e7;border:0 none}body ul,body ol{padding-left:2em}body ol ol,body ol ul{margin-top:0;margin-bottom:0}body dl{padding:0}body dl dt{padding:0;margin-top:16px;font-size:1em;font-style:italic;font-weight:bold}body dl dd{padding:0 16px;margin-bottom:16px}body blockquote{padding:0 15px;color:#777;border-left:4px solid #ddd}body blockquote>:first-child{margin-top:0}body blockquote>:last-child{margin-bottom:0}body table{display:block;width:100%;overflow:auto}body table th{font-weight:bold}body table th,body table td{padding:6px 13px;border:1px solid #ddd}body table tr{background-color:#fff;border-top:1px solid #ccc}body table tr:nth-child(2n){background-color:#f8f8f8}body img{max-width:100%;-moz-box-sizing:border-box;box-sizing:border-box;page-break-inside:avoid}body code{padding:0;padding-top:.2em;padding-bottom:.2em;margin:0;font-size:85%;background-color:#f7f7f7;border-radius:3px}body code:before,body code:after{letter-spacing:-0.2em;content:"\00a0"}body pre>code{padding:0;margin:0;font-size:100%;white-space:pre;background:transparent;border:0}body .highlight pre,body pre{padding:16px;overflow:auto;font-size:85%;line-height:1.45;background-color:#f7f7f7;border:0;border-radius:3px}body pre{word-wrap:normal}body pre code{display:inline;max-width:initial;padding:0;margin:0;overflow:initial;line-height:inherit;word-wrap:normal;background-color:transparent;border:0}body pre code:before,body pre code:after{content:normal}body .highlight{background:#fff} -------------------------------------------------------------------------------- /_book/gitbook/style.css: -------------------------------------------------------------------------------- 1 | article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block}audio,canvas,video{display:inline-block}audio:not([controls]){display:none;height:0}[hidden]{display:none}html{font-family:sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{margin:0}a:focus{outline:thin dotted}a:active,a:hover{outline:0}h1{font-size:2em;margin:.67em 0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:bold}dfn{font-style:italic}hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0}mark{background:#ff0;color:#000}code,kbd,pre,samp{font-family:monospace,serif;font-size:1em}pre{white-space:pre-wrap}q{quotes:"\201C" "\201D" "\2018" "\2019"}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-0.5em}sub{bottom:-0.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:0}fieldset{border:1px solid #c0c0c0;margin:0 2px;padding:.35em .625em .75em}legend{border:0;padding:0}button,input,select,textarea{font-family:inherit;font-size:100%;margin:0}button,input{line-height:normal}button,select{text-transform:none}button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}input[type="checkbox"],input[type="radio"]{box-sizing:border-box;padding:0}input[type="search"]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}textarea{overflow:auto;vertical-align:top}table{border-collapse:collapse;border-spacing:0}@font-face{font-family:'FontAwesome';src:url('.//fonts/fontawesome/fontawesome-webfont.eot?v=4.1.0');src:url('.//fonts/fontawesome/fontawesome-webfont.eot?#iefix&v=4.1.0') format('embedded-opentype'),url('.//fonts/fontawesome/fontawesome-webfont.woff?v=4.1.0') format('woff'),url('.//fonts/fontawesome/fontawesome-webfont.ttf?v=4.1.0') format('truetype'),url('.//fonts/fontawesome/fontawesome-webfont.svg?v=4.1.0#fontawesomeregular') format('svg');font-weight:normal;font-style:normal}.fa{display:inline-block;font-family:FontAwesome;font-style:normal;font-weight:normal;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fa-lg{font-size:1.3333333333333333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.2857142857142858em;text-align:center}.fa-ul{padding-left:0;margin-left:2.142857142857143em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.142857142857143em;width:2.142857142857143em;top:.14285714285714285em;text-align:center}.fa-li.fa-lg{left:-1.8571428571428572em}.fa-border{padding:.2em .25em .15em;border:solid .08em #eee;border-radius:.1em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left{margin-right:.3em}.fa.pull-right{margin-left:.3em}.fa-spin{-webkit-animation:spin 2s infinite linear;-moz-animation:spin 2s infinite linear;-o-animation:spin 2s infinite linear;animation:spin 2s infinite linear}@-moz-keyframes spin{0%{-moz-transform:rotate(0deg)}100%{-moz-transform:rotate(359deg)}}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg)}}@-o-keyframes spin{0%{-o-transform:rotate(0deg)}100%{-o-transform:rotate(359deg)}}@keyframes spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=1);-webkit-transform:rotate(90deg);-moz-transform:rotate(90deg);-ms-transform:rotate(90deg);-o-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2);-webkit-transform:rotate(180deg);-moz-transform:rotate(180deg);-ms-transform:rotate(180deg);-o-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=3);-webkit-transform:rotate(270deg);-moz-transform:rotate(270deg);-ms-transform:rotate(270deg);-o-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=0,mirror=1);-webkit-transform:scale(-1,1);-moz-transform:scale(-1,1);-ms-transform:scale(-1,1);-o-transform:scale(-1,1);transform:scale(-1,1)}.fa-flip-vertical{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2,mirror=1);-webkit-transform:scale(1,-1);-moz-transform:scale(1,-1);-ms-transform:scale(1,-1);-o-transform:scale(1,-1);transform:scale(1,-1)}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:"\f000"}.fa-music:before{content:"\f001"}.fa-search:before{content:"\f002"}.fa-envelope-o:before{content:"\f003"}.fa-heart:before{content:"\f004"}.fa-star:before{content:"\f005"}.fa-star-o:before{content:"\f006"}.fa-user:before{content:"\f007"}.fa-film:before{content:"\f008"}.fa-th-large:before{content:"\f009"}.fa-th:before{content:"\f00a"}.fa-th-list:before{content:"\f00b"}.fa-check:before{content:"\f00c"}.fa-times:before{content:"\f00d"}.fa-search-plus:before{content:"\f00e"}.fa-search-minus:before{content:"\f010"}.fa-power-off:before{content:"\f011"}.fa-signal:before{content:"\f012"}.fa-gear:before,.fa-cog:before{content:"\f013"}.fa-trash-o:before{content:"\f014"}.fa-home:before{content:"\f015"}.fa-file-o:before{content:"\f016"}.fa-clock-o:before{content:"\f017"}.fa-road:before{content:"\f018"}.fa-download:before{content:"\f019"}.fa-arrow-circle-o-down:before{content:"\f01a"}.fa-arrow-circle-o-up:before{content:"\f01b"}.fa-inbox:before{content:"\f01c"}.fa-play-circle-o:before{content:"\f01d"}.fa-rotate-right:before,.fa-repeat:before{content:"\f01e"}.fa-refresh:before{content:"\f021"}.fa-list-alt:before{content:"\f022"}.fa-lock:before{content:"\f023"}.fa-flag:before{content:"\f024"}.fa-headphones:before{content:"\f025"}.fa-volume-off:before{content:"\f026"}.fa-volume-down:before{content:"\f027"}.fa-volume-up:before{content:"\f028"}.fa-qrcode:before{content:"\f029"}.fa-barcode:before{content:"\f02a"}.fa-tag:before{content:"\f02b"}.fa-tags:before{content:"\f02c"}.fa-book:before{content:"\f02d"}.fa-bookmark:before{content:"\f02e"}.fa-print:before{content:"\f02f"}.fa-camera:before{content:"\f030"}.fa-font:before{content:"\f031"}.fa-bold:before{content:"\f032"}.fa-italic:before{content:"\f033"}.fa-text-height:before{content:"\f034"}.fa-text-width:before{content:"\f035"}.fa-align-left:before{content:"\f036"}.fa-align-center:before{content:"\f037"}.fa-align-right:before{content:"\f038"}.fa-align-justify:before{content:"\f039"}.fa-list:before{content:"\f03a"}.fa-dedent:before,.fa-outdent:before{content:"\f03b"}.fa-indent:before{content:"\f03c"}.fa-video-camera:before{content:"\f03d"}.fa-photo:before,.fa-image:before,.fa-picture-o:before{content:"\f03e"}.fa-pencil:before{content:"\f040"}.fa-map-marker:before{content:"\f041"}.fa-adjust:before{content:"\f042"}.fa-tint:before{content:"\f043"}.fa-edit:before,.fa-pencil-square-o:before{content:"\f044"}.fa-share-square-o:before{content:"\f045"}.fa-check-square-o:before{content:"\f046"}.fa-arrows:before{content:"\f047"}.fa-step-backward:before{content:"\f048"}.fa-fast-backward:before{content:"\f049"}.fa-backward:before{content:"\f04a"}.fa-play:before{content:"\f04b"}.fa-pause:before{content:"\f04c"}.fa-stop:before{content:"\f04d"}.fa-forward:before{content:"\f04e"}.fa-fast-forward:before{content:"\f050"}.fa-step-forward:before{content:"\f051"}.fa-eject:before{content:"\f052"}.fa-chevron-left:before{content:"\f053"}.fa-chevron-right:before{content:"\f054"}.fa-plus-circle:before{content:"\f055"}.fa-minus-circle:before{content:"\f056"}.fa-times-circle:before{content:"\f057"}.fa-check-circle:before{content:"\f058"}.fa-question-circle:before{content:"\f059"}.fa-info-circle:before{content:"\f05a"}.fa-crosshairs:before{content:"\f05b"}.fa-times-circle-o:before{content:"\f05c"}.fa-check-circle-o:before{content:"\f05d"}.fa-ban:before{content:"\f05e"}.fa-arrow-left:before{content:"\f060"}.fa-arrow-right:before{content:"\f061"}.fa-arrow-up:before{content:"\f062"}.fa-arrow-down:before{content:"\f063"}.fa-mail-forward:before,.fa-share:before{content:"\f064"}.fa-expand:before{content:"\f065"}.fa-compress:before{content:"\f066"}.fa-plus:before{content:"\f067"}.fa-minus:before{content:"\f068"}.fa-asterisk:before{content:"\f069"}.fa-exclamation-circle:before{content:"\f06a"}.fa-gift:before{content:"\f06b"}.fa-leaf:before{content:"\f06c"}.fa-fire:before{content:"\f06d"}.fa-eye:before{content:"\f06e"}.fa-eye-slash:before{content:"\f070"}.fa-warning:before,.fa-exclamation-triangle:before{content:"\f071"}.fa-plane:before{content:"\f072"}.fa-calendar:before{content:"\f073"}.fa-random:before{content:"\f074"}.fa-comment:before{content:"\f075"}.fa-magnet:before{content:"\f076"}.fa-chevron-up:before{content:"\f077"}.fa-chevron-down:before{content:"\f078"}.fa-retweet:before{content:"\f079"}.fa-shopping-cart:before{content:"\f07a"}.fa-folder:before{content:"\f07b"}.fa-folder-open:before{content:"\f07c"}.fa-arrows-v:before{content:"\f07d"}.fa-arrows-h:before{content:"\f07e"}.fa-bar-chart-o:before{content:"\f080"}.fa-twitter-square:before{content:"\f081"}.fa-facebook-square:before{content:"\f082"}.fa-camera-retro:before{content:"\f083"}.fa-key:before{content:"\f084"}.fa-gears:before,.fa-cogs:before{content:"\f085"}.fa-comments:before{content:"\f086"}.fa-thumbs-o-up:before{content:"\f087"}.fa-thumbs-o-down:before{content:"\f088"}.fa-star-half:before{content:"\f089"}.fa-heart-o:before{content:"\f08a"}.fa-sign-out:before{content:"\f08b"}.fa-linkedin-square:before{content:"\f08c"}.fa-thumb-tack:before{content:"\f08d"}.fa-external-link:before{content:"\f08e"}.fa-sign-in:before{content:"\f090"}.fa-trophy:before{content:"\f091"}.fa-github-square:before{content:"\f092"}.fa-upload:before{content:"\f093"}.fa-lemon-o:before{content:"\f094"}.fa-phone:before{content:"\f095"}.fa-square-o:before{content:"\f096"}.fa-bookmark-o:before{content:"\f097"}.fa-phone-square:before{content:"\f098"}.fa-twitter:before{content:"\f099"}.fa-facebook:before{content:"\f09a"}.fa-github:before{content:"\f09b"}.fa-unlock:before{content:"\f09c"}.fa-credit-card:before{content:"\f09d"}.fa-rss:before{content:"\f09e"}.fa-hdd-o:before{content:"\f0a0"}.fa-bullhorn:before{content:"\f0a1"}.fa-bell:before{content:"\f0f3"}.fa-certificate:before{content:"\f0a3"}.fa-hand-o-right:before{content:"\f0a4"}.fa-hand-o-left:before{content:"\f0a5"}.fa-hand-o-up:before{content:"\f0a6"}.fa-hand-o-down:before{content:"\f0a7"}.fa-arrow-circle-left:before{content:"\f0a8"}.fa-arrow-circle-right:before{content:"\f0a9"}.fa-arrow-circle-up:before{content:"\f0aa"}.fa-arrow-circle-down:before{content:"\f0ab"}.fa-globe:before{content:"\f0ac"}.fa-wrench:before{content:"\f0ad"}.fa-tasks:before{content:"\f0ae"}.fa-filter:before{content:"\f0b0"}.fa-briefcase:before{content:"\f0b1"}.fa-arrows-alt:before{content:"\f0b2"}.fa-group:before,.fa-users:before{content:"\f0c0"}.fa-chain:before,.fa-link:before{content:"\f0c1"}.fa-cloud:before{content:"\f0c2"}.fa-flask:before{content:"\f0c3"}.fa-cut:before,.fa-scissors:before{content:"\f0c4"}.fa-copy:before,.fa-files-o:before{content:"\f0c5"}.fa-paperclip:before{content:"\f0c6"}.fa-save:before,.fa-floppy-o:before{content:"\f0c7"}.fa-square:before{content:"\f0c8"}.fa-navicon:before,.fa-reorder:before,.fa-bars:before{content:"\f0c9"}.fa-list-ul:before{content:"\f0ca"}.fa-list-ol:before{content:"\f0cb"}.fa-strikethrough:before{content:"\f0cc"}.fa-underline:before{content:"\f0cd"}.fa-table:before{content:"\f0ce"}.fa-magic:before{content:"\f0d0"}.fa-truck:before{content:"\f0d1"}.fa-pinterest:before{content:"\f0d2"}.fa-pinterest-square:before{content:"\f0d3"}.fa-google-plus-square:before{content:"\f0d4"}.fa-google-plus:before{content:"\f0d5"}.fa-money:before{content:"\f0d6"}.fa-caret-down:before{content:"\f0d7"}.fa-caret-up:before{content:"\f0d8"}.fa-caret-left:before{content:"\f0d9"}.fa-caret-right:before{content:"\f0da"}.fa-columns:before{content:"\f0db"}.fa-unsorted:before,.fa-sort:before{content:"\f0dc"}.fa-sort-down:before,.fa-sort-desc:before{content:"\f0dd"}.fa-sort-up:before,.fa-sort-asc:before{content:"\f0de"}.fa-envelope:before{content:"\f0e0"}.fa-linkedin:before{content:"\f0e1"}.fa-rotate-left:before,.fa-undo:before{content:"\f0e2"}.fa-legal:before,.fa-gavel:before{content:"\f0e3"}.fa-dashboard:before,.fa-tachometer:before{content:"\f0e4"}.fa-comment-o:before{content:"\f0e5"}.fa-comments-o:before{content:"\f0e6"}.fa-flash:before,.fa-bolt:before{content:"\f0e7"}.fa-sitemap:before{content:"\f0e8"}.fa-umbrella:before{content:"\f0e9"}.fa-paste:before,.fa-clipboard:before{content:"\f0ea"}.fa-lightbulb-o:before{content:"\f0eb"}.fa-exchange:before{content:"\f0ec"}.fa-cloud-download:before{content:"\f0ed"}.fa-cloud-upload:before{content:"\f0ee"}.fa-user-md:before{content:"\f0f0"}.fa-stethoscope:before{content:"\f0f1"}.fa-suitcase:before{content:"\f0f2"}.fa-bell-o:before{content:"\f0a2"}.fa-coffee:before{content:"\f0f4"}.fa-cutlery:before{content:"\f0f5"}.fa-file-text-o:before{content:"\f0f6"}.fa-building-o:before{content:"\f0f7"}.fa-hospital-o:before{content:"\f0f8"}.fa-ambulance:before{content:"\f0f9"}.fa-medkit:before{content:"\f0fa"}.fa-fighter-jet:before{content:"\f0fb"}.fa-beer:before{content:"\f0fc"}.fa-h-square:before{content:"\f0fd"}.fa-plus-square:before{content:"\f0fe"}.fa-angle-double-left:before{content:"\f100"}.fa-angle-double-right:before{content:"\f101"}.fa-angle-double-up:before{content:"\f102"}.fa-angle-double-down:before{content:"\f103"}.fa-angle-left:before{content:"\f104"}.fa-angle-right:before{content:"\f105"}.fa-angle-up:before{content:"\f106"}.fa-angle-down:before{content:"\f107"}.fa-desktop:before{content:"\f108"}.fa-laptop:before{content:"\f109"}.fa-tablet:before{content:"\f10a"}.fa-mobile-phone:before,.fa-mobile:before{content:"\f10b"}.fa-circle-o:before{content:"\f10c"}.fa-quote-left:before{content:"\f10d"}.fa-quote-right:before{content:"\f10e"}.fa-spinner:before{content:"\f110"}.fa-circle:before{content:"\f111"}.fa-mail-reply:before,.fa-reply:before{content:"\f112"}.fa-github-alt:before{content:"\f113"}.fa-folder-o:before{content:"\f114"}.fa-folder-open-o:before{content:"\f115"}.fa-smile-o:before{content:"\f118"}.fa-frown-o:before{content:"\f119"}.fa-meh-o:before{content:"\f11a"}.fa-gamepad:before{content:"\f11b"}.fa-keyboard-o:before{content:"\f11c"}.fa-flag-o:before{content:"\f11d"}.fa-flag-checkered:before{content:"\f11e"}.fa-terminal:before{content:"\f120"}.fa-code:before{content:"\f121"}.fa-mail-reply-all:before,.fa-reply-all:before{content:"\f122"}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:"\f123"}.fa-location-arrow:before{content:"\f124"}.fa-crop:before{content:"\f125"}.fa-code-fork:before{content:"\f126"}.fa-unlink:before,.fa-chain-broken:before{content:"\f127"}.fa-question:before{content:"\f128"}.fa-info:before{content:"\f129"}.fa-exclamation:before{content:"\f12a"}.fa-superscript:before{content:"\f12b"}.fa-subscript:before{content:"\f12c"}.fa-eraser:before{content:"\f12d"}.fa-puzzle-piece:before{content:"\f12e"}.fa-microphone:before{content:"\f130"}.fa-microphone-slash:before{content:"\f131"}.fa-shield:before{content:"\f132"}.fa-calendar-o:before{content:"\f133"}.fa-fire-extinguisher:before{content:"\f134"}.fa-rocket:before{content:"\f135"}.fa-maxcdn:before{content:"\f136"}.fa-chevron-circle-left:before{content:"\f137"}.fa-chevron-circle-right:before{content:"\f138"}.fa-chevron-circle-up:before{content:"\f139"}.fa-chevron-circle-down:before{content:"\f13a"}.fa-html5:before{content:"\f13b"}.fa-css3:before{content:"\f13c"}.fa-anchor:before{content:"\f13d"}.fa-unlock-alt:before{content:"\f13e"}.fa-bullseye:before{content:"\f140"}.fa-ellipsis-h:before{content:"\f141"}.fa-ellipsis-v:before{content:"\f142"}.fa-rss-square:before{content:"\f143"}.fa-play-circle:before{content:"\f144"}.fa-ticket:before{content:"\f145"}.fa-minus-square:before{content:"\f146"}.fa-minus-square-o:before{content:"\f147"}.fa-level-up:before{content:"\f148"}.fa-level-down:before{content:"\f149"}.fa-check-square:before{content:"\f14a"}.fa-pencil-square:before{content:"\f14b"}.fa-external-link-square:before{content:"\f14c"}.fa-share-square:before{content:"\f14d"}.fa-compass:before{content:"\f14e"}.fa-toggle-down:before,.fa-caret-square-o-down:before{content:"\f150"}.fa-toggle-up:before,.fa-caret-square-o-up:before{content:"\f151"}.fa-toggle-right:before,.fa-caret-square-o-right:before{content:"\f152"}.fa-euro:before,.fa-eur:before{content:"\f153"}.fa-gbp:before{content:"\f154"}.fa-dollar:before,.fa-usd:before{content:"\f155"}.fa-rupee:before,.fa-inr:before{content:"\f156"}.fa-cny:before,.fa-rmb:before,.fa-yen:before,.fa-jpy:before{content:"\f157"}.fa-ruble:before,.fa-rouble:before,.fa-rub:before{content:"\f158"}.fa-won:before,.fa-krw:before{content:"\f159"}.fa-bitcoin:before,.fa-btc:before{content:"\f15a"}.fa-file:before{content:"\f15b"}.fa-file-text:before{content:"\f15c"}.fa-sort-alpha-asc:before{content:"\f15d"}.fa-sort-alpha-desc:before{content:"\f15e"}.fa-sort-amount-asc:before{content:"\f160"}.fa-sort-amount-desc:before{content:"\f161"}.fa-sort-numeric-asc:before{content:"\f162"}.fa-sort-numeric-desc:before{content:"\f163"}.fa-thumbs-up:before{content:"\f164"}.fa-thumbs-down:before{content:"\f165"}.fa-youtube-square:before{content:"\f166"}.fa-youtube:before{content:"\f167"}.fa-xing:before{content:"\f168"}.fa-xing-square:before{content:"\f169"}.fa-youtube-play:before{content:"\f16a"}.fa-dropbox:before{content:"\f16b"}.fa-stack-overflow:before{content:"\f16c"}.fa-instagram:before{content:"\f16d"}.fa-flickr:before{content:"\f16e"}.fa-adn:before{content:"\f170"}.fa-bitbucket:before{content:"\f171"}.fa-bitbucket-square:before{content:"\f172"}.fa-tumblr:before{content:"\f173"}.fa-tumblr-square:before{content:"\f174"}.fa-long-arrow-down:before{content:"\f175"}.fa-long-arrow-up:before{content:"\f176"}.fa-long-arrow-left:before{content:"\f177"}.fa-long-arrow-right:before{content:"\f178"}.fa-apple:before{content:"\f179"}.fa-windows:before{content:"\f17a"}.fa-android:before{content:"\f17b"}.fa-linux:before{content:"\f17c"}.fa-dribbble:before{content:"\f17d"}.fa-skype:before{content:"\f17e"}.fa-foursquare:before{content:"\f180"}.fa-trello:before{content:"\f181"}.fa-female:before{content:"\f182"}.fa-male:before{content:"\f183"}.fa-gittip:before{content:"\f184"}.fa-sun-o:before{content:"\f185"}.fa-moon-o:before{content:"\f186"}.fa-archive:before{content:"\f187"}.fa-bug:before{content:"\f188"}.fa-vk:before{content:"\f189"}.fa-weibo:before{content:"\f18a"}.fa-renren:before{content:"\f18b"}.fa-pagelines:before{content:"\f18c"}.fa-stack-exchange:before{content:"\f18d"}.fa-arrow-circle-o-right:before{content:"\f18e"}.fa-arrow-circle-o-left:before{content:"\f190"}.fa-toggle-left:before,.fa-caret-square-o-left:before{content:"\f191"}.fa-dot-circle-o:before{content:"\f192"}.fa-wheelchair:before{content:"\f193"}.fa-vimeo-square:before{content:"\f194"}.fa-turkish-lira:before,.fa-try:before{content:"\f195"}.fa-plus-square-o:before{content:"\f196"}.fa-space-shuttle:before{content:"\f197"}.fa-slack:before{content:"\f198"}.fa-envelope-square:before{content:"\f199"}.fa-wordpress:before{content:"\f19a"}.fa-openid:before{content:"\f19b"}.fa-institution:before,.fa-bank:before,.fa-university:before{content:"\f19c"}.fa-mortar-board:before,.fa-graduation-cap:before{content:"\f19d"}.fa-yahoo:before{content:"\f19e"}.fa-google:before{content:"\f1a0"}.fa-reddit:before{content:"\f1a1"}.fa-reddit-square:before{content:"\f1a2"}.fa-stumbleupon-circle:before{content:"\f1a3"}.fa-stumbleupon:before{content:"\f1a4"}.fa-delicious:before{content:"\f1a5"}.fa-digg:before{content:"\f1a6"}.fa-pied-piper-square:before,.fa-pied-piper:before{content:"\f1a7"}.fa-pied-piper-alt:before{content:"\f1a8"}.fa-drupal:before{content:"\f1a9"}.fa-joomla:before{content:"\f1aa"}.fa-language:before{content:"\f1ab"}.fa-fax:before{content:"\f1ac"}.fa-building:before{content:"\f1ad"}.fa-child:before{content:"\f1ae"}.fa-paw:before{content:"\f1b0"}.fa-spoon:before{content:"\f1b1"}.fa-cube:before{content:"\f1b2"}.fa-cubes:before{content:"\f1b3"}.fa-behance:before{content:"\f1b4"}.fa-behance-square:before{content:"\f1b5"}.fa-steam:before{content:"\f1b6"}.fa-steam-square:before{content:"\f1b7"}.fa-recycle:before{content:"\f1b8"}.fa-automobile:before,.fa-car:before{content:"\f1b9"}.fa-cab:before,.fa-taxi:before{content:"\f1ba"}.fa-tree:before{content:"\f1bb"}.fa-spotify:before{content:"\f1bc"}.fa-deviantart:before{content:"\f1bd"}.fa-soundcloud:before{content:"\f1be"}.fa-database:before{content:"\f1c0"}.fa-file-pdf-o:before{content:"\f1c1"}.fa-file-word-o:before{content:"\f1c2"}.fa-file-excel-o:before{content:"\f1c3"}.fa-file-powerpoint-o:before{content:"\f1c4"}.fa-file-photo-o:before,.fa-file-picture-o:before,.fa-file-image-o:before{content:"\f1c5"}.fa-file-zip-o:before,.fa-file-archive-o:before{content:"\f1c6"}.fa-file-sound-o:before,.fa-file-audio-o:before{content:"\f1c7"}.fa-file-movie-o:before,.fa-file-video-o:before{content:"\f1c8"}.fa-file-code-o:before{content:"\f1c9"}.fa-vine:before{content:"\f1ca"}.fa-codepen:before{content:"\f1cb"}.fa-jsfiddle:before{content:"\f1cc"}.fa-life-bouy:before,.fa-life-saver:before,.fa-support:before,.fa-life-ring:before{content:"\f1cd"}.fa-circle-o-notch:before{content:"\f1ce"}.fa-ra:before,.fa-rebel:before{content:"\f1d0"}.fa-ge:before,.fa-empire:before{content:"\f1d1"}.fa-git-square:before{content:"\f1d2"}.fa-git:before{content:"\f1d3"}.fa-hacker-news:before{content:"\f1d4"}.fa-tencent-weibo:before{content:"\f1d5"}.fa-qq:before{content:"\f1d6"}.fa-wechat:before,.fa-weixin:before{content:"\f1d7"}.fa-send:before,.fa-paper-plane:before{content:"\f1d8"}.fa-send-o:before,.fa-paper-plane-o:before{content:"\f1d9"}.fa-history:before{content:"\f1da"}.fa-circle-thin:before{content:"\f1db"}.fa-header:before{content:"\f1dc"}.fa-paragraph:before{content:"\f1dd"}.fa-sliders:before{content:"\f1de"}.fa-share-alt:before{content:"\f1e0"}.fa-share-alt-square:before{content:"\f1e1"}.fa-bomb:before{content:"\f1e2"}.link-inherit{color:inherit}.link-inherit:hover,.link-inherit:focus{color:inherit}.hidden{display:none}@font-face{font-family:'Merriweather';font-style:normal;font-weight:250;src:local('Merriweather Light'),url('.//fonts/merriweather/250.woff') format('woff')}@font-face{font-family:'Merriweather';font-style:italic;font-weight:250;src:local('Merriweather Light Italic'),url('.//fonts/merriweather/250i.woff') format('woff')}@font-face{font-family:'Merriweather';font-style:normal;font-weight:400;src:local('Merriweather'),url('.//fonts/merriweather/400.woff') format('woff')}@font-face{font-family:'Merriweather';font-style:italic;font-weight:400;src:local('Merriweather Italic'),url('.//fonts/merriweather/400i.woff') format('woff')}@font-face{font-family:'Merriweather';font-style:normal;font-weight:700;src:local('Merriweather Bold'),url('.//fonts/merriweather/700.woff') format('woff')}@font-face{font-family:'Merriweather';font-style:italic;font-weight:700;src:local('Merriweather Bold Italic'),url('.//fonts/merriweather/700i.woff') format('woff')}@font-face{font-family:'Merriweather';font-style:normal;font-weight:900;src:local('Merriweather Heavy'),url('.//fonts/merriweather/900.woff') format('woff')}@font-face{font-family:'Merriweather';font-style:italic;font-weight:900;src:local('Merriweather Heavy Italic'),url('.//fonts/merriweather/900i.woff') format('woff')}@font-face{font-family:'Open Sans';font-style:normal;font-weight:300;src:local('Open Sans Light'),url('.//fonts/opensans/300.woff') format('woff')}@font-face{font-family:'Open Sans';font-style:italic;font-weight:300;src:local('Open Sans Light Italic'),url('.//fonts/opensans/300i.woff') format('woff')}@font-face{font-family:'Open Sans';font-style:normal;font-weight:400;src:local('Open Sans Regular'),url('.//fonts/opensans/400.woff') format('woff')}@font-face{font-family:'Open Sans';font-style:italic;font-weight:400;src:local('Open Sans Italic'),url('.//fonts/opensans/400i.woff') format('woff')}@font-face{font-family:'Open Sans';font-style:normal;font-weight:600;src:local('Open Sans Semibold'),url('.//fonts/opensans/600.woff') format('woff')}@font-face{font-family:'Open Sans';font-style:italic;font-weight:600;src:local('Open Sans Semibold Italic'),url('.//fonts/opensans/600i.woff') format('woff')}@font-face{font-family:'Open Sans';font-style:normal;font-weight:700;src:local('Open Sans Bold'),url('.//fonts/opensans/700.woff') format('woff')}@font-face{font-family:'Open Sans';font-style:italic;font-weight:700;src:local('Open Sans Bold Italic'),url('.//fonts/opensans/700i.woff') format('woff')}.book-langs-index{width:100%;height:100%;padding:40px 0;margin:0;overflow:auto}@media(max-width:600px){.book-langs-index{padding:0}}.book-langs-index .inner{max-width:600px;width:100%;margin:0 auto;padding:30px;background:#fff;border-radius:3px}.book-langs-index .inner h3{margin:0}.book-langs-index .inner .languages{list-style:none;padding:20px 30px;margin-top:20px;border-top:1px solid #eee;*zoom:1}.book-langs-index .inner .languages:before,.book-langs-index .inner .languages:after{content:" ";display:table;line-height:0}.book-langs-index .inner .languages:after{clear:both}.book-langs-index .inner .languages li{width:50%;float:left;padding:10px 5px;font-size:16px}@media(max-width:600px){.book-langs-index .inner .languages li{width:100%;max-width:100%}}.book .book-header{font-family:"Open Sans","Clear Sans","Helvetica Neue",Helvetica,Arial,sans-serif;overflow:visible;height:50px;padding:0 8px;z-index:2;font-size:.85em;color:#7e888b;background:transparent}.book .book-header .btn{display:block;height:50px;padding:0 15px;border-bottom:0;color:#ccc;text-transform:uppercase;line-height:50px;-webkit-box-shadow:none!important;box-shadow:none!important;position:relative;font-size:14px}.book .book-header .btn:hover{position:relative;text-decoration:none;color:#444;background:0}.book .book-header h1{margin:0;font-size:20px;font-weight:200;text-align:center;line-height:50px;opacity:0;-webkit-transition:opacity ease .4s;-moz-transition:opacity ease .4s;-o-transition:opacity ease .4s;transition:opacity ease .4s;padding-left:200px;padding-right:200px;-webkit-transition:opacity .2s ease;-moz-transition:opacity .2s ease;-o-transition:opacity .2s ease;transition:opacity .2s ease;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.book .book-header h1 a,.book .book-header h1 a:hover{color:inherit;text-decoration:none}@media(max-width:1000px){.book .book-header h1{display:none}}.book .book-header h1 i{display:none}.book .book-header:hover h1{opacity:1}.book.is-loading .book-header h1 i{display:inline-block}.book.is-loading .book-header h1 a{display:none}.book.color-theme-1 .book-header{color:#afa790;background:transparent}.book.color-theme-1 .book-header .btn{color:#afa790}.book.color-theme-1 .book-header .btn:hover{color:#73553c;background:0}.book.color-theme-1 .book-header h1{color:#704214}.book.color-theme-2 .book-header{color:#7e888b;background:transparent}.book.color-theme-2 .book-header .btn{color:#7e888b}.book.color-theme-2 .book-header .btn:hover{color:#c9c9c9;background:0}.book.color-theme-2 .book-header h1{color:#a4b1b1}.dropdown{position:relative}.dropdown-menu{position:absolute;top:100%;left:0;z-index:100;display:none;float:left;min-width:160px;padding:0;margin:2px 0 0;list-style:none;font-size:14px;background-color:#fafafa;border:1px solid rgba(0,0,0,0.07);border-radius:1px;-webkit-box-shadow:0 6px 12px rgba(0,0,0,0.175);box-shadow:0 6px 12px rgba(0,0,0,0.175);background-clip:padding-box}.dropdown-menu.open{display:block}.dropdown-menu.dropdown-left{left:auto;right:4%}.dropdown-menu.dropdown-left .dropdown-caret{right:14px;left:auto}.dropdown-menu .dropdown-caret{position:absolute;top:-8px;left:14px;width:18px;height:10px;float:left;overflow:hidden}.dropdown-menu .dropdown-caret .caret-outer{position:absolute;border-left:9px solid transparent;border-right:9px solid transparent;border-bottom:9px solid rgba(0,0,0,0.1);height:auto;left:0;top:0;width:auto;display:inline-block;margin-left:-1px}.dropdown-menu .dropdown-caret .caret-inner{position:absolute;display:inline-block;margin-top:-1px;top:0;top:1px;border-left:9px solid transparent;border-right:9px solid transparent;border-bottom:9px solid #fafafa}.dropdown-menu .buttons{*zoom:1;border-bottom:1px solid rgba(0,0,0,0.07)}.dropdown-menu .buttons:before,.dropdown-menu .buttons:after{content:" ";display:table;line-height:0}.dropdown-menu .buttons:after{clear:both}.dropdown-menu .buttons:last-child{border-bottom:0}.dropdown-menu .buttons .button{border:0;background-color:transparent;color:#a6a6a6;width:100%;text-align:center;float:left;line-height:1.428571429;padding:8px 4px}.dropdown-menu .buttons .button:hover{color:#444}.dropdown-menu .buttons .button:focus,.dropdown-menu .buttons .button:hover{outline:0}.dropdown-menu .buttons .button.size-2{width:50%}.dropdown-menu .buttons .button.size-3{width:33%}.color-theme-1 .dropdown-menu{background-color:#111;border-color:rgba(0,0,0,0.07)}.color-theme-1 .dropdown-menu .dropdown-caret .caret-inner{border-bottom:9px solid #111}.color-theme-1 .dropdown-menu .buttons{border-color:rgba(0,0,0,0.07)}.color-theme-1 .dropdown-menu .button{color:#afa790}.color-theme-1 .dropdown-menu .button:hover{color:#73553c}.color-theme-2 .dropdown-menu{background-color:#111;border-color:#1d1f21}.color-theme-2 .dropdown-menu .dropdown-caret .caret-inner{border-bottom:9px solid #111}.color-theme-2 .dropdown-menu .buttons{border-color:#1d1f21}.color-theme-2 .dropdown-menu .button{color:#7e888b}.color-theme-2 .dropdown-menu .button:hover{color:#c9c9c9}.alert{padding:15px;margin-bottom:20px;color:#444;background:#eee;border-bottom:5px solid #ddd}.alert-success{background:#dff0d8;border-color:#d6e9c6;color:#3c763d}.alert-info{background:#d9edf7;border-color:#bce8f1;color:#31708f}.alert-danger{background:#f2dede;border-color:#ebccd1;color:#a94442}.alert-warning{background:#fcf8e3;border-color:#faebcc;color:#8a6d3b}.book .book-summary{font-family:"Open Sans","Clear Sans","Helvetica Neue",Helvetica,Arial,sans-serif;position:absolute;top:0;left:-300px;bottom:0;z-index:1;width:300px;color:#364149;background:#fafafa;border-right:1px solid rgba(0,0,0,0.07);-webkit-transition:left 250ms ease;-moz-transition:left 250ms ease;-o-transition:left 250ms ease;transition:left 250ms ease}.book .book-summary .book-search{padding:6px;background:transparent;position:absolute;top:-50px;left:0;right:0;-webkit-transition:top .5s ease;-moz-transition:top .5s ease;-o-transition:top .5s ease;transition:top .5s ease}.book .book-summary .book-search input,.book .book-summary .book-search input:focus,.book .book-summary .book-search input:hover{width:100%;background:transparent;border:1px solid transparent;-webkit-box-shadow:none;box-shadow:none;outline:0;line-height:22px;padding:7px 4px;color:inherit}.book .book-summary ul.summary{position:absolute;top:0;left:0;right:0;bottom:0;overflow-y:auto;list-style:none;margin:0;padding:0;-webkit-transition:top .5s ease;-moz-transition:top .5s ease;-o-transition:top .5s ease;transition:top .5s ease}.book .book-summary ul.summary li{list-style:none}.book .book-summary ul.summary li.divider{height:1px;margin:7px 0;overflow:hidden;background:rgba(0,0,0,0.07)}.book .book-summary ul.summary li i.fa-check{display:none;position:absolute;right:9px;top:16px;font-size:9px;color:#3c3}.book .book-summary ul.summary li.done>a{color:#364149;font-weight:normal}.book .book-summary ul.summary li.done>a i{display:inline}.book .book-summary ul.summary li a,.book .book-summary ul.summary li span{display:block;padding:10px 15px;border-bottom:0;color:#364149;background:transparent;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;position:relative}.book .book-summary ul.summary li span{cursor:not-allowed;opacity:.3;filter:alpha(opacity=30)}.book .book-summary ul.summary li.active>a,.book .book-summary ul.summary li a:hover{color:#008cff;background:transparent;text-decoration:none}.book .book-summary ul.summary li ul{padding-left:20px}@media(max-width:600px){.book .book-summary{width:calc(100% - 60px);bottom:0;left:-100%}}.book.with-summary .book-summary{left:0}.book.without-animation .book-summary{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;transition:none!important}.book.with-search .book-summary .book-search{top:0}.book.with-search .book-summary ul.summary{top:50px}.book.color-theme-1 .book-summary{color:#afa790;background:#111}.book.color-theme-1 .book-summary .book-search{background:transparent}.book.color-theme-1 .book-summary .book-search input,.book.color-theme-1 .book-summary .book-search input:focus{border:1px solid transparent}.book.color-theme-1 .book-summary ul.summary li.divider{background:rgba(0,0,0,0.07);box-shadow:none}.book.color-theme-1 .book-summary ul.summary li i.fa-check{color:#3c3}.book.color-theme-1 .book-summary ul.summary li.done>a{color:#877f6a}.book.color-theme-1 .book-summary ul.summary li a,.book.color-theme-1 .book-summary ul.summary li span{color:#877f6a;background:transparent}.book.color-theme-1 .book-summary ul.summary li.active>a,.book.color-theme-1 .book-summary ul.summary li a:hover{color:#704214;background:transparent}.book.color-theme-2 .book-summary{color:#c4cdd4;background:#111}.book.color-theme-2 .book-summary .book-search{background:transparent}.book.color-theme-2 .book-summary .book-search input,.book.color-theme-2 .book-summary .book-search input:focus{border:1px solid transparent}.book.color-theme-2 .book-summary ul.summary li.divider{background:#1d1f21;box-shadow:none}.book.color-theme-2 .book-summary ul.summary li i.fa-check{color:#3c3}.book.color-theme-2 .book-summary ul.summary li.done>a{color:#6c8193}.book.color-theme-2 .book-summary ul.summary li a,.book.color-theme-2 .book-summary ul.summary li span{color:#6c8193;background:transparent}.book.color-theme-2 .book-summary ul.summary li.active>a,.book.color-theme-2 .book-summary ul.summary li a:hover{color:#008cff;background:transparent}.book-header #font-settings-wrapper #enlarge-font-size,.book-header #font-settings-wrapper #reduce-font-size{line-height:30px}.book-header #font-settings-wrapper #enlarge-font-size{font-size:1.4em}.book-header #font-settings-wrapper #reduce-font-size{font-size:1em}.book{position:relative;width:100%;height:100%}.book .book-body{position:absolute;top:0;right:0;left:0;bottom:0;overflow-y:auto;color:#000;background:#fff;-webkit-transition:left 250ms ease;-moz-transition:left 250ms ease;-o-transition:left 250ms ease;transition:left 250ms ease}.book .book-body .body-inner{position:absolute;top:0;right:0;left:0;bottom:0;overflow-y:auto}.book .book-body .page-wrapper{position:relative;outline:0}.book .book-body .page-wrapper .page-inner{max-width:800px;margin:0 auto;padding:20px 0 40px 0}.book .book-body .page-wrapper .page-inner section{margin:0;padding:5px 15px;background:#fff;border-radius:2px;line-height:1.6;font-size:1.6rem}.book .book-body .page-wrapper .page-inner .btn-group .btn{border-radius:0;background:#eee;border:0}@media(max-width:1240px){.book .book-body{-webkit-transition:-webkit-transform 250ms ease;-moz-transition:-moz-transform 250ms ease;-o-transition:-o-transform 250ms ease;transition:transform 250ms ease;padding-bottom:20px}.book .book-body .body-inner{position:static;min-height:calc(100% - 50px)}}@media(min-width:600px){.book.with-summary .book-body{left:300px}}@media(max-width:600px){.book.with-summary{overflow:hidden}.book.with-summary .book-body{-webkit-transform:translate(calc(100% - 60px),0px);-moz-transform:translate(calc(100% - 60px),0px);-ms-transform:translate(calc(100% - 60px),0px);-o-transform:translate(calc(100% - 60px),0px);transform:translate(calc(100% - 60px),0px)}}.book.without-animation .book-body{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;transition:none!important}.book.color-theme-1 .book-body{color:#704214;background:#f3eacb}.book.color-theme-1 .book-body .page-wrapper .page-inner section{background:#f3eacb}.book.color-theme-2 .book-body{color:#a4b1b1;background:#1d1f21}.book.color-theme-2 .book-body .page-wrapper .page-inner section{background:#1d1f21}.book.font-size-0 .book-body .page-inner section{font-size:1.2rem}.book.font-size-1 .book-body .page-inner section{font-size:1.4rem}.book.font-size-2 .book-body .page-inner section{font-size:1.6rem}.book.font-size-3 .book-body .page-inner section{font-size:2.2rem}.book.font-size-4 .book-body .page-inner section{font-size:4rem}.book.font-family-0{font-family:"Merriweather",Georgia,serif}.book.font-family-1{font-family:"Open Sans","Clear Sans","Helvetica Neue",Helvetica,Arial,sans-serif}.buttons{*zoom:1}.buttons:before,.buttons:after{content:" ";display:table;line-height:0}.buttons:after{clear:both}.button{border:0;background-color:transparent;background:#eee;color:#666;width:100%;text-align:center;float:left;line-height:1.428571429;padding:8px 4px}.button:hover{color:#444}.button:focus,.button:hover{outline:0}.button.size-2{width:50%}.button.size-3{width:33%}.book .book-body .page-wrapper .page-inner section{display:none}.book .book-body .page-wrapper .page-inner section.normal{-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;line-height:1.4;color:#333;overflow:hidden;line-height:1.6;word-wrap:break-word;display:block}.book .book-body .page-wrapper .page-inner section.normal>*:first-child{margin-top:0!important}.book .book-body .page-wrapper .page-inner section.normal>*:last-child{margin-bottom:0!important}.book .book-body .page-wrapper .page-inner section.normal a{background:transparent}.book .book-body .page-wrapper .page-inner section.normal a:active,.book .book-body .page-wrapper .page-inner section.normal a:hover{outline:0}.book .book-body .page-wrapper .page-inner section.normal strong{font-weight:bold}.book .book-body .page-wrapper .page-inner section.normal h1{font-size:2em;margin:.67em 0}.book .book-body .page-wrapper .page-inner section.normal img{border:0}.book .book-body .page-wrapper .page-inner section.normal hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0}.book .book-body .page-wrapper .page-inner section.normal pre{overflow:auto}.book .book-body .page-wrapper .page-inner section.normal code,.book .book-body .page-wrapper .page-inner section.normal pre{font-family:monospace,monospace;font-size:1em}.book .book-body .page-wrapper .page-inner section.normal table{border-collapse:collapse;border-spacing:0}.book .book-body .page-wrapper .page-inner section.normal td,.book .book-body .page-wrapper .page-inner section.normal th{padding:0}.book .book-body .page-wrapper .page-inner section.normal *{-moz-box-sizing:border-box;box-sizing:border-box}.book .book-body .page-wrapper .page-inner section.normal a{color:#4183c4;text-decoration:none}.book .book-body .page-wrapper .page-inner section.normal a:hover,.book .book-body .page-wrapper .page-inner section.normal a:focus,.book .book-body .page-wrapper .page-inner section.normal a:active{text-decoration:underline}.book .book-body .page-wrapper .page-inner section.normal hr{height:0;margin:15px 0;overflow:hidden;background:transparent;border:0;border-bottom:1px solid #ddd}.book .book-body .page-wrapper .page-inner section.normal hr:before,.book .book-body .page-wrapper .page-inner section.normal hr:after{display:table;content:" "}.book .book-body .page-wrapper .page-inner section.normal hr:after{clear:both}.book .book-body .page-wrapper .page-inner section.normal h1,.book .book-body .page-wrapper .page-inner section.normal h2,.book .book-body .page-wrapper .page-inner section.normal h3,.book .book-body .page-wrapper .page-inner section.normal h4,.book .book-body .page-wrapper .page-inner section.normal h5,.book .book-body .page-wrapper .page-inner section.normal h6{margin-top:15px;margin-bottom:15px;line-height:1.1}.book .book-body .page-wrapper .page-inner section.normal h1{font-size:30px}.book .book-body .page-wrapper .page-inner section.normal h2{font-size:21px}.book .book-body .page-wrapper .page-inner section.normal h3{font-size:16px}.book .book-body .page-wrapper .page-inner section.normal h4{font-size:14px}.book .book-body .page-wrapper .page-inner section.normal h5{font-size:12px}.book .book-body .page-wrapper .page-inner section.normal h6{font-size:11px}.book .book-body .page-wrapper .page-inner section.normal blockquote{margin:0}.book .book-body .page-wrapper .page-inner section.normal ul,.book .book-body .page-wrapper .page-inner section.normal ol{padding:0;margin-top:0;margin-bottom:0}.book .book-body .page-wrapper .page-inner section.normal ol ol{list-style-type:lower-roman}.book .book-body .page-wrapper .page-inner section.normal dd{margin-left:0}.book .book-body .page-wrapper .page-inner section.normal code,.book .book-body .page-wrapper .page-inner section.normal pre{font-family:Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:12px}.book .book-body .page-wrapper .page-inner section.normal pre{margin-top:0;margin-bottom:0}.book .book-body .page-wrapper .page-inner section.normal .markdown-body>*:first-child{margin-top:0!important}.book .book-body .page-wrapper .page-inner section.normal .markdown-body>*:last-child{margin-bottom:0!important}.book .book-body .page-wrapper .page-inner section.normal .anchor{position:absolute;top:0;bottom:0;left:0;display:block;padding-right:6px;padding-left:30px;margin-left:-30px}.book .book-body .page-wrapper .page-inner section.normal .anchor:focus{outline:0}.book .book-body .page-wrapper .page-inner section.normal h1,.book .book-body .page-wrapper .page-inner section.normal h2,.book .book-body .page-wrapper .page-inner section.normal h3,.book .book-body .page-wrapper .page-inner section.normal h4,.book .book-body .page-wrapper .page-inner section.normal h5,.book .book-body .page-wrapper .page-inner section.normal h6{position:relative;margin-top:1em;margin-bottom:16px;font-weight:bold;line-height:1.4}.book .book-body .page-wrapper .page-inner section.normal h1{padding-bottom:.3em;font-size:2.25em;line-height:1.2;border-bottom:1px solid #eee}.book .book-body .page-wrapper .page-inner section.normal h2{padding-bottom:.3em;font-size:1.75em;line-height:1.225;border-bottom:1px solid #eee}.book .book-body .page-wrapper .page-inner section.normal h3{font-size:1.5em;line-height:1.43}.book .book-body .page-wrapper .page-inner section.normal h4{font-size:1.25em}.book .book-body .page-wrapper .page-inner section.normal h5{font-size:1em}.book .book-body .page-wrapper .page-inner section.normal h6{font-size:1em;color:#777}.book .book-body .page-wrapper .page-inner section.normal p,.book .book-body .page-wrapper .page-inner section.normal blockquote,.book .book-body .page-wrapper .page-inner section.normal ul,.book .book-body .page-wrapper .page-inner section.normal ol,.book .book-body .page-wrapper .page-inner section.normal dl,.book .book-body .page-wrapper .page-inner section.normal table,.book .book-body .page-wrapper .page-inner section.normal pre{margin-top:0;margin-bottom:16px}.book .book-body .page-wrapper .page-inner section.normal hr{height:4px;padding:0;margin:16px 0;background-color:#e7e7e7;border:0 none}.book .book-body .page-wrapper .page-inner section.normal ul,.book .book-body .page-wrapper .page-inner section.normal ol{padding-left:2em}.book .book-body .page-wrapper .page-inner section.normal ol ol,.book .book-body .page-wrapper .page-inner section.normal ol ul{margin-top:0;margin-bottom:0}.book .book-body .page-wrapper .page-inner section.normal dl{padding:0}.book .book-body .page-wrapper .page-inner section.normal dl dt{padding:0;margin-top:16px;font-size:1em;font-style:italic;font-weight:bold}.book .book-body .page-wrapper .page-inner section.normal dl dd{padding:0 16px;margin-bottom:16px}.book .book-body .page-wrapper .page-inner section.normal blockquote{padding:0 15px;color:#777;border-left:4px solid #ddd}.book .book-body .page-wrapper .page-inner section.normal blockquote>:first-child{margin-top:0}.book .book-body .page-wrapper .page-inner section.normal blockquote>:last-child{margin-bottom:0}.book .book-body .page-wrapper .page-inner section.normal table{display:block;width:100%;overflow:auto}.book .book-body .page-wrapper .page-inner section.normal table th{font-weight:bold}.book .book-body .page-wrapper .page-inner section.normal table th,.book .book-body .page-wrapper .page-inner section.normal table td{padding:6px 13px;border:1px solid #ddd}.book .book-body .page-wrapper .page-inner section.normal table tr{background-color:#fff;border-top:1px solid #ccc}.book .book-body .page-wrapper .page-inner section.normal table tr:nth-child(2n){background-color:#f8f8f8}.book .book-body .page-wrapper .page-inner section.normal img{max-width:100%;-moz-box-sizing:border-box;box-sizing:border-box;page-break-inside:avoid}.book .book-body .page-wrapper .page-inner section.normal code{padding:0;padding-top:.2em;padding-bottom:.2em;margin:0;font-size:85%;background-color:#f7f7f7;border-radius:3px}.book .book-body .page-wrapper .page-inner section.normal code:before,.book .book-body .page-wrapper .page-inner section.normal code:after{letter-spacing:-0.2em;content:"\00a0"}.book .book-body .page-wrapper .page-inner section.normal pre>code{padding:0;margin:0;font-size:100%;white-space:pre;background:transparent;border:0}.book .book-body .page-wrapper .page-inner section.normal .highlight pre,.book .book-body .page-wrapper .page-inner section.normal pre{padding:16px;overflow:auto;font-size:85%;line-height:1.45;background-color:#f7f7f7;border:0;border-radius:3px}.book .book-body .page-wrapper .page-inner section.normal pre{word-wrap:normal}.book .book-body .page-wrapper .page-inner section.normal pre code{display:inline;max-width:initial;padding:0;margin:0;overflow:initial;line-height:inherit;word-wrap:normal;background-color:transparent;border:0}.book .book-body .page-wrapper .page-inner section.normal pre code:before,.book .book-body .page-wrapper .page-inner section.normal pre code:after{content:normal}.book .book-body .page-wrapper .page-inner section.normal .highlight{background:#fff}.book .book-body .page-wrapper .page-inner section.normal pre .hljs-comment,.book .book-body .page-wrapper .page-inner section.normal code .hljs-comment,.book .book-body .page-wrapper .page-inner section.normal pre .hljs-title,.book .book-body .page-wrapper .page-inner section.normal code .hljs-title{color:#8e908c}.book .book-body .page-wrapper .page-inner section.normal pre .hljs-variable,.book .book-body .page-wrapper .page-inner section.normal code .hljs-variable,.book .book-body .page-wrapper .page-inner section.normal pre .hljs-attribute,.book .book-body .page-wrapper .page-inner section.normal code .hljs-attribute,.book .book-body .page-wrapper .page-inner section.normal pre .hljs-tag,.book .book-body .page-wrapper .page-inner section.normal code .hljs-tag,.book .book-body .page-wrapper .page-inner section.normal pre .hljs-regexp,.book .book-body .page-wrapper .page-inner section.normal code .hljs-regexp,.book .book-body .page-wrapper .page-inner section.normal pre .ruby .hljs-constant,.book .book-body .page-wrapper .page-inner section.normal code .ruby .hljs-constant,.book .book-body .page-wrapper .page-inner section.normal pre .xml .hljs-tag .hljs-title,.book .book-body .page-wrapper .page-inner section.normal code .xml .hljs-tag .hljs-title,.book .book-body .page-wrapper .page-inner section.normal pre .xml .hljs-pi,.book .book-body .page-wrapper .page-inner section.normal code .xml .hljs-pi,.book .book-body .page-wrapper .page-inner section.normal pre .xml .hljs-doctype,.book .book-body .page-wrapper .page-inner section.normal code .xml .hljs-doctype,.book .book-body .page-wrapper .page-inner section.normal pre .html .hljs-doctype,.book .book-body .page-wrapper .page-inner section.normal code .html .hljs-doctype,.book .book-body .page-wrapper .page-inner section.normal pre .css .hljs-id,.book .book-body .page-wrapper .page-inner section.normal code .css .hljs-id,.book .book-body .page-wrapper .page-inner section.normal pre .css .hljs-class,.book .book-body .page-wrapper .page-inner section.normal code .css .hljs-class,.book .book-body .page-wrapper .page-inner section.normal pre .css .hljs-pseudo,.book .book-body .page-wrapper .page-inner section.normal code .css .hljs-pseudo{color:#c82829}.book .book-body .page-wrapper .page-inner section.normal pre .hljs-number,.book .book-body .page-wrapper .page-inner section.normal code .hljs-number,.book .book-body .page-wrapper .page-inner section.normal pre .hljs-preprocessor,.book .book-body .page-wrapper .page-inner section.normal code .hljs-preprocessor,.book .book-body .page-wrapper .page-inner section.normal pre .hljs-pragma,.book .book-body .page-wrapper .page-inner section.normal code .hljs-pragma,.book .book-body .page-wrapper .page-inner section.normal pre .hljs-built_in,.book .book-body .page-wrapper .page-inner section.normal code .hljs-built_in,.book .book-body .page-wrapper .page-inner section.normal pre .hljs-literal,.book .book-body .page-wrapper .page-inner section.normal code .hljs-literal,.book .book-body .page-wrapper .page-inner section.normal pre .hljs-params,.book .book-body .page-wrapper .page-inner section.normal code .hljs-params,.book .book-body .page-wrapper .page-inner section.normal pre .hljs-constant,.book .book-body .page-wrapper .page-inner section.normal code .hljs-constant{color:#f5871f}.book .book-body .page-wrapper .page-inner section.normal pre .ruby .hljs-class .hljs-title,.book .book-body .page-wrapper .page-inner section.normal code .ruby .hljs-class .hljs-title,.book .book-body .page-wrapper .page-inner section.normal pre .css .hljs-rules .hljs-attribute,.book .book-body .page-wrapper .page-inner section.normal code .css .hljs-rules .hljs-attribute{color:#eab700}.book .book-body .page-wrapper .page-inner section.normal pre .hljs-string,.book .book-body .page-wrapper .page-inner section.normal code .hljs-string,.book .book-body .page-wrapper .page-inner section.normal pre .hljs-value,.book .book-body .page-wrapper .page-inner section.normal code .hljs-value,.book .book-body .page-wrapper .page-inner section.normal pre .hljs-inheritance,.book .book-body .page-wrapper .page-inner section.normal code .hljs-inheritance,.book .book-body .page-wrapper .page-inner section.normal pre .hljs-header,.book .book-body .page-wrapper .page-inner section.normal code .hljs-header,.book .book-body .page-wrapper .page-inner section.normal pre .ruby .hljs-symbol,.book .book-body .page-wrapper .page-inner section.normal code .ruby .hljs-symbol,.book .book-body .page-wrapper .page-inner section.normal pre .xml .hljs-cdata,.book .book-body .page-wrapper .page-inner section.normal code .xml .hljs-cdata{color:#718c00}.book .book-body .page-wrapper .page-inner section.normal pre .css .hljs-hexcolor,.book .book-body .page-wrapper .page-inner section.normal code .css .hljs-hexcolor{color:#3e999f}.book .book-body .page-wrapper .page-inner section.normal pre .hljs-function,.book .book-body .page-wrapper .page-inner section.normal code .hljs-function,.book .book-body .page-wrapper .page-inner section.normal pre .python .hljs-decorator,.book .book-body .page-wrapper .page-inner section.normal code .python .hljs-decorator,.book .book-body .page-wrapper .page-inner section.normal pre .python .hljs-title,.book .book-body .page-wrapper .page-inner section.normal code .python .hljs-title,.book .book-body .page-wrapper .page-inner section.normal pre .ruby .hljs-function .hljs-title,.book .book-body .page-wrapper .page-inner section.normal code .ruby .hljs-function .hljs-title,.book .book-body .page-wrapper .page-inner section.normal pre .ruby .hljs-title .hljs-keyword,.book .book-body .page-wrapper .page-inner section.normal code .ruby .hljs-title .hljs-keyword,.book .book-body .page-wrapper .page-inner section.normal pre .perl .hljs-sub,.book .book-body .page-wrapper .page-inner section.normal code .perl .hljs-sub,.book .book-body .page-wrapper .page-inner section.normal pre .javascript .hljs-title,.book .book-body .page-wrapper .page-inner section.normal code .javascript .hljs-title,.book .book-body .page-wrapper .page-inner section.normal pre .coffeescript .hljs-title,.book .book-body .page-wrapper .page-inner section.normal code .coffeescript .hljs-title{color:#4271ae}.book .book-body .page-wrapper .page-inner section.normal pre .hljs-keyword,.book .book-body .page-wrapper .page-inner section.normal code .hljs-keyword,.book .book-body .page-wrapper .page-inner section.normal pre .javascript .hljs-function,.book .book-body .page-wrapper .page-inner section.normal code .javascript .hljs-function{color:#8959a8}.book .book-body .page-wrapper .page-inner section.normal pre .hljs,.book .book-body .page-wrapper .page-inner section.normal code .hljs{display:block;background:white;color:#4d4d4c;padding:.5em}.book .book-body .page-wrapper .page-inner section.normal pre .coffeescript .javascript,.book .book-body .page-wrapper .page-inner section.normal code .coffeescript .javascript,.book .book-body .page-wrapper .page-inner section.normal pre .javascript .xml,.book .book-body .page-wrapper .page-inner section.normal code .javascript .xml,.book .book-body .page-wrapper .page-inner section.normal pre .tex .hljs-formula,.book .book-body .page-wrapper .page-inner section.normal code .tex .hljs-formula,.book .book-body .page-wrapper .page-inner section.normal pre .xml .javascript,.book .book-body .page-wrapper .page-inner section.normal code .xml .javascript,.book .book-body .page-wrapper .page-inner section.normal pre .xml .vbscript,.book .book-body .page-wrapper .page-inner section.normal code .xml .vbscript,.book .book-body .page-wrapper .page-inner section.normal pre .xml .css,.book .book-body .page-wrapper .page-inner section.normal code .xml .css,.book .book-body .page-wrapper .page-inner section.normal pre .xml .hljs-cdata,.book .book-body .page-wrapper .page-inner section.normal code .xml .hljs-cdata{opacity:.5}.book .book-body .page-wrapper .page-inner section.normal .glossary-term{cursor:help;text-decoration:underline}.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal{color:#704214}.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre,.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code{background:#fdf6e3;color:#657b83;border-color:#f8df9c}.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs,.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs{display:block;padding:.5em;background:#fdf6e3;color:#657b83}.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-comment,.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-comment,.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-template_comment,.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-template_comment,.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .diff .hljs-header,.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .diff .hljs-header,.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-doctype,.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-doctype,.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-pi,.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-pi,.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .lisp .hljs-string,.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .lisp .hljs-string,.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-javadoc,.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-javadoc{color:#93a1a1}.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-keyword,.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-keyword,.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-winutils,.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-winutils,.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .method,.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .method,.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-addition,.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-addition,.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .css .hljs-tag,.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .css .hljs-tag,.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-request,.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-request,.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-status,.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-status,.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .nginx .hljs-title,.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .nginx .hljs-title{color:#859900}.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-number,.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-number,.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-command,.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-command,.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-string,.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-string,.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-tag .hljs-value,.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-tag .hljs-value,.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-rules .hljs-value,.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-rules .hljs-value,.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-phpdoc,.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-phpdoc,.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .tex .hljs-formula,.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .tex .hljs-formula,.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-regexp,.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-regexp,.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-hexcolor,.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-hexcolor,.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-link_url,.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-link_url{color:#2aa198}.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-title,.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-title,.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-localvars,.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-localvars,.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-chunk,.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-chunk,.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-decorator,.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-decorator,.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-built_in,.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-built_in,.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-identifier,.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-identifier,.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .vhdl .hljs-literal,.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .vhdl .hljs-literal,.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-id,.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-id,.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .css .hljs-function,.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .css .hljs-function{color:#268bd2}.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-attribute,.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-attribute,.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-variable,.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-variable,.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .lisp .hljs-body,.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .lisp .hljs-body,.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .smalltalk .hljs-number,.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .smalltalk .hljs-number,.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-constant,.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-constant,.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-class .hljs-title,.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-class .hljs-title,.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-parent,.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-parent,.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .haskell .hljs-type,.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .haskell .hljs-type,.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-link_reference,.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-link_reference{color:#b58900}.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-preprocessor,.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-preprocessor,.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-preprocessor .hljs-keyword,.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-preprocessor .hljs-keyword,.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-pragma,.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-pragma,.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-shebang,.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-shebang,.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-symbol,.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-symbol,.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-symbol .hljs-string,.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-symbol .hljs-string,.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .diff .hljs-change,.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .diff .hljs-change,.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-special,.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-special,.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-attr_selector,.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-attr_selector,.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-subst,.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-subst,.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-cdata,.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-cdata,.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .clojure .hljs-title,.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .clojure .hljs-title,.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .css .hljs-pseudo,.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .css .hljs-pseudo,.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-header,.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-header{color:#cb4b16}.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-deletion,.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-deletion,.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-important,.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-important{color:#dc322f}.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-link_label,.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-link_label{color:#6c71c4}.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .tex .hljs-formula,.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .tex .hljs-formula{background:#eee8d5}.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal table th,.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal table td{border-color:#f5d06c}.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal table tr{background:#fdf6e3;color:inherit;border-color:#444}.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal table tr:nth-child(2n){background-color:#fbeecb}.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal{color:#a4b1b1}.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre,.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code{background:black;color:#eaeaea;border-color:#000}.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .hljs-comment,.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .hljs-comment,.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .hljs-title,.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .hljs-title{color:#969896}.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .hljs-variable,.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .hljs-variable,.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .hljs-attribute,.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .hljs-attribute,.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .hljs-tag,.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .hljs-tag,.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .hljs-regexp,.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .hljs-regexp,.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .ruby .hljs-constant,.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .ruby .hljs-constant,.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .xml .hljs-tag .hljs-title,.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .xml .hljs-tag .hljs-title,.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .xml .hljs-pi,.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .xml .hljs-pi,.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .xml .hljs-doctype,.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .xml .hljs-doctype,.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .html .hljs-doctype,.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .html .hljs-doctype,.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .css .hljs-id,.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .css .hljs-id,.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .css .hljs-class,.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .css .hljs-class,.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .css .hljs-pseudo,.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .css .hljs-pseudo{color:#d54e53}.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .hljs-number,.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .hljs-number,.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .hljs-preprocessor,.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .hljs-preprocessor,.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .hljs-pragma,.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .hljs-pragma,.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .hljs-built_in,.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .hljs-built_in,.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .hljs-literal,.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .hljs-literal,.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .hljs-params,.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .hljs-params,.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .hljs-constant,.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .hljs-constant{color:#e78c45}.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .ruby .hljs-class .hljs-title,.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .ruby .hljs-class .hljs-title,.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .css .hljs-rules .hljs-attribute,.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .css .hljs-rules .hljs-attribute{color:#e7c547}.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .hljs-string,.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .hljs-string,.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .hljs-value,.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .hljs-value,.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .hljs-inheritance,.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .hljs-inheritance,.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .hljs-header,.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .hljs-header,.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .ruby .hljs-symbol,.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .ruby .hljs-symbol,.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .xml .hljs-cdata,.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .xml .hljs-cdata{color:#b9ca4a}.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .css .hljs-hexcolor,.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .css .hljs-hexcolor{color:#70c0b1}.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .hljs-function,.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .hljs-function,.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .python .hljs-decorator,.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .python .hljs-decorator,.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .python .hljs-title,.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .python .hljs-title,.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .ruby .hljs-function .hljs-title,.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .ruby .hljs-function .hljs-title,.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .ruby .hljs-title .hljs-keyword,.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .ruby .hljs-title .hljs-keyword,.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .perl .hljs-sub,.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .perl .hljs-sub,.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .javascript .hljs-title,.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .javascript .hljs-title,.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .coffeescript .hljs-title,.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .coffeescript .hljs-title{color:#7aa6da}.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .hljs-keyword,.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .hljs-keyword,.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .javascript .hljs-function,.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .javascript .hljs-function{color:#c397d8}.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .hljs,.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .hljs{display:block;background:black;color:#eaeaea;padding:.5em}.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .coffeescript .javascript,.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .coffeescript .javascript,.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .javascript .xml,.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .javascript .xml,.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .tex .hljs-formula,.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .tex .hljs-formula,.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .xml .javascript,.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .xml .javascript,.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .xml .vbscript,.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .xml .vbscript,.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .xml .css,.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .xml .css,.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .xml .hljs-cdata,.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .xml .hljs-cdata{opacity:.5}.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal table th,.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal table td{border-color:#444}.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal table tr{background-color:black;color:#eaeaea;border-color:#444}.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal table tr:nth-child(2n){background-color:#222}.book .book-body .navigation{position:absolute;top:50px;bottom:0;margin:0;max-width:150px;min-width:90px;display:flex;justify-content:center;align-content:center;flex-direction:column;font-size:40px;color:#ccc;text-align:center;-webkit-transition:all 350ms ease;-moz-transition:all 350ms ease;-o-transition:all 350ms ease;transition:all 350ms ease}.book .book-body .navigation:hover{text-decoration:none;color:#444}.book .book-body .navigation.navigation-next{right:0}.book .book-body .navigation.navigation-prev{left:0}@media(max-width:1240px){.book .book-body .navigation{position:static;top:auto;max-width:50%;width:50%;display:inline-block;float:left}.book .book-body .navigation.navigation-unique{max-width:100%;width:100%}}.book.color-theme-1 .book-body .navigation{color:#afa790}.book.color-theme-1 .book-body .navigation:hover{color:#73553c}.book.color-theme-2 .book-body .navigation{color:#7e888b}.book.color-theme-2 .book-body .navigation:hover{color:#c9c9c9}.book .book-body .page-wrapper .page-inner section.glossary{margin-bottom:40px}.book .book-body .page-wrapper .page-inner section.glossary h2 a,.book .book-body .page-wrapper .page-inner section.glossary h2 a:hover{color:inherit;text-decoration:none}.book .book-body .page-wrapper .page-inner section.glossary .glossary-index{list-style:none;margin:0;padding:0}.book .book-body .page-wrapper .page-inner section.glossary .glossary-index li{display:inline;margin:0 8px;white-space:nowrap}*{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-overflow-scrolling:touch;-webkit-tap-highlight-color:transparent;-webkit-text-size-adjust:none;-webkit-touch-callout:none;-webkit-font-smoothing:antialiased}a{text-decoration:none}html,body{height:100%}html{font-size:62.5%}body{text-rendering:optimizeLegibility;font-smoothing:antialiased;font-family:"Open Sans","Clear Sans","Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px} -------------------------------------------------------------------------------- /_book/glossary_index.json: -------------------------------------------------------------------------------- 1 | [] -------------------------------------------------------------------------------- /_book/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Introduction | My Book 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 |
33 | 34 | 35 |
36 | 39 | 72 |
73 | 74 |
75 |
76 |
77 | 78 | 79 | 80 | 81 | 108 | 109 | 110 | 111 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 |

143 | 144 | My Book 145 |

146 |
147 | 148 |
149 |
150 | 151 | 152 |
153 | 154 |

My Book

155 |

Welcome in my book!

156 | 157 | 158 |
159 | 160 | 161 |
162 |
163 |
164 | 165 | 166 | 167 |
168 |
169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 187 | 188 | 189 | 190 | 191 | 192 | -------------------------------------------------------------------------------- /_book/search_index.json: -------------------------------------------------------------------------------- 1 | {"version":"0.5.2","fields":[{"name":"title","boost":10},{"name":"body","boost":1}],"ref":"url","documentStore":{"store":{"index.html#gitbook_4":["book","welcom"]},"length":1},"tokenStore":{"root":{"docs":{},"b":{"docs":{},"o":{"docs":{},"o":{"docs":{},"k":{"docs":{"index.html#gitbook_4":{"ref":"index.html#gitbook_4","tf":10.666666666666666}}}}}},"w":{"docs":{},"e":{"docs":{},"l":{"docs":{},"c":{"docs":{},"o":{"docs":{},"m":{"docs":{"index.html#gitbook_4":{"ref":"index.html#gitbook_4","tf":0.3333333333333333}}}}}}}}},"length":2},"corpusTokens":["book","welcom"],"pipeline":["trimmer","stopWordFilter","stemmer"]} -------------------------------------------------------------------------------- /config.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Google Java编程风格规范", 3 | "introduction": "编码规范是一个程序员基本功的体现,本教程是 Google 的规范,值得参考。", 4 | "path" : { 5 | "toc" : "SUMMARY.md" 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /cover/background.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JervyShi/google-java-styleguide-zh/787d01bb3f64b7a4d216fab05d7cf26ff86def3c/cover/background.jpg -------------------------------------------------------------------------------- /cover/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JervyShi/google-java-styleguide-zh/787d01bb3f64b7a4d216fab05d7cf26ff86def3c/cover/logo.png -------------------------------------------------------------------------------- /formatting/README.md: -------------------------------------------------------------------------------- 1 | ## 格式 2 | 3 | **术语说明**:块状结构(block-like construct)指的是一个类,方法或构造函数的主体。需要注意的是,数组初始化中的初始值可被选择性地视为块状结构(4.8.3.1节)。 4 | -------------------------------------------------------------------------------- /formatting/annotations.md: -------------------------------------------------------------------------------- 1 | #### 4.8.5 注解(Annotations) 2 | 3 | 注解紧跟在文档块后面,应用于类、方法和构造函数,一个注解独占一行。这些换行不属于自动换行(第4.5节,自动换行),因此缩进级别不变。例如: 4 | 5 | @Override 6 | @Nullable 7 | public String getNameIfPresent() { ... } 8 | 9 | **例外**:单个的注解可以和签名的第一行出现在同一行。例如: 10 | 11 | @Override public int hashCode() { ... } 12 | 13 | 应用于字段的注解紧随文档块出现,应用于字段的多个注解允许与字段出现在同一行。例如: 14 | 15 | @Partial @Mock DataLoader loader; 16 | 17 | 参数和局部变量注解没有特定规则。 18 | 19 | 20 | -------------------------------------------------------------------------------- /formatting/arrays.md: -------------------------------------------------------------------------------- 1 | #### 4.8.3 数组 2 | 3 | ##### 4.8.3.1 数组初始化:可写成块状结构 4 | 5 | 数组初始化可以写成块状结构,比如,下面的写法都是OK的: 6 | 7 | new int[] { 8 | 0, 1, 2, 3 9 | } 10 | 11 | new int[] { 12 | 0, 13 | 1, 14 | 2, 15 | 3 16 | } 17 | 18 | new int[] { 19 | 0, 1, 20 | 2, 3 21 | } 22 | 23 | new int[] 24 | {0, 1, 2, 3} 25 | 26 | ##### 4.8.3.2 非C风格的数组声明 27 | 28 | 中括号是类型的一部分:`String[] args`, 而非`String args[]`。 29 | 30 | 31 | -------------------------------------------------------------------------------- /formatting/block-indentation.md: -------------------------------------------------------------------------------- 1 | ### 4.2 块缩进:2个空格 2 | 3 | 每当开始一个新的块,缩进增加2个空格,当块结束时,缩进返回先前的缩进级别。缩进级别适用于代码和注释。(见4.1.2节中的代码示例) 4 | 5 | -------------------------------------------------------------------------------- /formatting/blocks-k-r-style.md: -------------------------------------------------------------------------------- 1 | #### 4.1.2 非空块:K & R 风格 2 | 3 | 对于非空块和块状结构,大括号遵循Kernighan和Ritchie风格 ([Egyptian brackets](http://www.codinghorror.com/blog/2012/07/new-programming-jargon.html)): 4 | 5 | * 左大括号前不换行 6 | * 左大括号后换行 7 | * 右大括号前换行 8 | * 如果右大括号是一个语句、函数体或类的终止,则右大括号后换行; 否则不换行。例如,如果右大括号后面是else或逗号,则不换行。 9 | 10 | 示例: 11 | 12 | 13 | return new MyClass() { 14 | @Override public void method() { 15 | if (condition()) { 16 | try { 17 | something(); 18 | } catch (ProblemException e) { 19 | recover(); 20 | } 21 | } 22 | } 23 | }; 24 | 25 | 4.8.1节给出了enum类的一些例外。 26 | -------------------------------------------------------------------------------- /formatting/braces-always-used.md: -------------------------------------------------------------------------------- 1 | #### 4.1.1 使用大括号(即使是可选的) 2 | 3 | 大括号与`if, else, for, do, while`语句一起使用,即使只有一条语句(或是空),也应该把大括号写上。 4 | -------------------------------------------------------------------------------- /formatting/braces-empty-blocks.md: -------------------------------------------------------------------------------- 1 | #### 4.1.3 空块:可以用简洁版本 2 | 3 | 一个空的块状结构里什么也不包含,大括号可以简洁地写成`{}`,不需要换行。例外:如果它是一个多块语句的一部分(if/else 或 try/catch/finally) ,即使大括号内没内容,右大括号也要换行。 4 | 5 | 示例: 6 | 7 | 8 | void doNothing() {} 9 | 10 | 11 | -------------------------------------------------------------------------------- /formatting/braces.md: -------------------------------------------------------------------------------- 1 | ### 4.1 大括号 2 | 3 | 4 | -------------------------------------------------------------------------------- /formatting/column-limit.md: -------------------------------------------------------------------------------- 1 | ### 4.4 列限制:80或100 2 | 3 | 一个项目可以选择一行80个字符或100个字符的列限制,除了下述例外,任何一行如果超过这个字符数限制,必须自动换行。 4 | 5 | 例外: 6 | 7 | 1. 不可能满足列限制的行(例如,Javadoc中的一个长URL,或是一个长的JSNI方法参考)。 8 | 2. `package`和`import`语句(见3.2节和3.3节)。 9 | 3. 注释中那些可能被剪切并粘贴到shell中的命令行。 10 | 11 | -------------------------------------------------------------------------------- /formatting/comments.md: -------------------------------------------------------------------------------- 1 | #### 4.8.6 注释 2 | 3 | ##### 4.8.6.1 块注释风格 4 | 5 | 块注释与其周围的代码在同一缩进级别。它们可以是`/* ... */`风格,也可以是`// ...`风格。对于多行的`/* ... */`注释,后续行必须从`*`开始, 并且与前一行的`*`对齐。以下示例注释都是OK的。 6 | 7 | /* 8 | * This is // And so /* Or you can 9 | * okay. // is this. * even do this. */ 10 | */ 11 | 12 | 注释不要封闭在由星号或其它字符绘制的框架里。 13 | 14 | > > Tip:在写多行注释时,如果你希望在必要时能重新换行(即注释像段落风格一样),那么使用`/* ... */`。 15 | 16 | 17 | -------------------------------------------------------------------------------- /formatting/enum-classes.md: -------------------------------------------------------------------------------- 1 | #### 4.8.1 枚举类 2 | 3 | 枚举常量间用逗号隔开,换行可选。 4 | 5 | 没有方法和文档的枚举类可写成数组初始化的格式: 6 | 7 | 8 | private enum Suit { CLUBS, HEARTS, SPADES, DIAMONDS } 9 | 10 | 11 | 由于枚举类也是一个类,因此所有适用于其它类的格式规则也适用于枚举类。 12 | 13 | -------------------------------------------------------------------------------- /formatting/grouping-parentheses.md: -------------------------------------------------------------------------------- 1 | ### 4.7 用小括号来限定组:推荐 2 | 3 | 除非作者和reviewer都认为去掉小括号也不会使代码被误解,或是去掉小括号能让代码更易于阅读,否则我们不应该去掉小括号。 我们没有理由假设读者能记住整个Java运算符优先级表。 4 | 5 | -------------------------------------------------------------------------------- /formatting/horizontal-alignment.md: -------------------------------------------------------------------------------- 1 | #### 4.6.3 水平对齐:不做要求 2 | 3 | **术语说明**:水平对齐指的是通过增加可变数量的空格来使某一行的字符与上一行的相应字符对齐。 4 | 5 | 这是允许的(而且在不少地方可以看到这样的代码),但Google编程风格对此不做要求。即使对于已经使用水平对齐的代码,我们也不需要去保持这种风格。 6 | 7 | 以下示例先展示未对齐的代码,然后是对齐的代码: 8 | 9 | 10 | private int x; // this is fine 11 | private Color color; // this too 12 | 13 | private int x; // permitted, but future edits 14 | private Color color; // may leave it unaligned 15 | 16 | 17 | > > Tip:对齐可增加代码可读性,但它为日后的维护带来问题。考虑未来某个时候,我们需要修改一堆对齐的代码中的一行。 这可能导致原本很漂亮的对齐代码变得错位。很可能它会提示你调整周围代码的空白来使这一堆代码重新水平对齐(比如程序员想保持这种水平对齐的风格), 这就会让你做许多的无用功,增加了reviewer的工作并且可能导致更多的合并冲突。 18 | 19 | -------------------------------------------------------------------------------- /formatting/horizontal-whitespace.md: -------------------------------------------------------------------------------- 1 | #### 4.6.2 水平空白 2 | 3 | 除了语言需求和其它规则,并且除了文字,注释和Javadoc用到单个空格,单个ASCII空格也出现在以下几个地方: 4 | 5 | 1. 分隔任何保留字与紧随其后的左括号(`(`)(如`if, for catch`等)。 6 | 2. 分隔任何保留字与其前面的右大括号(`}`)(如`else, catch`)。 7 | 3. 在任何左大括号前(`{`),两个例外: 8 | * `@SomeAnnotation({a, b})`(不使用空格)。 9 | * `String[][] x = foo;`(大括号间没有空格,见下面的Note)。 10 | 4. 在任何二元或三元运算符的两侧。这也适用于以下“类运算符”符号: 11 | * 类型界限中的&(``)。 12 | * catch块中的管道符号(`catch (FooException | BarException e`)。 13 | * `foreach`语句中的分号。 14 | 5. 在`, : ;`及右括号(`)`)后 15 | 6. 如果在一条语句后做注释,则双斜杠(//)两边都要空格。这里可以允许多个空格,但没有必要。 16 | 7. 类型和变量之间:List list。 17 | 8. 数组初始化中,大括号内的空格是可选的,即`new int[] {5, 6}`和`new int[] { 5, 6 }`都是可以的。 18 | 19 | > > Note:这个规则并不要求或禁止一行的开关或结尾需要额外的空格,只对内部空格做要求。 20 | 21 | -------------------------------------------------------------------------------- /formatting/line-wrapping-indent.md: -------------------------------------------------------------------------------- 1 | #### 4.5.2 自动换行时缩进至少+4个空格 2 | 3 | 自动换行时,第一行后的每一行至少比第一行多缩进4个空格(注意:制表符不用于缩进。见2.3.1节)。 4 | 5 | 当存在连续自动换行时,缩进可能会多缩进不只4个空格(语法元素存在多级时)。一般而言,两个连续行使用相同的缩进当且仅当它们开始于同级语法元素。 6 | 7 | 第4.6.3水平对齐一节中指出,不鼓励使用可变数目的空格来对齐前面行的符号。 8 | 9 | -------------------------------------------------------------------------------- /formatting/line-wrapping-where-to-break.md: -------------------------------------------------------------------------------- 1 | #### 4.5.1 从哪里断开 2 | 3 | 自动换行的基本准则是:更倾向于在更高的语法级别处断开。 4 | 5 | 1. 如果在`非赋值运算符`处断开,那么在该符号前断开(比如+,它将位于下一行)。注意:这一点与Google其它语言的编程风格不同(如C++和JavaScript)。 这条规则也适用于以下“类运算符”符号:点分隔符(.),类型界限中的&(``),catch块中的管道符号(`catch (FooException | BarException e`) 6 | 2. 如果在`赋值运算符`处断开,通常的做法是在该符号后断开(比如=,它与前面的内容留在同一行)。这条规则也适用于`foreach`语句中的分号。 7 | 3. 方法名或构造函数名与左括号留在同一行。 8 | 4. 逗号(,)与其前面的内容留在同一行。 9 | 10 | -------------------------------------------------------------------------------- /formatting/line-wrapping.md: -------------------------------------------------------------------------------- 1 | ### 4.5 自动换行 2 | 3 | **术语说明**:一般情况下,一行长代码为了避免超出列限制(80或100个字符)而被分为多行,我们称之为自动换行(line-wrapping)。 4 | 5 | 我们并没有全面,确定性的准则来决定在每一种情况下如何自动换行。很多时候,对于同一段代码会有好几种有效的自动换行方式。 6 | 7 | > > Tip: 提取方法或局部变量可以在不换行的情况下解决代码过长的问题(是合理缩短命名长度吧) 8 | 9 | -------------------------------------------------------------------------------- /formatting/modifiers.md: -------------------------------------------------------------------------------- 1 | #### 4.8.7 Modifiers 2 | 3 | 类和成员的modifiers如果存在,则按Java语言规范中推荐的顺序出现。 4 | 5 | public protected private abstract static final transient volatile synchronized native strictfp 6 | -------------------------------------------------------------------------------- /formatting/one-statement-per-line.md: -------------------------------------------------------------------------------- 1 | ### 4.3 一行一个语句 2 | 3 | 每个语句后要换行。 4 | -------------------------------------------------------------------------------- /formatting/specific-constructs.md: -------------------------------------------------------------------------------- 1 | ### 4.8 具体结构 2 | -------------------------------------------------------------------------------- /formatting/switch.md: -------------------------------------------------------------------------------- 1 | #### 4.8.4 switch语句 2 | 3 | **术语说明**:switch块的大括号内是一个或多个语句组。每个语句组包含一个或多个switch标签(`case FOO:`或`default:`),后面跟着一条或多条语句。 4 | 5 | ##### 4.8.4.1 缩进 6 | 7 | 与其它块状结构一致,switch块中的内容缩进为2个空格。 8 | 9 | 每个switch标签后新起一行,再缩进2个空格,写下一条或多条语句。 10 | 11 | ##### 4.8.4.2 Fall-through:注释 12 | 13 | 在一个switch块内,每个语句组要么通过`break, continue, return`或抛出异常来终止,要么通过一条注释来说明程序将继续执行到下一个语句组, 任何能表达这个意思的注释都是OK的(典型的是用`// fall through`)。这个特殊的注释并不需要在最后一个语句组(一般是`default`)中出现。示例: 14 | 15 | switch (input) { 16 | case 1: 17 | case 2: 18 | prepareOneOrTwo(); 19 | // fall through 20 | case 3: 21 | handleOneTwoOrThree(); 22 | break; 23 | default: 24 | handleLargeNumber(input); 25 | } 26 | 27 | ##### 4.8.4.3 default的情况要写出来 28 | 29 | 每个switch语句都包含一个`default`语句组,即使它什么代码也不包含。 30 | 31 | 32 | -------------------------------------------------------------------------------- /formatting/variable-declarations.md: -------------------------------------------------------------------------------- 1 | #### 4.8.2 变量声明 2 | 3 | ##### 4.8.2.1 每次只声明一个变量 4 | 5 | 不要使用组合声明,比如`int a, b;`。 6 | 7 | ##### 4.8.2.2 需要时才声明,并尽快进行初始化 8 | 9 | 不要在一个代码块的开头把局部变量一次性都声明了(这是c语言的做法),而是在第一次需要使用它时才声明。 局部变量在声明时最好就进行初始化,或者声明后尽快进行初始化。 10 | 11 | 12 | -------------------------------------------------------------------------------- /formatting/vertical-whitespace.md: -------------------------------------------------------------------------------- 1 | #### 4.6.1 垂直空白 2 | 3 | 以下情况需要使用一个空行: 4 | 5 | 1. 类内连续的成员之间:字段,构造函数,方法,嵌套类,静态初始化块,实例初始化块。 6 | * **例外**:两个连续字段之间的空行是可选的,用于字段的空行主要用来对字段进行逻辑分组。 7 | 2. 在函数体内,语句的逻辑分组间使用空行。 8 | 3. 类内的第一个成员前或最后一个成员后的空行是可选的(既不鼓励也不反对这样做,视个人喜好而定)。 9 | 4. 要满足本文档中其他节的空行要求(比如3.3节:import语句) 10 | 11 | 多个连续的空行是允许的,但没有必要这样做(我们也不鼓励这样做)。 12 | 13 | -------------------------------------------------------------------------------- /formatting/whitespace.md: -------------------------------------------------------------------------------- 1 | ### 4.6 空白 2 | 3 | -------------------------------------------------------------------------------- /introduction/README.md: -------------------------------------------------------------------------------- 1 | ## 前言 2 | 3 | 这份文档是Google Java编程风格规范的完整定义。当且仅当一个Java源文件符合此文档中的规则, 我们才认为它符合Google的Java编程风格。 4 | 5 | 与其它的编程风格指南一样,这里所讨论的不仅仅是编码格式美不美观的问题, 同时也讨论一些约定及编码标准。然而,这份文档主要侧重于我们所普遍遵循的规则, 对于那些不是明确强制要求的,我们尽量避免提供意见。 6 | -------------------------------------------------------------------------------- /introduction/guide-notes.md: -------------------------------------------------------------------------------- 1 | ### 1.2 指南说明 2 | 3 | 本文档中的示例代码并不作为规范。也就是说,虽然示例代码是遵循Google编程风格,但并不意味着这是展现这些代码的唯一方式。 示例中的格式选择不应该被强制定为规则。 4 | -------------------------------------------------------------------------------- /introduction/terminology.md: -------------------------------------------------------------------------------- 1 | ### 1.1 术语说明 2 | 3 | 在本文档中,除非另有说明: 4 | 5 | 1. 术语class可表示一个普通类,枚举类,接口或是annotation类型(`@interface`) 6 | 2. 术语comment只用来指代实现的注释(implementation comments),我们不使用“documentation comments”一词,而是用Javadoc。 7 | 8 | 其他的术语说明会偶尔在后面的文档出现。 9 | -------------------------------------------------------------------------------- /javadoc/README.md: -------------------------------------------------------------------------------- 1 | ## Javadoc 2 | -------------------------------------------------------------------------------- /javadoc/javadoc-at-clauses.md: -------------------------------------------------------------------------------- 1 | #### 7.1.3 Javadoc标记 2 | 3 | 标准的Javadoc标记按以下顺序出现:`@param`, `@return`, `@throws`, `@deprecated`, 前面这4种标记如果出现,描述都不能为空。 当描述无法在一行中容纳,连续行需要至少再缩进4个空格。 4 | 5 | -------------------------------------------------------------------------------- /javadoc/javadoc-exception-overrides.md: -------------------------------------------------------------------------------- 1 | #### 7.3.2 例外:重载 2 | 3 | 如果一个方法重载了超类中的方法,那么Javadoc并非必需的。 4 | 5 | -------------------------------------------------------------------------------- /javadoc/javadoc-exception-self-explanatory.md: -------------------------------------------------------------------------------- 1 | #### 7.3.1 例外:不言自明的方法 2 | 3 | 对于简单明显的方法如`getFoo`,Javadoc是可选的(即,是可以不写的)。这种情况下除了写“Returns the foo”,确实也没有什么值得写了。 4 | 5 | 单元测试类中的测试方法可能是不言自明的最常见例子了,我们通常可以从这些方法的描述性命名中知道它是干什么的,因此不需要额外的文档说明。 6 | 7 | > > Tip:如果有一些相关信息是需要读者了解的,那么以上的例外不应作为忽视这些信息的理由。例如,对于方法名`getCanonicalName`, 就不应该忽视文档说明,因为读者很可能不知道词语`canonical name`指的是什么。 8 | 9 | -------------------------------------------------------------------------------- /javadoc/javadoc-formatting.md: -------------------------------------------------------------------------------- 1 | ### 7.1 格式 2 | 3 | -------------------------------------------------------------------------------- /javadoc/javadoc-multi-line.md: -------------------------------------------------------------------------------- 1 | #### 7.1.1 一般形式 2 | 3 | Javadoc块的基本格式如下所示: 4 | 5 | /** 6 | * Multiple lines of Javadoc text are written here, 7 | * wrapped normally... 8 | */ 9 | public int method(String p1) { ... } 10 | 11 | 或者是以下单行形式: 12 | 13 | /** An especially short bit of Javadoc. */ 14 | 15 | 基本格式总是OK的。当整个Javadoc块能容纳于一行时(且没有Javadoc标记@XXX),可以使用单行形式。 16 | 17 | -------------------------------------------------------------------------------- /javadoc/javadoc-optional.md: -------------------------------------------------------------------------------- 1 | #### 7.3.3 可选的Javadoc 2 | 3 | 对于包外不可见的类和方法,如有需要,也是要使用Javadoc的。如果一个注释是用来定义一个类,方法,字段的整体目的或行为, 那么这个注释应该写成Javadoc,这样更统一更友好。 4 | -------------------------------------------------------------------------------- /javadoc/javadoc-paragraphs.md: -------------------------------------------------------------------------------- 1 | #### 7.1.2 段落 2 | 3 | 空行(即,只包含最左侧星号的行)会出现在段落之间和Javadoc标记(@XXX)之前(如果有的话)。 除了第一个段落,每个段落第一个单词前都有标签`

`,并且它和第一个单词间没有空格。 4 | 5 | -------------------------------------------------------------------------------- /javadoc/javadoc-where-required.md: -------------------------------------------------------------------------------- 1 | ### 7.3 哪里需要使用Javadoc 2 | 3 | 至少在每个public类及它的每个public和protected成员处使用Javadoc,以下是一些例外: 4 | 5 | -------------------------------------------------------------------------------- /javadoc/summary-fragment.md: -------------------------------------------------------------------------------- 1 | ### 7.2 摘要片段 2 | 3 | 每个类或成员的Javadoc以一个简短的摘要片段开始。这个片段是非常重要的,在某些情况下,它是唯一出现的文本,比如在类和方法索引中。 4 | 5 | 这只是一个小片段,可以是一个名词短语或动词短语,但不是一个完整的句子。它不会以`A {@code Foo} is a...`或`This method returns...`开头, 它也不会是一个完整的祈使句,如`Save the record...`。然而,由于开头大写及被加了标点,它看起来就像是个完整的句子。 6 | 7 | > > Tip:一个常见的错误是把简单的Javadoc写成`/** @return the customer ID */`,这是不正确的。它应该写成`/** Returns the customer ID. */`。 8 | 9 | -------------------------------------------------------------------------------- /naming/README.md: -------------------------------------------------------------------------------- 1 | ## 命名约定 2 | 3 | -------------------------------------------------------------------------------- /naming/camel-case.md: -------------------------------------------------------------------------------- 1 | ### 5.3 驼峰式命名法(CamelCase) 2 | 3 | [驼峰式命名法](http://zh.wikipedia.org/wiki/%E9%A7%9D%E5%B3%B0%E5%BC%8F%E5%A4%A7%E5%B0%8F%E5%AF%AB)分大驼峰式命名法(`UpperCamelCase`)和小驼峰式命名法(`lowerCamelCase`)。 有时,我们有不只一种合理的方式将一个英语词组转换成驼峰形式,如缩略语或不寻常的结构(例如"IPv6"或"iOS")。Google指定了以下的转换方案。 4 | 5 | 名字从`散文形式`(prose form)开始: 6 | 7 | 1. 把短语转换为纯ASCII码,并且移除任何单引号。例如:"Müller’s algorithm"将变成"Muellers algorithm"。 8 | 2. 把这个结果切分成单词,在空格或其它标点符号(通常是连字符)处分割开。 9 | * 推荐:如果某个单词已经有了常用的驼峰表示形式,按它的组成将它分割开(如"AdWords"将分割成"ad words")。 需要注意的是"iOS"并不是一个真正的驼峰表示形式,因此该推荐对它并不适用。 10 | 3. 现在将所有字母都小写(包括缩写),然后将单词的第一个字母大写: 11 | * 每个单词的第一个字母都大写,来得到大驼峰式命名。 12 | * 除了第一个单词,每个单词的第一个字母都大写,来得到小驼峰式命名。 13 | 4. 最后将所有的单词连接起来得到一个标识符。 14 | 15 | 示例: 16 | 17 | Prose form Correct Incorrect 18 | ------------------------------------------------------------------ 19 | "XML HTTP request" XmlHttpRequest XMLHTTPRequest 20 | "new customer ID" newCustomerId newCustomerID 21 | "inner stopwatch" innerStopwatch innerStopWatch 22 | "supports IPv6 on iOS?" supportsIpv6OnIos supportsIPv6OnIOS 23 | "YouTube importer" YouTubeImporter 24 | YoutubeImporter* 25 | 26 | 加星号处表示可以,但不推荐。 27 | 28 | > > Note:在英语中,某些带有连字符的单词形式不唯一。例如:"nonempty"和"non-empty"都是正确的,因此方法名`checkNonempty`和`checkNonEmpty`也都是正确的。 29 | -------------------------------------------------------------------------------- /naming/class-names.md: -------------------------------------------------------------------------------- 1 | #### 5.2.2 类名 2 | 3 | 类名都以`UpperCamelCase`风格编写。 4 | 5 | 类名通常是名词或名词短语,接口名称有时可能是形容词或形容词短语。现在还没有特定的规则或行之有效的约定来命名注解类型。 6 | 7 | 测试类的命名以它要测试的类的名称开始,以`Test`结束。例如,`HashTest`或`HashIntegrationTest`。 8 | 9 | -------------------------------------------------------------------------------- /naming/constant-names.md: -------------------------------------------------------------------------------- 1 | #### 5.2.4 常量名 2 | 3 | 常量名命名模式为`CONSTANT_CASE`,全部字母大写,用下划线分隔单词。那,到底什么算是一个常量? 4 | 5 | 每个常量都是一个静态final字段,但不是所有静态final字段都是常量。在决定一个字段是否是一个常量时, 考虑它是否真的感觉像是一个常量。例如,如果任何一个该实例的观测状态是可变的,则它几乎肯定不会是一个常量。 只是永远不`打算`改变对象一般是不够的,它要真的一直不变才能将它示为常量。 6 | 7 | // Constants 8 | static final int NUMBER = 5; 9 | static final ImmutableList NAMES = ImmutableList.of("Ed", "Ann"); 10 | static final Joiner COMMA_JOINER = Joiner.on(','); // because Joiner is immutable 11 | static final SomeMutableType[] EMPTY_ARRAY = {}; 12 | enum SomeEnum { ENUM_CONSTANT } 13 | 14 | // Not constants 15 | static String nonFinal = "non-final"; 16 | final String nonStatic = "non-static"; 17 | static final Set mutableCollection = new HashSet(); 18 | static final ImmutableSet mutableElements = ImmutableSet.of(mutable); 19 | static final Logger logger = Logger.getLogger(MyClass.getName()); 20 | static final String[] nonEmptyArray = {"these", "can", "change"}; 21 | 22 | 这些名字通常是名词或名词短语。 23 | 24 | -------------------------------------------------------------------------------- /naming/identifier-names.md: -------------------------------------------------------------------------------- 1 | ### 5.1 对所有标识符都通用的规则 2 | 3 | 标识符只能使用ASCII字母和数字,因此每个有效的标识符名称都能匹配正则表达式`\w+`。 4 | 5 | 在Google其它编程语言风格中使用的特殊前缀或后缀,如`name_`, `mName`, `s_name`和`kName`,在Java编程风格中都不再使用。 6 | 7 | -------------------------------------------------------------------------------- /naming/local-variable-names.md: -------------------------------------------------------------------------------- 1 | #### 5.2.7 局部变量名 2 | 3 | 局部变量名以`lowerCamelCase`风格编写,比起其它类型的名称,局部变量名可以有更为宽松的缩写。 4 | 5 | 虽然缩写更宽松,但还是要避免用单字符进行命名,除了临时变量和循环变量。 6 | 7 | 即使局部变量是final和不可改变的,也不应该把它示为常量,自然也不能用常量的规则去命名它。 8 | 9 | -------------------------------------------------------------------------------- /naming/method-names.md: -------------------------------------------------------------------------------- 1 | #### 5.2.3 方法名 2 | 3 | 方法名都以`lowerCamelCase`风格编写。 4 | 5 | 方法名通常是动词或动词短语。 6 | 7 | 下划线可能出现在JUnit测试方法名称中用以分隔名称的逻辑组件。一个典型的模式是:`test_`,例如`testPop_emptyStack`。 并不存在唯一正确的方式来命名测试方法。 8 | 9 | -------------------------------------------------------------------------------- /naming/non-constant-field-names.md: -------------------------------------------------------------------------------- 1 | #### 5.2.5 非常量字段名 2 | 3 | 非常量字段名以`lowerCamelCase`风格编写。 4 | 5 | 这些名字通常是名词或名词短语。 6 | 7 | -------------------------------------------------------------------------------- /naming/package-names.md: -------------------------------------------------------------------------------- 1 | #### 5.2.1 包名 2 | 3 | 包名全部小写,连续的单词只是简单地连接起来,不使用下划线。 4 | 5 | -------------------------------------------------------------------------------- /naming/parameter-names.md: -------------------------------------------------------------------------------- 1 | #### 5.2.6 参数名 2 | 3 | 参数名以`lowerCamelCase`风格编写。 4 | 5 | 参数应该避免用单个字符命名。 6 | 7 | -------------------------------------------------------------------------------- /naming/specific-identifier-names.md: -------------------------------------------------------------------------------- 1 | ### 5.2 标识符类型的规则 2 | 3 | -------------------------------------------------------------------------------- /naming/type-variable-names.md: -------------------------------------------------------------------------------- 1 | #### 5.2.8 类型变量名 2 | 3 | 类型变量可用以下两种风格之一进行命名: 4 | 5 | * 单个的大写字母,后面可以跟一个数字(如:E, T, X, T2)。 6 | * 以类命名方式(5.2.2节),后面加个大写的T(如:RequestT, FooBarT)。 7 | 8 | -------------------------------------------------------------------------------- /programming-practices/README.md: -------------------------------------------------------------------------------- 1 | ## 编程实践 2 | 3 | -------------------------------------------------------------------------------- /programming-practices/caught-exceptions.md: -------------------------------------------------------------------------------- 1 | ### 6.2 捕获的异常:不能忽视 2 | 3 | 除了下面的例子,对捕获的异常不做响应是极少正确的。(典型的响应方式是打印日志,或者如果它被认为是不可能的,则把它当作一个`AssertionError`重新抛出。) 4 | 5 | 如果它确实是不需要在catch块中做任何响应,需要做注释加以说明(如下面的例子)。 6 | 7 | try { 8 | int i = Integer.parseInt(response); 9 | return handleNumericResponse(i); 10 | } catch (NumberFormatException ok) { 11 | // it's not numeric; that's fine, just continue 12 | } 13 | return handleTextResponse(response); 14 | 15 | **例外**:在测试中,如果一个捕获的异常被命名为`expected`,则它可以被不加注释地忽略。下面是一种非常常见的情形,用以确保所测试的方法会抛出一个期望中的异常, 因此在这里就没有必要加注释。 16 | 17 | try { 18 | emptyStack.pop(); 19 | fail(); 20 | } catch (NoSuchElementException expected) { 21 | } 22 | 23 | -------------------------------------------------------------------------------- /programming-practices/finalizers.md: -------------------------------------------------------------------------------- 1 | ### 6.4 Finalizers: 禁用 2 | 3 | 极少会去重载`Object.finalize`。 4 | 5 | > > Tip:不要使用finalize。如果你非要使用它,请先仔细阅读和理解[Effective Java](http://books.google.com/books?isbn=8131726592) 第7条款:“Avoid Finalizers”,然后不要使用它。 6 | -------------------------------------------------------------------------------- /programming-practices/override-annotation.md: -------------------------------------------------------------------------------- 1 | ### 6.1 @Override:能用则用 2 | 3 | 只要是合法的,就把`@Override`注解给用上。 4 | 5 | -------------------------------------------------------------------------------- /programming-practices/static-members.md: -------------------------------------------------------------------------------- 1 | ### 6.3 静态成员:使用类进行调用 2 | 3 | 使用类名调用静态的类成员,而不是具体某个对象或表达式。 4 | 5 | Foo aFoo = ...; 6 | Foo.aStaticMethod(); // good 7 | aFoo.aStaticMethod(); // bad 8 | somethingThatYieldsAFoo().aStaticMethod(); // very bad 9 | 10 | -------------------------------------------------------------------------------- /source-file-basics/README.md: -------------------------------------------------------------------------------- 1 | ## 源文件基础 2 | -------------------------------------------------------------------------------- /source-file-basics/file-encoding.md: -------------------------------------------------------------------------------- 1 | ### 2.2 文件编码:UTF-8 2 | 3 | 源文件编码格式为UTF-8。 4 | -------------------------------------------------------------------------------- /source-file-basics/file-name.md: -------------------------------------------------------------------------------- 1 | ### 2.1 文件名 2 | 3 | 源文件以其最顶层的类名来命名,大小写敏感,文件扩展名为`.java`。 4 | -------------------------------------------------------------------------------- /source-file-basics/non-ascii-characters.md: -------------------------------------------------------------------------------- 1 | #### 2.3.3 非ASCII字符 2 | 3 | 对于剩余的非ASCII字符,是使用实际的Unicode字符(比如∞),还是使用等价的Unicode转义符(比如\u221e),取决于哪个能让代码更易于阅读和理解。 4 | 5 | > > Tip: 在使用Unicode转义符或是一些实际的Unicode字符时,建议做些注释给出解释,这有助于别人阅读和理解。 6 | 7 | 例如: 8 | 9 | String unitAbbrev = "μs"; | 赞,即使没有注释也非常清晰 10 | String unitAbbrev = "\u03bcs"; // "μs" | 允许,但没有理由要这样做 11 | String unitAbbrev = "\u03bcs"; // Greek letter mu, "s" | 允许,但这样做显得笨拙还容易出错 12 | String unitAbbrev = "\u03bcs"; | 很糟,读者根本看不出这是什么 13 | return '\ufeff' + content; // byte order mark | Good,对于非打印字符,使用转义,并在必要时写上注释 14 | 15 | > > Tip: 永远不要由于害怕某些程序可能无法正确处理非ASCII字符而让你的代码可读性变差。当程序无法正确处理非ASCII字符时,它自然无法正确运行, 你就会去fix这些问题的了。(言下之意就是大胆去用非ASCII字符,如果真的有需要的话) 16 | -------------------------------------------------------------------------------- /source-file-basics/special-characters.md: -------------------------------------------------------------------------------- 1 | ### 2.3 特殊字符 2 | -------------------------------------------------------------------------------- /source-file-basics/special-escape-sequences.md: -------------------------------------------------------------------------------- 1 | #### 2.3.2 特殊转义序列 2 | 3 | 对于具有特殊[转义序列](http://zh.wikipedia.org/wiki/%E8%BD%AC%E4%B9%89%E5%BA%8F%E5%88%97)的任何字符(\b, \t, \n, \f, \r, \“, \‘及\),我们使用它的转义序列,而不是相应的八进制(比如`\012`)或Unicode(比如`\u000a`)转义。 4 | -------------------------------------------------------------------------------- /source-file-basics/whitespace-characters.md: -------------------------------------------------------------------------------- 1 | #### 2.3.1 空白字符 2 | 3 | 除了行结束符序列,ASCII水平空格字符(0x20,即空格)是源文件中唯一允许出现的空白字符,这意味着: 4 | 5 | 1. 所有其它字符串中的空白字符都要进行转义。 6 | 2. 制表符不用于缩进。 7 | -------------------------------------------------------------------------------- /source-file-structure/README.md: -------------------------------------------------------------------------------- 1 | ## 源文件结构 2 | 3 | 一个源文件包含(按顺序地): 4 | 5 | 1. 许可证或版权信息(如有需要) 6 | 2. package语句 7 | 3. import语句 8 | 4. 一个顶级类(**只有一个**) 9 | 10 | 以上每个部分之间用一个空行隔开。 11 | -------------------------------------------------------------------------------- /source-file-structure/class-declaration.md: -------------------------------------------------------------------------------- 1 | ### 3.4 类声明 2 | -------------------------------------------------------------------------------- /source-file-structure/class-member-ordering.md: -------------------------------------------------------------------------------- 1 | #### 3.4.2 类成员顺序 2 | 3 | 类的成员顺序对易学性有很大的影响,但这也不存在唯一的通用法则。不同的类对成员的排序可能是不同的。 最重要的一点,每个类应该以某种逻辑去排序它的成员,维护者应该要能解释这种排序逻辑。比如, 新的方法不能总是习惯性地添加到类的结尾,因为这样就是按时间顺序而非某种逻辑来排序的。 4 | 5 | ##### 3.4.2.1 重载:永不分离 6 | 7 | 当一个类有多个构造函数,或是多个同名方法,这些函数/方法应该按顺序出现在一起,中间不要放进其它函数/方法。 8 | -------------------------------------------------------------------------------- /source-file-structure/copyright-statement.md: -------------------------------------------------------------------------------- 1 | ### 3.1 许可证或版权信息 2 | 3 | 如果一个文件包含许可证或版权信息,那么它应当被放在文件最前面。 4 | -------------------------------------------------------------------------------- /source-file-structure/import-line-wrapping.md: -------------------------------------------------------------------------------- 1 | #### 3.3.2 不要换行 2 | 3 | import语句不换行,列限制(4.4节)并不适用于import语句。(每个import语句独立成行) 4 | 5 | -------------------------------------------------------------------------------- /source-file-structure/import-ordering-and-spacing.md: -------------------------------------------------------------------------------- 1 | #### 3.3.3 顺序和间距 2 | 3 | import语句可分为以下几组,按照这个顺序,每组由一个空行分隔: 4 | 5 | 1. 所有的静态导入独立成组 6 | 2. `com.google` imports(仅当这个源文件是在`com.google`包下) 7 | 3. 第三方的包。每个顶级包为一组,字典序。例如:android, com, junit, org, sun 8 | 4. `java` imports 9 | 5. `javax` imports 10 | 11 | 组内不空行,按字典序排列。 12 | -------------------------------------------------------------------------------- /source-file-structure/import-statements.md: -------------------------------------------------------------------------------- 1 | ### 3.3 import语句 2 | -------------------------------------------------------------------------------- /source-file-structure/one-top-level-class.md: -------------------------------------------------------------------------------- 1 | #### 3.4.1 只有一个顶级类声明 2 | 3 | 每个顶级类都在一个与它同名的源文件中(当然,还包含`.java`后缀)。 4 | 5 | 例外:`package-info.java`,该文件中可没有`package-info`类。 6 | -------------------------------------------------------------------------------- /source-file-structure/overloads-never-split.md: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /source-file-structure/package-statement.md: -------------------------------------------------------------------------------- 1 | ### 3.2 package语句 2 | 3 | package语句不换行,列限制(4.4节)并不适用于package语句。(即package语句写在一行里) 4 | -------------------------------------------------------------------------------- /source-file-structure/wildcard-imports.md: -------------------------------------------------------------------------------- 1 | #### 3.3.1 import不要使用通配符 2 | 3 | 即,不要出现类似这样的import语句:`import java.util.*;` 4 | --------------------------------------------------------------------------------