Codebase list libfastutil-java / upstream/8.5.8+dfsg
New upstream version 8.5.8+dfsg Pierre Gruet 2 years ago
236 changed file(s) with 3205 addition(s) and 589 deletion(s). Raw diff Collapse all Expand all
0 eclipse.preferences.version=1
1 org.eclipse.jdt.core.classpathVariable.IVY_HOME=/Users/vigna/.ivy2
2 org.eclipse.jdt.core.classpathVariable.JRE_LIB=/Library/Java/JavaVirtualMachines/jdk-10.0.1.jdk/Contents/Home/lib/jrt-fs.jar
3 org.eclipse.jdt.core.classpathVariable.JRE_SRC=/Library/Java/JavaVirtualMachines/jdk-10.0.1.jdk/Contents/Home/lib/src.zip
4 org.eclipse.jdt.core.classpathVariable.JRE_SRCROOT=
5 org.eclipse.jdt.core.classpathVariable.JUNIT_HOME=/Users/vigna/.p2/pool/plugins/org.junit_4.12.0.v201504281640
6 org.eclipse.jdt.core.classpathVariable.M2_REPO=/Users/vigna/.m2/repository
7 org.eclipse.jdt.core.codeComplete.argumentPrefixes=
8 org.eclipse.jdt.core.codeComplete.argumentSuffixes=
9 org.eclipse.jdt.core.codeComplete.fieldPrefixes=
10 org.eclipse.jdt.core.codeComplete.fieldSuffixes=
11 org.eclipse.jdt.core.codeComplete.localPrefixes=
12 org.eclipse.jdt.core.codeComplete.localSuffixes=
13 org.eclipse.jdt.core.codeComplete.staticFieldPrefixes=
14 org.eclipse.jdt.core.codeComplete.staticFieldSuffixes=
15 org.eclipse.jdt.core.codeComplete.staticFinalFieldPrefixes=
16 org.eclipse.jdt.core.codeComplete.staticFinalFieldSuffixes=
17 org.eclipse.jdt.core.codeComplete.visibilityCheck=enabled
18 org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=disabled
19 org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore
20 org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull
21 org.eclipse.jdt.core.compiler.annotation.nonnull.secondary=
22 org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
23 org.eclipse.jdt.core.compiler.annotation.nonnullbydefault.secondary=
24 org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
25 org.eclipse.jdt.core.compiler.annotation.nullable.secondary=
26 org.eclipse.jdt.core.compiler.annotation.nullanalysis=enabled
27 org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
28 org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
29 org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
30 org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
31 org.eclipse.jdt.core.compiler.compliance=1.8
32 org.eclipse.jdt.core.compiler.debug.lineNumber=generate
33 org.eclipse.jdt.core.compiler.debug.localVariable=generate
34 org.eclipse.jdt.core.compiler.debug.sourceFile=generate
35 org.eclipse.jdt.core.compiler.problem.APILeak=warning
36 org.eclipse.jdt.core.compiler.problem.annotatedTypeArgumentToUnannotated=info
37 org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
38 org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
39 org.eclipse.jdt.core.compiler.problem.autoboxing=warning
40 org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
41 org.eclipse.jdt.core.compiler.problem.deadCode=warning
42 org.eclipse.jdt.core.compiler.problem.deprecation=warning
43 org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
44 org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
45 org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
46 org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
47 org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
48 org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
49 org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=ignore
50 org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
51 org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
52 org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
53 org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
54 org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
55 org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
56 org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
57 org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=enabled
58 org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
59 org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=warning
60 org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
61 org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
62 org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
63 org.eclipse.jdt.core.compiler.problem.missingDefaultCase=ignore
64 org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=warning
65 org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled
66 org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=warning
67 org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=warning
68 org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
69 org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
70 org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
71 org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
72 org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
73 org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
74 org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning
75 org.eclipse.jdt.core.compiler.problem.nonnullTypeVariableFromLegacyInvocation=warning
76 org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error
77 org.eclipse.jdt.core.compiler.problem.nullReference=error
78 org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
79 org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning
80 org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
81 org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
82 org.eclipse.jdt.core.compiler.problem.pessimisticNullAnalysisForFreeTypeVariables=warning
83 org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore
84 org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
85 org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=ignore
86 org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
87 org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning
88 org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning
89 org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=warning
90 org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
91 org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
92 org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore
93 org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
94 org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
95 org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
96 org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
97 org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
98 org.eclipse.jdt.core.compiler.problem.suppressWarningsNotFullyAnalysed=info
99 org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=disabled
100 org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
101 org.eclipse.jdt.core.compiler.problem.terminalDeprecation=warning
102 org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
103 org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=disabled
104 org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
105 org.eclipse.jdt.core.compiler.problem.unclosedCloseable=warning
106 org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
107 org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
108 org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentType=warning
109 org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentTypeStrict=disabled
110 org.eclipse.jdt.core.compiler.problem.unlikelyEqualsArgumentType=warning
111 org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
112 org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
113 org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
114 org.eclipse.jdt.core.compiler.problem.unstableAutoModuleName=warning
115 org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
116 org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
117 org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
118 org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
119 org.eclipse.jdt.core.compiler.problem.unusedExceptionParameter=ignore
120 org.eclipse.jdt.core.compiler.problem.unusedImport=warning
121 org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
122 org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
123 org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
124 org.eclipse.jdt.core.compiler.problem.unusedParameter=warning
125 org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
126 org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
127 org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
128 org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
129 org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=warning
130 org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
131 org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
132 org.eclipse.jdt.core.compiler.release=enabled
133 org.eclipse.jdt.core.compiler.source=1.8
134 org.eclipse.jdt.core.compiler.taskCaseSensitive=enabled
135 org.eclipse.jdt.core.compiler.taskPriorities=NORMAL,HIGH,NORMAL
136 org.eclipse.jdt.core.compiler.taskTags=TODO,FIXME,XXX
137 org.eclipse.jdt.core.formatter.align_assignment_statements_on_columns=false
138 org.eclipse.jdt.core.formatter.align_fields_grouping_blank_lines=2147483647
139 org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
140 org.eclipse.jdt.core.formatter.align_variable_declarations_on_columns=false
141 org.eclipse.jdt.core.formatter.align_with_spaces=false
142 org.eclipse.jdt.core.formatter.alignment_for_additive_operator=0
143 org.eclipse.jdt.core.formatter.alignment_for_annotations_on_enum_constant=49
144 org.eclipse.jdt.core.formatter.alignment_for_annotations_on_field=49
145 org.eclipse.jdt.core.formatter.alignment_for_annotations_on_local_variable=49
146 org.eclipse.jdt.core.formatter.alignment_for_annotations_on_method=49
147 org.eclipse.jdt.core.formatter.alignment_for_annotations_on_package=49
148 org.eclipse.jdt.core.formatter.alignment_for_annotations_on_parameter=0
149 org.eclipse.jdt.core.formatter.alignment_for_annotations_on_type=49
150 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=0
151 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
152 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=0
153 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=0
154 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=0
155 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=0
156 org.eclipse.jdt.core.formatter.alignment_for_assertion_message=0
157 org.eclipse.jdt.core.formatter.alignment_for_assignment=0
158 org.eclipse.jdt.core.formatter.alignment_for_binary_expression=0
159 org.eclipse.jdt.core.formatter.alignment_for_bitwise_operator=0
160 org.eclipse.jdt.core.formatter.alignment_for_compact_if=0
161 org.eclipse.jdt.core.formatter.alignment_for_compact_loops=0
162 org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=0
163 org.eclipse.jdt.core.formatter.alignment_for_conditional_expression_chain=0
164 org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
165 org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
166 org.eclipse.jdt.core.formatter.alignment_for_expressions_in_for_loop_header=0
167 org.eclipse.jdt.core.formatter.alignment_for_logical_operator=0
168 org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
169 org.eclipse.jdt.core.formatter.alignment_for_module_statements=16
170 org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
171 org.eclipse.jdt.core.formatter.alignment_for_multiplicative_operator=0
172 org.eclipse.jdt.core.formatter.alignment_for_parameterized_type_references=0
173 org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=0
174 org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=0
175 org.eclipse.jdt.core.formatter.alignment_for_record_components=0
176 org.eclipse.jdt.core.formatter.alignment_for_relational_operator=0
177 org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=0
178 org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=0
179 org.eclipse.jdt.core.formatter.alignment_for_shift_operator=0
180 org.eclipse.jdt.core.formatter.alignment_for_string_concatenation=0
181 org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=0
182 org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=0
183 org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_record_declaration=0
184 org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=0
185 org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=0
186 org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=0
187 org.eclipse.jdt.core.formatter.alignment_for_type_annotations=0
188 org.eclipse.jdt.core.formatter.alignment_for_type_arguments=0
189 org.eclipse.jdt.core.formatter.alignment_for_type_parameters=0
190 org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=0
191 org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
192 org.eclipse.jdt.core.formatter.blank_lines_after_last_class_body_declaration=0
193 org.eclipse.jdt.core.formatter.blank_lines_after_package=1
194 org.eclipse.jdt.core.formatter.blank_lines_before_abstract_method=1
195 org.eclipse.jdt.core.formatter.blank_lines_before_field=0
196 org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
197 org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
198 org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
199 org.eclipse.jdt.core.formatter.blank_lines_before_method=1
200 org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
201 org.eclipse.jdt.core.formatter.blank_lines_before_package=0
202 org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
203 org.eclipse.jdt.core.formatter.blank_lines_between_statement_group_in_switch=0
204 org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
205 org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
206 org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
207 org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
208 org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
209 org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
210 org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
211 org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
212 org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
213 org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=end_of_line
214 org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
215 org.eclipse.jdt.core.formatter.brace_position_for_record_constructor=end_of_line
216 org.eclipse.jdt.core.formatter.brace_position_for_record_declaration=end_of_line
217 org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
218 org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
219 org.eclipse.jdt.core.formatter.comment.align_tags_descriptions_grouped=false
220 org.eclipse.jdt.core.formatter.comment.align_tags_names_descriptions=false
221 org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
222 org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
223 org.eclipse.jdt.core.formatter.comment.count_line_length_from_starting_position=true
224 org.eclipse.jdt.core.formatter.comment.format_block_comments=false
225 org.eclipse.jdt.core.formatter.comment.format_header=false
226 org.eclipse.jdt.core.formatter.comment.format_html=true
227 org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
228 org.eclipse.jdt.core.formatter.comment.format_line_comments=true
229 org.eclipse.jdt.core.formatter.comment.format_source_code=true
230 org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
231 org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
232 org.eclipse.jdt.core.formatter.comment.indent_tag_description=false
233 org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
234 org.eclipse.jdt.core.formatter.comment.insert_new_line_between_different_tags=do not insert
235 org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert
236 org.eclipse.jdt.core.formatter.comment.line_length=100
237 org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
238 org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
239 org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
240 org.eclipse.jdt.core.formatter.compact_else_if=true
241 org.eclipse.jdt.core.formatter.continuation_indentation=2
242 org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
243 org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
244 org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
245 org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
246 org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
247 org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
248 org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
249 org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
250 org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_record_header=true
251 org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
252 org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
253 org.eclipse.jdt.core.formatter.indent_empty_lines=false
254 org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
255 org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
256 org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
257 org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
258 org.eclipse.jdt.core.formatter.indentation.size=8
259 org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_enum_constant=insert
260 org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
261 org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
262 org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
263 org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
264 org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
265 org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
266 org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
267 org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
268 org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation=do not insert
269 org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
270 org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
271 org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
272 org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
273 org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
274 org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
275 org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
276 org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
277 org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
278 org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
279 org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
280 org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
281 org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
282 org.eclipse.jdt.core.formatter.insert_space_after_additive_operator=insert
283 org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
284 org.eclipse.jdt.core.formatter.insert_space_after_arrow_in_switch_case=insert
285 org.eclipse.jdt.core.formatter.insert_space_after_arrow_in_switch_default=insert
286 org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
287 org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
288 org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
289 org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
290 org.eclipse.jdt.core.formatter.insert_space_after_bitwise_operator=insert
291 org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
292 org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
293 org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
294 org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=do not insert
295 org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
296 org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
297 org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
298 org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
299 org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
300 org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
301 org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
302 org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
303 org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
304 org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
305 org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
306 org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
307 org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
308 org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
309 org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
310 org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
311 org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
312 org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
313 org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
314 org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
315 org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
316 org.eclipse.jdt.core.formatter.insert_space_after_comma_in_record_components=insert
317 org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
318 org.eclipse.jdt.core.formatter.insert_space_after_comma_in_switch_case_expressions=insert
319 org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
320 org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
321 org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
322 org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow=insert
323 org.eclipse.jdt.core.formatter.insert_space_after_logical_operator=insert
324 org.eclipse.jdt.core.formatter.insert_space_after_multiplicative_operator=insert
325 org.eclipse.jdt.core.formatter.insert_space_after_not_operator=do not insert
326 org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
327 org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
328 org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
329 org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
330 org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
331 org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
332 org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
333 org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
334 org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
335 org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
336 org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
337 org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
338 org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
339 org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
340 org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
341 org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
342 org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_record_declaration=do not insert
343 org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
344 org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
345 org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
346 org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
347 org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
348 org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
349 org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
350 org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
351 org.eclipse.jdt.core.formatter.insert_space_after_relational_operator=insert
352 org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
353 org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
354 org.eclipse.jdt.core.formatter.insert_space_after_shift_operator=insert
355 org.eclipse.jdt.core.formatter.insert_space_after_string_concatenation=insert
356 org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
357 org.eclipse.jdt.core.formatter.insert_space_before_additive_operator=insert
358 org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
359 org.eclipse.jdt.core.formatter.insert_space_before_arrow_in_switch_case=insert
360 org.eclipse.jdt.core.formatter.insert_space_before_arrow_in_switch_default=insert
361 org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
362 org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
363 org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
364 org.eclipse.jdt.core.formatter.insert_space_before_bitwise_operator=insert
365 org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
366 org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
367 org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
368 org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
369 org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
370 org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
371 org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
372 org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
373 org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
374 org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
375 org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
376 org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
377 org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
378 org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
379 org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
380 org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
381 org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_record_declaration=do not insert
382 org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
383 org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
384 org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
385 org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
386 org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
387 org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
388 org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
389 org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
390 org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
391 org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
392 org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
393 org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
394 org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
395 org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
396 org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
397 org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
398 org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
399 org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
400 org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
401 org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
402 org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
403 org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
404 org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
405 org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
406 org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
407 org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
408 org.eclipse.jdt.core.formatter.insert_space_before_comma_in_record_components=do not insert
409 org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
410 org.eclipse.jdt.core.formatter.insert_space_before_comma_in_switch_case_expressions=do not insert
411 org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
412 org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
413 org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
414 org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow=insert
415 org.eclipse.jdt.core.formatter.insert_space_before_logical_operator=insert
416 org.eclipse.jdt.core.formatter.insert_space_before_multiplicative_operator=insert
417 org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
418 org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
419 org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
420 org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
421 org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
422 org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
423 org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
424 org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
425 org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
426 org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
427 org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
428 org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_record_constructor=insert
429 org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_record_declaration=insert
430 org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
431 org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
432 org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
433 org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
434 org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
435 org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
436 org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
437 org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
438 org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
439 org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
440 org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
441 org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
442 org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
443 org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
444 org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
445 org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_record_declaration=do not insert
446 org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
447 org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
448 org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
449 org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
450 org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
451 org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
452 org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
453 org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
454 org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
455 org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
456 org.eclipse.jdt.core.formatter.insert_space_before_relational_operator=insert
457 org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
458 org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
459 org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
460 org.eclipse.jdt.core.formatter.insert_space_before_shift_operator=insert
461 org.eclipse.jdt.core.formatter.insert_space_before_string_concatenation=insert
462 org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
463 org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
464 org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
465 org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
466 org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
467 org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
468 org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
469 org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
470 org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
471 org.eclipse.jdt.core.formatter.join_lines_in_comments=true
472 org.eclipse.jdt.core.formatter.join_wrapped_lines=true
473 org.eclipse.jdt.core.formatter.keep_annotation_declaration_on_one_line=one_line_never
474 org.eclipse.jdt.core.formatter.keep_anonymous_type_declaration_on_one_line=one_line_never
475 org.eclipse.jdt.core.formatter.keep_code_block_on_one_line=one_line_never
476 org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=true
477 org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
478 org.eclipse.jdt.core.formatter.keep_enum_constant_declaration_on_one_line=one_line_never
479 org.eclipse.jdt.core.formatter.keep_enum_declaration_on_one_line=one_line_never
480 org.eclipse.jdt.core.formatter.keep_if_then_body_block_on_one_line=one_line_never
481 org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
482 org.eclipse.jdt.core.formatter.keep_lambda_body_block_on_one_line=one_line_never
483 org.eclipse.jdt.core.formatter.keep_loop_body_block_on_one_line=one_line_never
484 org.eclipse.jdt.core.formatter.keep_method_body_on_one_line=one_line_never
485 org.eclipse.jdt.core.formatter.keep_record_constructor_on_one_line=one_line_never
486 org.eclipse.jdt.core.formatter.keep_record_declaration_on_one_line=one_line_never
487 org.eclipse.jdt.core.formatter.keep_simple_do_while_body_on_same_line=true
488 org.eclipse.jdt.core.formatter.keep_simple_for_body_on_same_line=true
489 org.eclipse.jdt.core.formatter.keep_simple_getter_setter_on_one_line=false
490 org.eclipse.jdt.core.formatter.keep_simple_while_body_on_same_line=true
491 org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=true
492 org.eclipse.jdt.core.formatter.keep_type_declaration_on_one_line=one_line_never
493 org.eclipse.jdt.core.formatter.lineSplit=120
494 org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
495 org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
496 org.eclipse.jdt.core.formatter.number_of_blank_lines_after_code_block=0
497 org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_code_block=0
498 org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
499 org.eclipse.jdt.core.formatter.number_of_blank_lines_at_end_of_code_block=0
500 org.eclipse.jdt.core.formatter.number_of_blank_lines_at_end_of_method_body=0
501 org.eclipse.jdt.core.formatter.number_of_blank_lines_before_code_block=0
502 org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
503 org.eclipse.jdt.core.formatter.parentheses_positions_in_annotation=common_lines
504 org.eclipse.jdt.core.formatter.parentheses_positions_in_catch_clause=common_lines
505 org.eclipse.jdt.core.formatter.parentheses_positions_in_enum_constant_declaration=common_lines
506 org.eclipse.jdt.core.formatter.parentheses_positions_in_for_statment=common_lines
507 org.eclipse.jdt.core.formatter.parentheses_positions_in_if_while_statement=common_lines
508 org.eclipse.jdt.core.formatter.parentheses_positions_in_lambda_declaration=common_lines
509 org.eclipse.jdt.core.formatter.parentheses_positions_in_method_delcaration=common_lines
510 org.eclipse.jdt.core.formatter.parentheses_positions_in_method_invocation=common_lines
511 org.eclipse.jdt.core.formatter.parentheses_positions_in_record_declaration=common_lines
512 org.eclipse.jdt.core.formatter.parentheses_positions_in_switch_statement=common_lines
513 org.eclipse.jdt.core.formatter.parentheses_positions_in_try_clause=common_lines
514 org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
515 org.eclipse.jdt.core.formatter.tabulation.char=tab
516 org.eclipse.jdt.core.formatter.tabulation.size=4
517 org.eclipse.jdt.core.formatter.text_block_indentation=0
518 org.eclipse.jdt.core.formatter.use_on_off_tags=false
519 org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
520 org.eclipse.jdt.core.formatter.wrap_before_additive_operator=true
521 org.eclipse.jdt.core.formatter.wrap_before_assertion_message_operator=true
522 org.eclipse.jdt.core.formatter.wrap_before_assignment_operator=false
523 org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
524 org.eclipse.jdt.core.formatter.wrap_before_bitwise_operator=true
525 org.eclipse.jdt.core.formatter.wrap_before_conditional_operator=true
526 org.eclipse.jdt.core.formatter.wrap_before_logical_operator=true
527 org.eclipse.jdt.core.formatter.wrap_before_multiplicative_operator=true
528 org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
529 org.eclipse.jdt.core.formatter.wrap_before_relational_operator=true
530 org.eclipse.jdt.core.formatter.wrap_before_shift_operator=true
531 org.eclipse.jdt.core.formatter.wrap_before_string_concatenation=true
532 org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
533 org.eclipse.jdt.core.timeoutForParameterNameFromAttachedJavadoc=50
0 CustomFiltersActionGroup.org.eclipse.jdt.ui.PackageExplorer.TAG_DUMMY_TO_TEST_EXISTENCE=storedViewPreferences
1 breadcrumb.org.eclipse.jdt.ui.JavaPerspective=true
2 content_assist_autoinsert=true
3 content_assist_category_order=org.eclipse.jdt.ui.templateProposalCategory\:0\u0000org.eclipse.jdt.ui.swtProposalCategory\:1\u0000org.eclipse.jdt.ui.javaNoTypeProposalCategory\:65537\u0000org.eclipse.jdt.ui.javaTypeProposalCategory\:65538\u0000org.eclipse.jdt.ui.textProposalCategory\:65539\u0000org.eclipse.jdt.ui.javaAllProposalCategory\:5\u0000org.eclipse.jdt.ui.javaChainProposalCategory\:6\u0000org.eclipse.mylyn.java.ui.javaAllProposalCategory\:65542\u0000
4 content_assist_disabled_computers=org.eclipse.jdt.ui.javaNoTypeProposalCategory\u0000org.eclipse.jdt.ui.javaTypeProposalCategory\u0000org.eclipse.jdt.ui.textProposalCategory\u0000org.eclipse.mylyn.java.ui.javaAllProposalCategory\u0000
5 content_assist_insert_completion=true
6 content_assist_lru_history=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><history maxLHS\="100" maxRHS\="10"><lhs name\="it.unimi.dsi.fastutil.objects.ObjectList"><rhs name\="it.unimi.dsi.util.FrontCodedStringList"/><rhs name\="it.unimi.dsi.fastutil.objects.ObjectArrayList"/></lhs><lhs name\="java.util.List"><rhs name\="it.unimi.dsi.util.FrontCodedStringList"/><rhs name\="it.unimi.dsi.fastutil.objects.ObjectArrayList"/><rhs name\="java.util.ArrayList"/></lhs><lhs name\="it.unimi.dsi.util.FrontCodedStringList"><rhs name\="it.unimi.dsi.util.FrontCodedStringList"/></lhs><lhs name\="org.jgrapht.opt.graph.sparse.IncomingEdgesSupport"><rhs name\="org.jgrapht.opt.graph.sparse.IncomingEdgesSupport"/></lhs><lhs name\="org.apache.commons.math3.random.AbstractRandomGenerator"><rhs name\="it.unimi.dsi.util.XoRoShiRo128PlusRandomGenerator"/><rhs name\="it.unimi.dsi.util.XoRoShiRo128PlusPlusRandomGenerator"/></lhs><lhs name\="org.apache.commons.math3.random.RandomGenerator"><rhs name\="it.unimi.dsi.util.XoRoShiRo128PlusRandomGenerator"/><rhs name\="it.unimi.dsi.util.XoRoShiRo128PlusPlusRandomGenerator"/></lhs><lhs name\="it.unimi.dsi.util.XoRoShiRo128PlusRandomGenerator"><rhs name\="it.unimi.dsi.util.XoRoShiRo128PlusRandomGenerator"/></lhs><lhs name\="org.rocksdb.RocksObject"><rhs name\="org.rocksdb.ColumnFamilyHandle"/></lhs><lhs name\="org.rocksdb.AbstractImmutableNativeReference"><rhs name\="org.rocksdb.ColumnFamilyHandle"/></lhs><lhs name\="org.rocksdb.AbstractNativeReference"><rhs name\="org.rocksdb.ColumnFamilyHandle"/></lhs><lhs name\="java.lang.AutoCloseable"><rhs name\="org.rocksdb.ColumnFamilyHandle"/><rhs name\="java.io.FileWriter"/><rhs name\="java.io.InputStreamReader"/><rhs name\="java.io.OutputStreamWriter"/><rhs name\="eu.fasten.core.data.callableindex.RocksDao"/><rhs name\="it.unimi.dsi.fastutil.io.FastBufferedOutputStream"/><rhs name\="it.unimi.dsi.fastutil.io.FastBufferedInputStream"/><rhs name\="it.unimi.dsi.fastutil.io.FastByteArrayInputStream"/><rhs name\="it.unimi.dsi.big.util.MappedFrontCodedStringBigList"/></lhs><lhs name\="org.rocksdb.ColumnFamilyHandle"><rhs name\="org.rocksdb.ColumnFamilyHandle"/></lhs><lhs name\="it.unimi.dsi.fastutil.longs.Long2ObjectOpenHashMap"><rhs name\="it.unimi.dsi.fastutil.longs.Long2ObjectOpenHashMap"/></lhs><lhs name\="it.unimi.dsi.fastutil.io.RepositionableStream"><rhs name\="it.unimi.dsi.fastutil.io.FastByteArrayInputStream"/><rhs name\="it.unimi.dsi.fastutil.io.FastBufferedInputStream"/></lhs><lhs name\="it.unimi.dsi.fastutil.io.MeasurableInputStream"><rhs name\="it.unimi.dsi.fastutil.io.FastByteArrayInputStream"/><rhs name\="it.unimi.dsi.fastutil.io.FastBufferedInputStream"/></lhs><lhs name\="it.unimi.dsi.fastutil.io.MeasurableStream"><rhs name\="it.unimi.dsi.fastutil.io.FastByteArrayInputStream"/><rhs name\="it.unimi.dsi.fastutil.io.FastBufferedInputStream"/></lhs><lhs name\="java.io.InputStream"><rhs name\="it.unimi.dsi.fastutil.io.FastBufferedInputStream"/><rhs name\="it.unimi.dsi.fastutil.io.FastByteArrayInputStream"/></lhs><lhs name\="java.io.Closeable"><rhs name\="java.io.FileWriter"/><rhs name\="java.io.InputStreamReader"/><rhs name\="java.io.OutputStreamWriter"/><rhs name\="eu.fasten.core.data.callableindex.RocksDao"/><rhs name\="it.unimi.dsi.fastutil.io.FastBufferedOutputStream"/><rhs name\="it.unimi.dsi.fastutil.io.FastBufferedInputStream"/><rhs name\="it.unimi.dsi.fastutil.io.FastByteArrayInputStream"/><rhs name\="it.unimi.dsi.big.util.MappedFrontCodedStringBigList"/></lhs><lhs name\="it.unimi.dsi.fastutil.io.FastByteArrayInputStream"><rhs name\="it.unimi.dsi.fastutil.io.FastByteArrayInputStream"/></lhs><lhs name\="java.util.Collection"><rhs name\="it.unimi.dsi.sux4j.util.ZFastTrie"/><rhs name\="it.unimi.dsi.bits.LongArrayBitVector"/><rhs name\="it.unimi.dsi.fastutil.objects.ObjectArrayList"/><rhs name\="it.unimi.dsi.fastutil.objects.ObjectOpenHashSet"/><rhs name\="it.unimi.dsi.fastutil.longs.LongOpenHashSet"/><rhs name\="it.unimi.dsi.fastutil.longs.LongLinkedOpenHashSet"/><rhs name\="java.util.LinkedHashSet"/><rhs name\="java.util.ArrayList"/><rhs name\="it.unimi.dsi.big.util.MappedFrontCodedStringBigList"/></lhs><lhs name\="java.lang.Iterable"><rhs name\="it.unimi.dsi.sux4j.util.ZFastTrie"/><rhs name\="it.unimi.dsi.bits.LongArrayBitVector"/><rhs name\="it.unimi.dsi.fastutil.objects.ObjectArrayList"/><rhs name\="it.unimi.dsi.fastutil.objects.ObjectOpenHashSet"/><rhs name\="it.unimi.dsi.fastutil.longs.LongOpenHashSet"/><rhs name\="it.unimi.dsi.fastutil.longs.LongLinkedOpenHashSet"/><rhs name\="java.util.LinkedHashSet"/><rhs name\="com.google.common.collect.testing.SampleElements"/><rhs name\="java.util.ArrayList"/><rhs name\="it.unimi.dsi.big.util.MappedFrontCodedStringBigList"/></lhs><lhs name\="java.util.RandomAccess"><rhs name\="java.util.ArrayList"/><rhs name\="it.unimi.dsi.bits.LongArrayBitVector"/><rhs name\="it.unimi.dsi.fastutil.objects.ObjectArrayList"/><rhs name\="it.unimi.dsi.big.util.MappedFrontCodedStringBigList"/></lhs><lhs name\="java.util.AbstractList"><rhs name\="java.util.ArrayList"/></lhs><lhs name\="java.util.AbstractCollection"><rhs name\="java.util.ArrayList"/><rhs name\="it.unimi.dsi.sux4j.util.ZFastTrie"/><rhs name\="it.unimi.dsi.bits.LongArrayBitVector"/><rhs name\="it.unimi.dsi.fastutil.objects.ObjectArrayList"/><rhs name\="java.util.LinkedHashSet"/><rhs name\="it.unimi.dsi.big.util.MappedFrontCodedStringBigList"/></lhs><lhs name\="java.util.ArrayList"><rhs name\="java.util.ArrayList"/></lhs><lhs name\="eu.fasten.core.data.graphdb.GraphMetadata"><rhs name\="eu.fasten.core.data.graphdb.GraphMetadata"/></lhs><lhs name\="eu.fasten.core.data.graphdb.GraphMetadata$ReceiverRecord$Type"><rhs name\="eu.fasten.core.data.graphdb.GraphMetadata$ReceiverRecord$Type"/></lhs><lhs name\="java.util.concurrent.locks.ReadWriteLock"><rhs name\="java.util.concurrent.locks.ReentrantReadWriteLock"/></lhs><lhs name\="java.util.concurrent.locks.ReentrantReadWriteLock"><rhs name\="java.util.concurrent.locks.ReentrantReadWriteLock"/></lhs><lhs name\="com.google.common.collect.BiMap"><rhs name\="com.google.common.collect.HashBiMap"/></lhs><lhs name\="java.util.concurrent.ConcurrentMap"><rhs name\="java.util.concurrent.ConcurrentHashMap"/></lhs><lhs name\="it.unimi.dsi.fastutil.objects.ObjectCollection"><rhs name\="it.unimi.dsi.sux4j.util.ZFastTrie"/><rhs name\="it.unimi.dsi.fastutil.objects.ObjectArrayList"/><rhs name\="it.unimi.dsi.big.util.MappedFrontCodedStringBigList"/></lhs><lhs name\="it.unimi.dsi.fastutil.objects.ObjectIterable"><rhs name\="it.unimi.dsi.sux4j.util.ZFastTrie"/><rhs name\="it.unimi.dsi.fastutil.objects.ObjectArrayList"/><rhs name\="it.unimi.dsi.big.util.MappedFrontCodedStringBigList"/></lhs><lhs name\="it.unimi.dsi.fastutil.objects.AbstractObjectCollection"><rhs name\="it.unimi.dsi.sux4j.util.ZFastTrie"/><rhs name\="it.unimi.dsi.fastutil.objects.ObjectArrayList"/><rhs name\="it.unimi.dsi.big.util.MappedFrontCodedStringBigList"/></lhs><lhs name\="it.unimi.dsi.fastutil.objects.ObjectArrayList"><rhs name\="it.unimi.dsi.fastutil.objects.ObjectArrayList"/></lhs><lhs name\="it.unimi.dsi.sux4j.util.ZFastTrie"><rhs name\="it.unimi.dsi.sux4j.util.ZFastTrie"/></lhs><lhs name\="java.util.function.LongToDoubleFunction"><rhs name\="it.unimi.dsi.fastutil.longs.Long2DoubleArrayMap"/><rhs name\="it.unimi.dsi.fastutil.longs.Long2DoubleOpenHashMap"/></lhs><lhs name\="it.unimi.dsi.fastutil.longs.Long2DoubleFunction"><rhs name\="it.unimi.dsi.fastutil.longs.Long2DoubleArrayMap"/><rhs name\="it.unimi.dsi.fastutil.longs.Long2DoubleOpenHashMap"/></lhs><lhs name\="it.unimi.dsi.fastutil.Hash"><rhs name\="it.unimi.dsi.fastutil.longs.Long2DoubleOpenHashMap"/><rhs name\="it.unimi.dsi.fastutil.longs.Long2IntOpenHashMap"/></lhs><lhs name\="it.unimi.dsi.fastutil.longs.AbstractLong2DoubleMap"><rhs name\="it.unimi.dsi.fastutil.longs.Long2DoubleOpenHashMap"/></lhs><lhs name\="it.unimi.dsi.fastutil.longs.Long2DoubleMap"><rhs name\="it.unimi.dsi.fastutil.longs.Long2DoubleArrayMap"/><rhs name\="it.unimi.dsi.fastutil.longs.Long2DoubleOpenHashMap"/></lhs><lhs name\="it.unimi.dsi.fastutil.longs.AbstractLong2DoubleFunction"><rhs name\="it.unimi.dsi.fastutil.longs.Long2DoubleOpenHashMap"/></lhs><lhs name\="it.unimi.dsi.fastutil.longs.Long2DoubleOpenHashMap"><rhs name\="it.unimi.dsi.fastutil.longs.Long2DoubleOpenHashMap"/></lhs><lhs name\="it.unimi.dsi.bits.AbstractBitVector"><rhs name\="it.unimi.dsi.bits.LongArrayBitVector"/></lhs><lhs name\="it.unimi.dsi.bits.BitVector"><rhs name\="it.unimi.dsi.bits.LongArrayBitVector"/></lhs><lhs name\="it.unimi.dsi.fastutil.booleans.BooleanBigList"><rhs name\="it.unimi.dsi.bits.LongArrayBitVector"/></lhs><lhs name\="it.unimi.dsi.fastutil.BigList"><rhs name\="it.unimi.dsi.bits.LongArrayBitVector"/><rhs name\="it.unimi.dsi.big.util.MappedFrontCodedStringBigList"/></lhs><lhs name\="it.unimi.dsi.fastutil.Size64"><rhs name\="it.unimi.dsi.bits.LongArrayBitVector"/><rhs name\="it.unimi.dsi.big.util.MappedFrontCodedStringBigList"/></lhs><lhs name\="it.unimi.dsi.fastutil.booleans.BooleanCollection"><rhs name\="it.unimi.dsi.bits.LongArrayBitVector"/></lhs><lhs name\="it.unimi.dsi.fastutil.booleans.BooleanIterable"><rhs name\="it.unimi.dsi.bits.LongArrayBitVector"/></lhs><lhs name\="it.unimi.dsi.fastutil.booleans.AbstractBooleanBigList"><rhs name\="it.unimi.dsi.bits.LongArrayBitVector"/></lhs><lhs name\="it.unimi.dsi.fastutil.booleans.BooleanStack"><rhs name\="it.unimi.dsi.bits.LongArrayBitVector"/></lhs><lhs name\="it.unimi.dsi.fastutil.booleans.AbstractBooleanCollection"><rhs name\="it.unimi.dsi.bits.LongArrayBitVector"/></lhs><lhs name\="it.unimi.dsi.bits.LongArrayBitVector"><rhs name\="it.unimi.dsi.bits.LongArrayBitVector"/></lhs><lhs name\="org.jgrapht.Graph"><rhs name\="org.jgrapht.graph.EdgeReversedGraph"/></lhs><lhs name\="java.util.Set"><rhs name\="it.unimi.dsi.fastutil.objects.ObjectOpenHashSet"/><rhs name\="it.unimi.dsi.fastutil.longs.LongOpenHashSet"/><rhs name\="it.unimi.dsi.fastutil.longs.LongLinkedOpenHashSet"/><rhs name\="java.util.LinkedHashSet"/></lhs><lhs name\="java.util.HashSet"><rhs name\="java.util.LinkedHashSet"/></lhs><lhs name\="java.util.AbstractSet"><rhs name\="java.util.LinkedHashSet"/></lhs><lhs name\="java.util.LinkedHashSet"><rhs name\="java.util.LinkedHashSet"/></lhs><lhs name\="it.unimi.dsi.fastutil.objects.Object2ByteFunction"><rhs name\="it.unimi.dsi.fastutil.objects.Object2ByteOpenHashMap"/></lhs><lhs name\="java.util.function.ToIntFunction"><rhs name\="it.unimi.dsi.fastutil.objects.Object2ByteOpenHashMap"/></lhs><lhs name\="it.unimi.dsi.fastutil.objects.Object2ByteMap"><rhs name\="it.unimi.dsi.fastutil.objects.Object2ByteOpenHashMap"/></lhs><lhs name\="it.unimi.dsi.lang.FlyweightPrototype"><rhs name\="it.unimi.dsi.webgraph.UnionImmutableGraph"/></lhs><lhs name\="it.unimi.dsi.webgraph.ImmutableGraph"><rhs name\="it.unimi.dsi.webgraph.UnionImmutableGraph"/></lhs><lhs name\="org.apache.commons.rng.core.source64.AbstractXoRoShiRo128"><rhs name\="org.apache.commons.rng.core.source64.XoRoShiRo128Plus"/></lhs><lhs name\="org.apache.commons.rng.LongJumpableUniformRandomProvider"><rhs name\="org.apache.commons.rng.core.source64.XoRoShiRo128Plus"/></lhs><lhs name\="org.apache.commons.rng.JumpableUniformRandomProvider"><rhs name\="org.apache.commons.rng.core.source64.XoRoShiRo128Plus"/></lhs><lhs name\="org.apache.commons.rng.UniformRandomProvider"><rhs name\="org.apache.commons.rng.core.source64.XoRoShiRo128Plus"/></lhs><lhs name\="org.apache.commons.rng.core.source64.LongProvider"><rhs name\="org.apache.commons.rng.core.source64.XoRoShiRo128Plus"/></lhs><lhs name\="org.apache.commons.rng.core.source64.RandomLongSource"><rhs name\="org.apache.commons.rng.core.source64.XoRoShiRo128Plus"/></lhs><lhs name\="org.apache.commons.rng.core.BaseProvider"><rhs name\="org.apache.commons.rng.core.source64.XoRoShiRo128Plus"/></lhs><lhs name\="org.apache.commons.rng.RestorableUniformRandomProvider"><rhs name\="org.apache.commons.rng.core.source64.XoRoShiRo128Plus"/></lhs><lhs name\="org.apache.commons.rng.core.source64.XoRoShiRo128Plus"><rhs name\="org.apache.commons.rng.core.source64.XoRoShiRo128Plus"/></lhs><lhs name\="java.util.Map"><rhs name\="it.unimi.dsi.fastutil.longs.Long2DoubleOpenHashMap"/><rhs name\="it.unimi.dsi.fastutil.longs.Long2IntOpenHashMap"/><rhs name\="it.unimi.dsi.fastutil.objects.Object2ObjectOpenHashMap"/></lhs><lhs name\="it.unimi.dsi.fastutil.longs.AbstractLong2IntMap"><rhs name\="it.unimi.dsi.fastutil.longs.Long2IntOpenHashMap"/></lhs><lhs name\="it.unimi.dsi.fastutil.longs.Long2IntMap"><rhs name\="it.unimi.dsi.fastutil.longs.Long2IntOpenHashMap"/></lhs><lhs name\="it.unimi.dsi.fastutil.longs.Long2IntFunction"><rhs name\="it.unimi.dsi.fastutil.longs.Long2IntOpenHashMap"/></lhs><lhs name\="java.util.function.LongToIntFunction"><rhs name\="it.unimi.dsi.fastutil.longs.Long2IntOpenHashMap"/></lhs><lhs name\="it.unimi.dsi.fastutil.longs.AbstractLong2IntFunction"><rhs name\="it.unimi.dsi.fastutil.longs.Long2IntOpenHashMap"/></lhs><lhs name\="it.unimi.dsi.fastutil.longs.Long2IntOpenHashMap"><rhs name\="it.unimi.dsi.fastutil.longs.Long2IntOpenHashMap"/></lhs><lhs name\="eu.fasten.core.data.ArrayImmutableDirectedGraph$Builder"><rhs name\="eu.fasten.core.data.ArrayImmutableDirectedGraph$Builder"/></lhs><lhs name\="it.unimi.dsi.fastutil.objects.Object2ObjectFunction"><rhs name\="it.unimi.dsi.fastutil.objects.Object2ObjectOpenHashMap"/></lhs><lhs name\="it.unimi.dsi.fastutil.objects.Object2ObjectMap"><rhs name\="it.unimi.dsi.fastutil.objects.Object2ObjectOpenHashMap"/></lhs><lhs name\="java.lang.Appendable"><rhs name\="java.io.FileWriter"/><rhs name\="java.io.OutputStreamWriter"/></lhs><lhs name\="java.io.Flushable"><rhs name\="java.io.FileWriter"/><rhs name\="java.io.OutputStreamWriter"/><rhs name\="it.unimi.dsi.fastutil.io.FastBufferedOutputStream"/></lhs><lhs name\="java.io.Writer"><rhs name\="java.io.FileWriter"/><rhs name\="java.io.OutputStreamWriter"/></lhs><lhs name\="com.arakelian.json.JsonFilterOptions"><rhs name\="com.arakelian.json.ImmutableJsonFilterOptions"/></lhs><lhs name\="com.arakelian.json.JsonFilter"><rhs name\="com.arakelian.json.JsonFilter"/></lhs><lhs name\="java.lang.Readable"><rhs name\="java.io.InputStreamReader"/></lhs><lhs name\="java.io.Reader"><rhs name\="java.io.InputStreamReader"/></lhs><lhs name\="eu.fasten.core.data.callableindex.RocksDao"><rhs name\="eu.fasten.core.data.callableindex.RocksDao"/></lhs><lhs name\="java.nio.file.OpenOption"><rhs name\="java.nio.file.StandardOpenOption"/></lhs><lhs name\="java.io.OutputStream"><rhs name\="it.unimi.dsi.fastutil.io.FastBufferedOutputStream"/></lhs><lhs name\="it.unimi.dsi.big.util.MappedFrontCodedStringBigList"><rhs name\="it.unimi.dsi.big.util.MappedFrontCodedStringBigList"/></lhs><lhs name\="it.unimi.dsi.util.XoRoShiRo128PlusPlusRandomGenerator"><rhs name\="it.unimi.dsi.util.XoRoShiRo128PlusPlusRandomGenerator"/></lhs><lhs name\="com.google.common.collect.testing.SampleElements"><rhs name\="com.google.common.collect.testing.SampleElements"/></lhs><lhs name\="it.unimi.dsi.fastutil.io.FastBufferedInputStream"><rhs name\="it.unimi.dsi.fastutil.io.FastBufferedInputStream"/></lhs><lhs name\="it.unimi.dsi.fastutil.objects.AbstractObjectBigList"><rhs name\="it.unimi.dsi.big.util.MappedFrontCodedStringBigList"/></lhs><lhs name\="it.unimi.dsi.fastutil.objects.ObjectBigList"><rhs name\="it.unimi.dsi.big.util.MappedFrontCodedStringBigList"/></lhs><lhs name\="it.unimi.dsi.fastutil.Stack"><rhs name\="it.unimi.dsi.big.util.MappedFrontCodedStringBigList"/></lhs></history>
7 content_assist_number_of_computers=12
8 content_assist_proposals_background=255,255,255
9 content_assist_proposals_foreground=0,0,0
10 eclipse.preferences.version=1
11 editor_folding_enabled=false
12 editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
13 formatter_profile=_LAW Conventions
14 formatter_settings_version=21
15 lastRecentlyUsedFilters=org.eclipse.jdt.internal.ui.PackageExplorer.EmptyInnerPackageFilter,org.eclipse.jdt.internal.ui.PackageExplorer.EmptyPackageFilter,
16 org.eclipse.buildship.ui.packageexplorer.filter.gradle.buildfolder=true
17 org.eclipse.buildship.ui.packageexplorer.filter.gradle.subProject=true
18 org.eclipse.jdt.internal.ui.PackageExplorer.EmptyPackageFilter=true
19 org.eclipse.jdt.internal.ui.PackageExplorer.HideInnerClassFilesFilter=true
20 org.eclipse.jdt.internal.ui.navigator.layout=2
21 org.eclipse.jdt.internal.ui.navigator.librariesnode=true
22 org.eclipse.jdt.ui.PackageExplorer.EmptyLibraryContainerFilter=true
23 org.eclipse.jdt.ui.PackageExplorer.ImportDeclarationFilter=true
24 org.eclipse.jdt.ui.PackageExplorer.PackageDeclarationFilter=true
25 org.eclipse.jdt.ui.PackageExplorer.SyntheticMembersFilter=true
26 org.eclipse.jdt.ui.PackageExplorer_patternFilterId_.*=false
27 org.eclipse.jdt.ui.exception.name=e
28 org.eclipse.jdt.ui.formatterprofiles=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?>\n<profiles version\="20">\n <profile kind\="CodeFormatterProfile" name\="JGraphT" version\="20">\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_after_ellipsis" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.parentheses_positions_in_for_statment" value\="common_lines"/>\n <setting id\="org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries" value\="true"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.comment.format_javadoc_comments" value\="true"/>\n <setting id\="org.eclipse.jdt.core.formatter.indentation.size" value\="4"/>\n <setting id\="org.eclipse.jdt.core.formatter.parentheses_positions_in_enum_constant_declaration" value\="common_lines"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.align_with_spaces" value\="false"/>\n <setting id\="org.eclipse.jdt.core.formatter.continuation_indentation" value\="1"/>\n <setting id\="org.eclipse.jdt.core.formatter.number_of_blank_lines_before_code_block" value\="0"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_switch_case_expressions" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.blank_lines_after_package" value\="1"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant" value\="48"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.comment.indent_root_tags" value\="true"/>\n <setting id\="org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch" value\="true"/>\n <setting id\="org.eclipse.jdt.core.formatter.enabling_tag" value\="@formatter\:on"/>\n <setting id\="org.eclipse.jdt.core.formatter.comment.count_line_length_from_starting_position" value\="false"/>\n <setting id\="org.eclipse.jdt.core.formatter.alignment_for_record_components" value\="32"/>\n <setting id\="org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration" value\="17"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.wrap_before_multiplicative_operator" value\="true"/>\n <setting id\="org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line" value\="false"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.alignment_for_parameterized_type_references" value\="16"/>\n <setting id\="org.eclipse.jdt.core.formatter.alignment_for_logical_operator" value\="16"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.keep_annotation_declaration_on_one_line" value\="one_line_never"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_record_declaration" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_enum_constant" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_after_multiplicative_operator" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments" value\="false"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.blank_lines_before_abstract_method" value\="1"/>\n <setting id\="org.eclipse.jdt.core.formatter.keep_enum_constant_declaration_on_one_line" value\="one_line_never"/>\n <setting id\="org.eclipse.jdt.core.formatter.align_variable_declarations_on_columns" value\="false"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch" value\="32"/>\n <setting id\="org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body" value\="0"/>\n <setting id\="org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line" value\="false"/>\n <setting id\="org.eclipse.jdt.core.formatter.parentheses_positions_in_catch_clause" value\="common_lines"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call" value\="32"/>\n <setting id\="org.eclipse.jdt.core.formatter.alignment_for_multiplicative_operator" value\="16"/>\n <setting id\="org.eclipse.jdt.core.formatter.keep_anonymous_type_declaration_on_one_line" value\="one_line_never"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_switch_case_expressions" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.wrap_before_shift_operator" value\="true"/>\n <setting id\="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header" value\="true"/>\n <setting id\="org.eclipse.jdt.core.formatter.brace_position_for_block" value\="next_line_on_wrap"/>\n <setting id\="org.eclipse.jdt.core.formatter.number_of_blank_lines_at_end_of_code_block" value\="0"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_bitwise_operator" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line" value\="true"/>\n <setting id\="org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration" value\="32"/>\n <setting id\="org.eclipse.jdt.core.formatter.alignment_for_type_parameters" value\="16"/>\n <setting id\="org.eclipse.jdt.core.formatter.alignment_for_compact_loops" value\="16"/>\n <setting id\="org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment" value\="false"/>\n <setting id\="org.eclipse.jdt.core.formatter.keep_simple_for_body_on_same_line" value\="false"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_unary_operator" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column" value\="true"/>\n <setting id\="org.eclipse.jdt.core.formatter.parentheses_positions_in_annotation" value\="common_lines"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_ellipsis" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.alignment_for_annotations_on_enum_constant" value\="0"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.text_block_indentation" value\="0"/>\n <setting id\="org.eclipse.jdt.core.formatter.align_type_members_on_columns" value\="false"/>\n <setting id\="org.eclipse.jdt.core.formatter.alignment_for_assignment" value\="16"/>\n <setting id\="org.eclipse.jdt.core.formatter.alignment_for_module_statements" value\="16"/>\n <setting id\="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header" value\="true"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.comment.align_tags_names_descriptions" value\="false"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.keep_if_then_body_block_on_one_line" value\="one_line_never"/>\n <setting id\="org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration" value\="0"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line" value\="false"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.align_assignment_statements_on_columns" value\="false"/>\n <setting id\="org.eclipse.jdt.core.formatter.brace_position_for_block_in_case" value\="end_of_line"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.alignment_for_conditional_expression_chain" value\="0"/>\n <setting id\="org.eclipse.jdt.core.formatter.comment.format_header" value\="false"/>\n <setting id\="org.eclipse.jdt.core.formatter.alignment_for_type_annotations" value\="0"/>\n <setting id\="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression" value\="32"/>\n <setting id\="org.eclipse.jdt.core.formatter.wrap_before_assertion_message_operator" value\="true"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.alignment_for_method_declaration" value\="0"/>\n <setting id\="org.eclipse.jdt.core.formatter.align_fields_grouping_blank_lines" value\="2147483647"/>\n <setting id\="org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries" value\="true"/>\n <setting id\="org.eclipse.jdt.core.formatter.alignment_for_bitwise_operator" value\="16"/>\n <setting id\="org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration" value\="next_line"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.alignment_for_resources_in_try" value\="32"/>\n <setting id\="org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation" value\="32"/>\n <setting id\="org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column" value\="false"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.comment.format_source_code" value\="true"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.blank_lines_before_field" value\="0"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.blank_lines_before_method" value\="1"/>\n <setting id\="org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration" value\="17"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_after_not_operator" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.comment.format_html" value\="true"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.parentheses_positions_in_method_delcaration" value\="common_lines"/>\n <setting id\="org.eclipse.jdt.core.formatter.alignment_for_compact_if" value\="16"/>\n <setting id\="org.eclipse.jdt.core.formatter.indent_empty_lines" value\="false"/>\n <setting id\="org.eclipse.jdt.core.formatter.alignment_for_type_arguments" value\="16"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_after_unary_operator" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation" value\="0"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.alignment_for_annotations_on_package" value\="0"/>\n <setting id\="org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch" value\="false"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_new_line_after_label" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header" value\="true"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_after_arrow_in_switch_case" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_record_header" value\="true"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases" value\="true"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.wrap_before_bitwise_operator" value\="true"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.comment.indent_tag_description" value\="false"/>\n <setting id\="org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line" value\="false"/>\n <setting id\="org.eclipse.jdt.core.formatter.brace_position_for_record_constructor" value\="next_line"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.alignment_for_string_concatenation" value\="16"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.alignment_for_multiple_fields" value\="16"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.brace_position_for_array_initializer" value\="end_of_line"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_shift_operator" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_after_shift_operator" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.keep_simple_do_while_body_on_same_line" value\="false"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_record_components" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested" value\="true"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.alignment_for_expressions_in_for_loop_header" value\="16"/>\n <setting id\="org.eclipse.jdt.core.formatter.wrap_before_additive_operator" value\="true"/>\n <setting id\="org.eclipse.jdt.core.formatter.keep_simple_getter_setter_on_one_line" value\="false"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_string_concatenation" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.join_lines_in_comments" value\="true"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_record_declaration" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_after_relational_operator" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.blank_lines_between_import_groups" value\="1"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_after_logical_operator" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.parentheses_positions_in_method_invocation" value\="common_lines"/>\n <setting id\="org.eclipse.jdt.core.formatter.blank_lines_after_imports" value\="1"/>\n <setting id\="org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.parentheses_positions_in_record_declaration" value\="common_lines"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.parentheses_positions_in_switch_statement" value\="common_lines"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_after_arrow_in_switch_default" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.disabling_tag" value\="@formatter\:off"/>\n <setting id\="org.eclipse.jdt.core.formatter.alignment_for_enum_constants" value\="49"/>\n <setting id\="org.eclipse.jdt.core.formatter.blank_lines_before_imports" value\="1"/>\n <setting id\="org.eclipse.jdt.core.formatter.number_of_blank_lines_at_end_of_method_body" value\="0"/>\n <setting id\="org.eclipse.jdt.core.formatter.parentheses_positions_in_if_while_statement" value\="common_lines"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_arrow_in_switch_case" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations" value\="1"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column" value\="false"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.indent_statements_compare_to_block" value\="true"/>\n <setting id\="org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration" value\="next_line"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.comment.align_tags_descriptions_grouped" value\="false"/>\n <setting id\="org.eclipse.jdt.core.formatter.comment.line_length" value\="100"/>\n <setting id\="org.eclipse.jdt.core.formatter.use_on_off_tags" value\="true"/>\n <setting id\="org.eclipse.jdt.core.formatter.keep_method_body_on_one_line" value\="one_line_never"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.keep_loop_body_block_on_one_line" value\="one_line_never"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.brace_position_for_method_declaration" value\="next_line"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.keep_type_declaration_on_one_line" value\="one_line_never"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.alignment_for_additive_operator" value\="16"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_record_constructor" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_relational_operator" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.keep_record_declaration_on_one_line" value\="one_line_never"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration" value\="next_line"/>\n <setting id\="org.eclipse.jdt.core.formatter.brace_position_for_lambda_body" value\="end_of_line"/>\n <setting id\="org.eclipse.jdt.core.formatter.compact_else_if" value\="true"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation" value\="32"/>\n <setting id\="org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration" value\="17"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.alignment_for_annotations_on_parameter" value\="0"/>\n <setting id\="org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment" value\="false"/>\n <setting id\="org.eclipse.jdt.core.formatter.alignment_for_relational_operator" value\="0"/>\n <setting id\="org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer" value\="16"/>\n <setting id\="org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve" value\="1"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_after_additive_operator" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_after_string_concatenation" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.comment.format_line_comments" value\="true"/>\n <setting id\="org.eclipse.jdt.core.formatter.brace_position_for_record_declaration" value\="next_line"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.number_of_blank_lines_after_code_block" value\="0"/>\n <setting id\="org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration" value\="17"/>\n <setting id\="org.eclipse.jdt.core.formatter.alignment_for_conditional_expression" value\="16"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.alignment_for_annotations_on_type" value\="49"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.alignment_for_annotations_on_local_variable" value\="0"/>\n <setting id\="org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration" value\="next_line"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_arrow_in_switch_default" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.comment.insert_new_line_between_different_tags" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_additive_operator" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.join_wrapped_lines" value\="true"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.alignment_for_annotations_on_field" value\="49"/>\n <setting id\="org.eclipse.jdt.core.formatter.wrap_before_conditional_operator" value\="true"/>\n <setting id\="org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases" value\="true"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.alignment_for_shift_operator" value\="0"/>\n <setting id\="org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations" value\="false"/>\n <setting id\="org.eclipse.jdt.core.formatter.parentheses_positions_in_try_clause" value\="common_lines"/>\n <setting id\="org.eclipse.jdt.core.formatter.keep_code_block_on_one_line" value\="one_line_never"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_record_components" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.tabulation.size" value\="4"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_after_bitwise_operator" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer" value\="1"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_record_declaration" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration" value\="17"/>\n <setting id\="org.eclipse.jdt.core.formatter.wrap_before_assignment_operator" value\="false"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.brace_position_for_switch" value\="end_of_line"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.keep_lambda_body_block_on_one_line" value\="one_line_never"/>\n <setting id\="org.eclipse.jdt.core.formatter.alignment_for_annotations_on_method" value\="49"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.keep_record_constructor_on_one_line" value\="one_line_never"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_record_declaration" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line" value\="false"/>\n <setting id\="org.eclipse.jdt.core.formatter.alignment_for_assertion_message" value\="0"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk" value\="1"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.blank_lines_before_member_type" value\="1"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_logical_operator" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression" value\="32"/>\n <setting id\="org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_record_declaration" value\="17"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_semicolon" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.wrap_before_relational_operator" value\="true"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.comment.format_block_comments" value\="true"/>\n <setting id\="org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration" value\="32"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.blank_lines_after_last_class_body_declaration" value\="0"/>\n <setting id\="org.eclipse.jdt.core.formatter.indent_statements_compare_to_body" value\="true"/>\n <setting id\="org.eclipse.jdt.core.formatter.keep_simple_while_body_on_same_line" value\="false"/>\n <setting id\="org.eclipse.jdt.core.formatter.wrap_before_logical_operator" value\="true"/>\n <setting id\="org.eclipse.jdt.core.formatter.blank_lines_between_statement_group_in_switch" value\="0"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.parentheses_positions_in_lambda_declaration" value\="common_lines"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.keep_enum_declaration_on_one_line" value\="one_line_never"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.brace_position_for_enum_constant" value\="next_line"/>\n <setting id\="org.eclipse.jdt.core.formatter.brace_position_for_type_declaration" value\="next_line"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_multiplicative_operator" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.blank_lines_before_package" value\="0"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header" value\="true"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.comment.indent_parameter_description" value\="false"/>\n <setting id\="org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_code_block" value\="0"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.tabulation.char" value\="space"/>\n <setting id\="org.eclipse.jdt.core.formatter.wrap_before_string_concatenation" value\="true"/>\n <setting id\="org.eclipse.jdt.core.formatter.lineSplit" value\="100"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch" value\="insert"/>\n </profile>\n <profile kind\="CodeFormatterProfile" name\="LAW Conventions" version\="20">\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_after_ellipsis" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.parentheses_positions_in_for_statment" value\="common_lines"/>\n <setting id\="org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries" value\="true"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.comment.format_javadoc_comments" value\="true"/>\n <setting id\="org.eclipse.jdt.core.formatter.indentation.size" value\="8"/>\n <setting id\="org.eclipse.jdt.core.formatter.parentheses_positions_in_enum_constant_declaration" value\="common_lines"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.align_with_spaces" value\="false"/>\n <setting id\="org.eclipse.jdt.core.formatter.continuation_indentation" value\="2"/>\n <setting id\="org.eclipse.jdt.core.formatter.number_of_blank_lines_before_code_block" value\="0"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_switch_case_expressions" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.blank_lines_after_package" value\="1"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant" value\="0"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.comment.indent_root_tags" value\="true"/>\n <setting id\="org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch" value\="true"/>\n <setting id\="org.eclipse.jdt.core.formatter.enabling_tag" value\="@formatter\:on"/>\n <setting id\="org.eclipse.jdt.core.formatter.comment.count_line_length_from_starting_position" value\="true"/>\n <setting id\="org.eclipse.jdt.core.formatter.alignment_for_record_components" value\="0"/>\n <setting id\="org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration" value\="0"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.wrap_before_multiplicative_operator" value\="true"/>\n <setting id\="org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line" value\="true"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.alignment_for_parameterized_type_references" value\="0"/>\n <setting id\="org.eclipse.jdt.core.formatter.alignment_for_logical_operator" value\="0"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.keep_annotation_declaration_on_one_line" value\="one_line_never"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_record_declaration" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_enum_constant" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_after_multiplicative_operator" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments" value\="false"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.blank_lines_before_abstract_method" value\="1"/>\n <setting id\="org.eclipse.jdt.core.formatter.keep_enum_constant_declaration_on_one_line" value\="one_line_never"/>\n <setting id\="org.eclipse.jdt.core.formatter.align_variable_declarations_on_columns" value\="false"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch" value\="0"/>\n <setting id\="org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body" value\="0"/>\n <setting id\="org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line" value\="true"/>\n <setting id\="org.eclipse.jdt.core.formatter.parentheses_positions_in_catch_clause" value\="common_lines"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call" value\="0"/>\n <setting id\="org.eclipse.jdt.core.formatter.alignment_for_multiplicative_operator" value\="0"/>\n <setting id\="org.eclipse.jdt.core.formatter.keep_anonymous_type_declaration_on_one_line" value\="one_line_never"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_switch_case_expressions" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.wrap_before_shift_operator" value\="true"/>\n <setting id\="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header" value\="true"/>\n <setting id\="org.eclipse.jdt.core.formatter.brace_position_for_block" value\="end_of_line"/>\n <setting id\="org.eclipse.jdt.core.formatter.number_of_blank_lines_at_end_of_code_block" value\="0"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_bitwise_operator" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line" value\="true"/>\n <setting id\="org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration" value\="0"/>\n <setting id\="org.eclipse.jdt.core.formatter.alignment_for_type_parameters" value\="0"/>\n <setting id\="org.eclipse.jdt.core.formatter.alignment_for_compact_loops" value\="0"/>\n <setting id\="org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment" value\="false"/>\n <setting id\="org.eclipse.jdt.core.formatter.keep_simple_for_body_on_same_line" value\="true"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_unary_operator" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column" value\="true"/>\n <setting id\="org.eclipse.jdt.core.formatter.parentheses_positions_in_annotation" value\="common_lines"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_ellipsis" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.alignment_for_annotations_on_enum_constant" value\="49"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.text_block_indentation" value\="0"/>\n <setting id\="org.eclipse.jdt.core.formatter.align_type_members_on_columns" value\="false"/>\n <setting id\="org.eclipse.jdt.core.formatter.alignment_for_assignment" value\="0"/>\n <setting id\="org.eclipse.jdt.core.formatter.alignment_for_module_statements" value\="16"/>\n <setting id\="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header" value\="true"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.comment.align_tags_names_descriptions" value\="false"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.keep_if_then_body_block_on_one_line" value\="one_line_never"/>\n <setting id\="org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration" value\="0"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line" value\="false"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.align_assignment_statements_on_columns" value\="false"/>\n <setting id\="org.eclipse.jdt.core.formatter.brace_position_for_block_in_case" value\="end_of_line"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.alignment_for_conditional_expression_chain" value\="0"/>\n <setting id\="org.eclipse.jdt.core.formatter.comment.format_header" value\="false"/>\n <setting id\="org.eclipse.jdt.core.formatter.alignment_for_type_annotations" value\="0"/>\n <setting id\="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression" value\="0"/>\n <setting id\="org.eclipse.jdt.core.formatter.wrap_before_assertion_message_operator" value\="true"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.alignment_for_method_declaration" value\="0"/>\n <setting id\="org.eclipse.jdt.core.formatter.align_fields_grouping_blank_lines" value\="2147483647"/>\n <setting id\="org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries" value\="true"/>\n <setting id\="org.eclipse.jdt.core.formatter.alignment_for_bitwise_operator" value\="0"/>\n <setting id\="org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration" value\="end_of_line"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.alignment_for_resources_in_try" value\="0"/>\n <setting id\="org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation" value\="0"/>\n <setting id\="org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column" value\="false"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.comment.format_source_code" value\="true"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.blank_lines_before_field" value\="0"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.blank_lines_before_method" value\="1"/>\n <setting id\="org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration" value\="0"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_after_not_operator" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.comment.format_html" value\="true"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.parentheses_positions_in_method_delcaration" value\="common_lines"/>\n <setting id\="org.eclipse.jdt.core.formatter.alignment_for_compact_if" value\="0"/>\n <setting id\="org.eclipse.jdt.core.formatter.indent_empty_lines" value\="false"/>\n <setting id\="org.eclipse.jdt.core.formatter.alignment_for_type_arguments" value\="0"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_after_unary_operator" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation" value\="0"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.alignment_for_annotations_on_package" value\="49"/>\n <setting id\="org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch" value\="false"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_new_line_after_label" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header" value\="true"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_after_arrow_in_switch_case" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_record_header" value\="true"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases" value\="true"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.wrap_before_bitwise_operator" value\="true"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.comment.indent_tag_description" value\="false"/>\n <setting id\="org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line" value\="false"/>\n <setting id\="org.eclipse.jdt.core.formatter.brace_position_for_record_constructor" value\="end_of_line"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.alignment_for_string_concatenation" value\="0"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.alignment_for_multiple_fields" value\="16"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.brace_position_for_array_initializer" value\="end_of_line"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_shift_operator" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_after_shift_operator" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.keep_simple_do_while_body_on_same_line" value\="true"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_record_components" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested" value\="true"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.alignment_for_expressions_in_for_loop_header" value\="0"/>\n <setting id\="org.eclipse.jdt.core.formatter.wrap_before_additive_operator" value\="true"/>\n <setting id\="org.eclipse.jdt.core.formatter.keep_simple_getter_setter_on_one_line" value\="false"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_string_concatenation" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.join_lines_in_comments" value\="true"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_record_declaration" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_after_relational_operator" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.blank_lines_between_import_groups" value\="1"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_after_logical_operator" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.parentheses_positions_in_method_invocation" value\="common_lines"/>\n <setting id\="org.eclipse.jdt.core.formatter.blank_lines_after_imports" value\="1"/>\n <setting id\="org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.parentheses_positions_in_record_declaration" value\="common_lines"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.parentheses_positions_in_switch_statement" value\="common_lines"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_after_arrow_in_switch_default" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.disabling_tag" value\="@formatter\:off"/>\n <setting id\="org.eclipse.jdt.core.formatter.alignment_for_enum_constants" value\="0"/>\n <setting id\="org.eclipse.jdt.core.formatter.blank_lines_before_imports" value\="1"/>\n <setting id\="org.eclipse.jdt.core.formatter.number_of_blank_lines_at_end_of_method_body" value\="0"/>\n <setting id\="org.eclipse.jdt.core.formatter.parentheses_positions_in_if_while_statement" value\="common_lines"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_arrow_in_switch_case" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations" value\="1"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column" value\="false"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.indent_statements_compare_to_block" value\="true"/>\n <setting id\="org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration" value\="end_of_line"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.comment.align_tags_descriptions_grouped" value\="false"/>\n <setting id\="org.eclipse.jdt.core.formatter.comment.line_length" value\="100"/>\n <setting id\="org.eclipse.jdt.core.formatter.use_on_off_tags" value\="false"/>\n <setting id\="org.eclipse.jdt.core.formatter.keep_method_body_on_one_line" value\="one_line_never"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.keep_loop_body_block_on_one_line" value\="one_line_never"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.brace_position_for_method_declaration" value\="end_of_line"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.keep_type_declaration_on_one_line" value\="one_line_never"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.alignment_for_additive_operator" value\="0"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_record_constructor" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_relational_operator" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.keep_record_declaration_on_one_line" value\="one_line_never"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration" value\="end_of_line"/>\n <setting id\="org.eclipse.jdt.core.formatter.brace_position_for_lambda_body" value\="end_of_line"/>\n <setting id\="org.eclipse.jdt.core.formatter.compact_else_if" value\="true"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation" value\="0"/>\n <setting id\="org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration" value\="0"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.alignment_for_annotations_on_parameter" value\="0"/>\n <setting id\="org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment" value\="false"/>\n <setting id\="org.eclipse.jdt.core.formatter.alignment_for_relational_operator" value\="0"/>\n <setting id\="org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer" value\="16"/>\n <setting id\="org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve" value\="1"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_after_additive_operator" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_after_string_concatenation" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.comment.format_line_comments" value\="true"/>\n <setting id\="org.eclipse.jdt.core.formatter.brace_position_for_record_declaration" value\="end_of_line"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.number_of_blank_lines_after_code_block" value\="0"/>\n <setting id\="org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration" value\="0"/>\n <setting id\="org.eclipse.jdt.core.formatter.alignment_for_conditional_expression" value\="0"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.alignment_for_annotations_on_type" value\="49"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.alignment_for_annotations_on_local_variable" value\="49"/>\n <setting id\="org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration" value\="end_of_line"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_arrow_in_switch_default" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.comment.insert_new_line_between_different_tags" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_additive_operator" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.join_wrapped_lines" value\="true"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.alignment_for_annotations_on_field" value\="49"/>\n <setting id\="org.eclipse.jdt.core.formatter.wrap_before_conditional_operator" value\="true"/>\n <setting id\="org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases" value\="true"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.alignment_for_shift_operator" value\="0"/>\n <setting id\="org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations" value\="false"/>\n <setting id\="org.eclipse.jdt.core.formatter.parentheses_positions_in_try_clause" value\="common_lines"/>\n <setting id\="org.eclipse.jdt.core.formatter.keep_code_block_on_one_line" value\="one_line_never"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_record_components" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.tabulation.size" value\="4"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_after_bitwise_operator" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer" value\="2"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_record_declaration" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration" value\="0"/>\n <setting id\="org.eclipse.jdt.core.formatter.wrap_before_assignment_operator" value\="false"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.brace_position_for_switch" value\="end_of_line"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.keep_lambda_body_block_on_one_line" value\="one_line_never"/>\n <setting id\="org.eclipse.jdt.core.formatter.alignment_for_annotations_on_method" value\="49"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.keep_record_constructor_on_one_line" value\="one_line_never"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_record_declaration" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line" value\="false"/>\n <setting id\="org.eclipse.jdt.core.formatter.alignment_for_assertion_message" value\="0"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk" value\="1"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.blank_lines_before_member_type" value\="1"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_logical_operator" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression" value\="0"/>\n <setting id\="org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_record_declaration" value\="0"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_semicolon" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.wrap_before_relational_operator" value\="true"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.comment.format_block_comments" value\="false"/>\n <setting id\="org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration" value\="0"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.blank_lines_after_last_class_body_declaration" value\="0"/>\n <setting id\="org.eclipse.jdt.core.formatter.indent_statements_compare_to_body" value\="true"/>\n <setting id\="org.eclipse.jdt.core.formatter.keep_simple_while_body_on_same_line" value\="true"/>\n <setting id\="org.eclipse.jdt.core.formatter.wrap_before_logical_operator" value\="true"/>\n <setting id\="org.eclipse.jdt.core.formatter.blank_lines_between_statement_group_in_switch" value\="0"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.parentheses_positions_in_lambda_declaration" value\="common_lines"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.keep_enum_declaration_on_one_line" value\="one_line_never"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.brace_position_for_enum_constant" value\="end_of_line"/>\n <setting id\="org.eclipse.jdt.core.formatter.brace_position_for_type_declaration" value\="end_of_line"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_multiplicative_operator" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.blank_lines_before_package" value\="0"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header" value\="true"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional" value\="insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.comment.indent_parameter_description" value\="true"/>\n <setting id\="org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_code_block" value\="0"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.tabulation.char" value\="tab"/>\n <setting id\="org.eclipse.jdt.core.formatter.wrap_before_string_concatenation" value\="true"/>\n <setting id\="org.eclipse.jdt.core.formatter.lineSplit" value\="120"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation" value\="do not insert"/>\n <setting id\="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch" value\="insert"/>\n </profile>\n</profiles>\n
29 org.eclipse.jdt.ui.formatterprofiles.version=21
30 org.eclipse.jdt.ui.gettersetter.use.is=true
31 org.eclipse.jdt.ui.overrideannotation=true
32 org.eclipse.jdt.ui.text.code_templates_migrated=true
33 org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates/>
34 org.eclipse.jdt.ui.text.custom_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates/>
35 org.eclipse.jdt.ui.text.templates_migrated=true
36 sourceHoverBackgroundColor=236,235,236
37 sp_cleanup.add_all=false
38 sp_cleanup.add_default_serial_version_id=true
39 sp_cleanup.add_generated_serial_version_id=false
40 sp_cleanup.add_missing_annotations=true
41 sp_cleanup.add_missing_deprecated_annotations=true
42 sp_cleanup.add_missing_methods=false
43 sp_cleanup.add_missing_nls_tags=false
44 sp_cleanup.add_missing_override_annotations=true
45 sp_cleanup.add_missing_override_annotations_interface_methods=true
46 sp_cleanup.add_serial_version_id=false
47 sp_cleanup.always_use_blocks=false
48 sp_cleanup.always_use_parentheses_in_expressions=false
49 sp_cleanup.always_use_this_for_non_static_field_access=false
50 sp_cleanup.always_use_this_for_non_static_method_access=false
51 sp_cleanup.arrays_fill=false
52 sp_cleanup.bitwise_conditional_expression=false
53 sp_cleanup.boolean_literal=false
54 sp_cleanup.break_loop=false
55 sp_cleanup.collection_cloning=false
56 sp_cleanup.comparison_statement=false
57 sp_cleanup.convert_functional_interfaces=true
58 sp_cleanup.convert_to_enhanced_for_loop=true
59 sp_cleanup.convert_to_enhanced_for_loop_if_loop_var_used=false
60 sp_cleanup.convert_to_switch_expressions=false
61 sp_cleanup.correct_indentation=false
62 sp_cleanup.double_negation=false
63 sp_cleanup.else_if=false
64 sp_cleanup.embedded_if=false
65 sp_cleanup.evaluate_nullable=false
66 sp_cleanup.format_source_code=true
67 sp_cleanup.format_source_code_changes_only=true
68 sp_cleanup.hash=false
69 sp_cleanup.if_condition=false
70 sp_cleanup.insert_inferred_type_arguments=false
71 sp_cleanup.instanceof=false
72 sp_cleanup.join=false
73 sp_cleanup.lazy_logical_operator=false
74 sp_cleanup.make_local_variable_final=true
75 sp_cleanup.make_parameters_final=true
76 sp_cleanup.make_private_fields_final=true
77 sp_cleanup.make_type_abstract_if_missing_method=false
78 sp_cleanup.make_variable_declarations_final=true
79 sp_cleanup.map_cloning=false
80 sp_cleanup.merge_conditional_blocks=false
81 sp_cleanup.never_use_blocks=true
82 sp_cleanup.never_use_parentheses_in_expressions=true
83 sp_cleanup.no_string_creation=false
84 sp_cleanup.no_super=false
85 sp_cleanup.number_suffix=false
86 sp_cleanup.objects_equals=false
87 sp_cleanup.on_save_use_additional_actions=true
88 sp_cleanup.organize_imports=true
89 sp_cleanup.overridden_assignment=false
90 sp_cleanup.precompile_regex=false
91 sp_cleanup.primitive_serialization=false
92 sp_cleanup.pull_up_assignment=false
93 sp_cleanup.push_down_negation=false
94 sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
95 sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
96 sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
97 sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
98 sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
99 sp_cleanup.redundant_falling_through_block_end=false
100 sp_cleanup.remove_private_constructors=true
101 sp_cleanup.remove_redundant_modifiers=false
102 sp_cleanup.remove_redundant_semicolons=true
103 sp_cleanup.remove_redundant_type_arguments=true
104 sp_cleanup.remove_trailing_whitespaces=true
105 sp_cleanup.remove_trailing_whitespaces_all=true
106 sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
107 sp_cleanup.remove_unnecessary_array_creation=false
108 sp_cleanup.remove_unnecessary_casts=true
109 sp_cleanup.remove_unnecessary_nls_tags=false
110 sp_cleanup.remove_unused_imports=true
111 sp_cleanup.remove_unused_local_variables=false
112 sp_cleanup.remove_unused_private_fields=true
113 sp_cleanup.remove_unused_private_members=false
114 sp_cleanup.remove_unused_private_methods=true
115 sp_cleanup.remove_unused_private_types=true
116 sp_cleanup.simplify_lambda_expression_and_method_ref=false
117 sp_cleanup.sort_members=false
118 sp_cleanup.sort_members_all=false
119 sp_cleanup.strictly_equal_or_different=false
120 sp_cleanup.stringbuilder=false
121 sp_cleanup.switch=false
122 sp_cleanup.ternary_operator=false
123 sp_cleanup.try_with_resource=false
124 sp_cleanup.use_anonymous_class_creation=false
125 sp_cleanup.use_autoboxing=false
126 sp_cleanup.use_blocks=false
127 sp_cleanup.use_blocks_only_for_return_and_throw=false
128 sp_cleanup.use_directly_map_method=false
129 sp_cleanup.use_lambda=true
130 sp_cleanup.use_parentheses_in_expressions=false
131 sp_cleanup.use_this_for_non_static_field_access=false
132 sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
133 sp_cleanup.use_this_for_non_static_method_access=false
134 sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
135 sp_cleanup.use_unboxing=false
136 sp_cleanup.use_var=false
137 sp_cleanup.useless_continue=false
138 sp_cleanup.useless_return=false
139 spelling_ignore_ampersand_in_properties=true
140 spelling_ignore_digits=true
141 spelling_ignore_java_strings=true
142 spelling_ignore_mixed=true
143 spelling_ignore_non_letters=true
144 spelling_ignore_sentence=true
145 spelling_ignore_single_letters=true
146 spelling_ignore_upper=true
147 spelling_ignore_urls=true
148 spelling_locale_initialized=true
149 spelling_user_dictionary=/Users/vigna/.aspell.en.pws
150 spelling_user_dictionary_encoding=
151 useAnnotationsPrefPage=true
152 useQuickDiffPrefPage=true
0 8.5.8
1
2 - Fixed erroneous switch to Java 9.
3
4 - BinIO has been restructured to use java.nio whenever possible, and all
5 load/store methods now accept a byte order. The performance improvements
6 are very significant, in particular when handling data in native byte
7 order.
8
9 - Switched naming for mapped list to the standard type-first format.
10 Hopefully this should not hurt anyone.
11
12 8.5.7
13
14 - Memory-mapped big lists.
15
16 - Because of a wrong threshold radix sort in certain cases was much slower
17 than it should have been. Thanks to Johan Nystrom-Persson for reporting
18 this bug.
19
20 - Fixed subtle bug in OpenHashMap.merge(). Thanks to Ben Manes for
21 discovering this bug using Guava's testlib.
22
23 - Fixed other minor divergences from JDK's behavior detected by
24 Guava's testlib.
25
026 8.5.6
127
228 - Fixed broken export clause which was preventing it.unimi.dsi.fastutil
00 # Welcome to fastutil
11
2 [fastutil](http://fastutil.di.unimi.it/) is a collection of type-specific
3 Java classes that extend the Java Collections Framework by providing
4 several containers, such as maps, sets, lists and prority queues,
5 implementing the interfaces of the java.util package; it also provides big
6 (64-bit) arrays, sets, lists, and fast, practical I/O classes for binary
7 and text files.
8
9 fastutil provides a huge collection of specialized classes generated
10 starting from a parameterized version; the classes are much more compact
11 and much faster than the general ones. Please read the package
12 documentation for more information.
2 [fastutil](http://fastutil.di.unimi.it/) extends the Java Collections
3 Framework by providing type-specific maps, sets, lists, and queues with a
4 small memory footprint and fast access and insertion; it provides also big
5 (64-bit) arrays, sets, and lists, sorting algorithms, fast, practical I/O
6 classes for binary and text files, and facilities for memory mapping large
7 files.
138
149 Since version 8.5.5, fastutil is split into two jars for convenience:
1510
11 - Check that binary insertion sort is maybe better
22 - radix sort for big arrays
33 - Navigable sets and maps
4 - Front-Coded Array BIG lists
54 - Make digit array in radix sort shorter
65 - FastIterable interface
76 - Try tripartite quickSort or TimSort for generic sorting.
22
33 build.sysclasspath=ignore
44
5 version=8.5.6
5 version=8.5.8
66
77 dist=dist
88 src=src
9898 </target>
9999
100100 <target name="pom-core" description="insert version into pom (core)">
101 <copy tofile="pom-core.xml" file="pom-core-model.xml">
101 <copy tofile="pom-core.xml" file="pom-core-model.xml" overwrite="true">
102102 <filterset>
103103 <filter token="VERSION" value="${version}"/>
104104 </filterset>
106106 </target>
107107
108108 <target name="pom" description="insert version into pom">
109 <copy tofile="pom.xml" file="pom-model.xml">
109 <copy tofile="pom.xml" file="pom-model.xml" overwrite="true">
110110 <filterset>
111111 <filter token="VERSION" value="${version}"/>
112112 </filterset>
00 /*
1 * Copyright (C) 2002-2021 Sebastiano Vigna
1 * Copyright (C) 2002-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
292292 * @param k the key
293293 * @return a node with key k. If a node with key k already exists, then that node is returned,
294294 * otherwise a new node with defRetValue is created ensuring that the tree is balanced
295 after creation of the node.
295 * after creation of the node.
296296 */
297297 private Entry KEY_VALUE_GENERIC add(final KEY_GENERIC_TYPE k) {
298 /* After execution of this method, modified is true iff a new entry has
299 been inserted. */
298 REQUIRE_KEY_NON_NULL(k)
299 /* After execution of this method, modified is true iff a new entry has been inserted. */
300300 modified = false;
301301
302302 Entry KEY_VALUE_GENERIC e = null;
10621062 SUPPRESS_WARNINGS_KEY_UNCHECKED
10631063 @Override
10641064 public boolean containsKey(final KEY_TYPE k) {
1065 RETURN_FALSE_IF_KEY_NULL(k)
10651066 return findKey(KEY_GENERIC_CAST k) != null;
10661067 }
10671068
12131214
12141215
12151216 @Override
1217 SUPPRESS_WARNINGS_KEY_UNCHECKED
12161218 public ObjectSortedSet<MAP.Entry KEY_VALUE_GENERIC> ENTRYSET() {
12171219 if (entries == null) entries = new AbstractObjectSortedSet<MAP.Entry KEY_VALUE_GENERIC>() {
1218 final Comparator<? super MAP.Entry KEY_VALUE_GENERIC> comparator = (Comparator<MAP.Entry KEY_VALUE_GENERIC>) (x, y) -> AVL_TREE_MAP.this.actualComparator.compare(x.ENTRY_GET_KEY(), y.ENTRY_GET_KEY());
1220 final Comparator<? super MAP.Entry KEY_VALUE_GENERIC> comparator = (AVL_TREE_MAP.this.actualComparator == null ?
1221 (Comparator<MAP.Entry KEY_VALUE_GENERIC>) (x, y) -> KEY_CMP(x.ENTRY_GET_KEY(), y.ENTRY_GET_KEY()) :
1222 (Comparator<MAP.Entry KEY_VALUE_GENERIC>) (x, y) -> AVL_TREE_MAP.this.actualComparator.compare(x.ENTRY_GET_KEY(), y.ENTRY_GET_KEY())
1223 );
12191224
12201225 @Override
12211226 public Comparator<? super MAP.Entry KEY_VALUE_GENERIC> comparator() { return comparator; }
12291234 @Override
12301235 SUPPRESS_WARNINGS_KEY_UNCHECKED
12311236 public boolean contains(final Object o) {
1232 if (!(o instanceof Map.Entry)) return false;
1237 if (o == null || !(o instanceof Map.Entry)) return false;
12331238 final Map.Entry<?,?> e = (Map.Entry<?,?>)o;
1239 if (e.getKey() == null) return false;
12341240 #if KEYS_PRIMITIVE
1235 if (e.getKey() == null || ! (e.getKey() instanceof KEY_CLASS)) return false;
1241 if (! (e.getKey() instanceof KEY_CLASS)) return false;
12361242 #endif
12371243 #if VALUES_PRIMITIVE
12381244 if (e.getValue() == null || ! (e.getValue() instanceof VALUE_CLASS)) return false;
12461252 public boolean remove(final Object o) {
12471253 if (!(o instanceof Map.Entry)) return false;
12481254 final Map.Entry<?,?> e = (Map.Entry<?,?>)o;
1255 if (e.getKey() == null) return false;
12491256 #if KEYS_PRIMITIVE
12501257 if (e.getKey() == null || ! (e.getKey() instanceof KEY_CLASS)) return false;
12511258 #endif
12521259 #if VALUES_PRIMITIVE
1253 if (e.getValue() == null || ! (e.getValue() instanceof VALUE_CLASS)) return false;
1260 if (! (e.getValue() instanceof VALUE_CLASS)) return false;
12541261 #endif
12551262 final Entry KEY_VALUE_GENERIC f = findKey(KEY_OBJ2TYPE(KEY_GENERIC_CAST e.getKey()));
12561263 if (f == null || ! VALUE_EQUALS(f.ENTRY_GET_VALUE(), VALUE_OBJ2TYPE(e.getValue()))) return false;
15261533 @Override
15271534 SUPPRESS_WARNINGS_KEY_UNCHECKED
15281535 public boolean containsKey(final KEY_TYPE k) {
1536 RETURN_FALSE_IF_KEY_NULL(k)
15291537 return in(KEY_GENERIC_CAST k) && AVL_TREE_MAP.this.containsKey(k);
15301538 }
15311539
00 /*
1 * Copyright (C) 2002-2021 Sebastiano Vigna
1 * Copyright (C) 2002-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
287287
288288 @Override
289289 public boolean add(final KEY_GENERIC_TYPE k) {
290 REQUIRE_KEY_NON_NULL(k)
290291
291292 if (tree == null) { // The case of the empty tree is treated separately.
292293 count++;
00 /*
1 * Copyright (C) 2002-2021 Sebastiano Vigna
1 * Copyright (C) 2002-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
1818
1919 /** An abstract class facilitating the creation of type-specific {@linkplain it.unimi.dsi.fastutil.BidirectionalIterator bidirectional iterators}.
2020 *
21 * @deprecated As of fastutil 8 this class is no longer necessary, as its previous abstract
21 * @deprecated As of {@code fastutil} 8 this class is no longer necessary, as its previous abstract
2222 * methods are now default methods of the type-specific interface.
2323 */
2424
00 /*
1 * Copyright (C) 2010-2021 Sebastiano Vigna
1 * Copyright (C) 2010-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2002-2021 Sebastiano Vigna
1 * Copyright (C) 2002-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
1818
1919 /** An abstract class facilitating the creation of type-specific {@linkplain it.unimi.dsi.fastutil.BigListIterator big-list iterators}.
2020 *
21 * @deprecated As of fastutil 8 this class is no longer necessary, as its previous abstract
21 * @deprecated As of {@code fastutil} 8 this class is no longer necessary, as its previous abstract
2222 * methods are now default methods of the type-specific interface.
2323 */
2424
00 /*
1 * Copyright (C) 2002-2021 Sebastiano Vigna
1 * Copyright (C) 2002-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
8383 /** {@inheritDoc}
8484 * @deprecated Please use the corresponding type-specific method instead.
8585 */
86 @SuppressWarnings("deprecation")
8786 @Deprecated
8887 @Override
8988 public boolean add(final KEY_GENERIC_CLASS key) {
00 /*
1 * Copyright (C) 2002-2021 Sebastiano Vigna
1 * Copyright (C) 2002-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
1919 /** An abstract class facilitating the creation of type-specific {@linkplain java.util.Comparator comparators}.
2020 *
2121 * @see java.util.Comparator
22 * @deprecated As of fastutil 8 this class is no longer necessary, as its only previous abstract
22 * @deprecated As of {@code fastutil} 8 this class is no longer necessary, as its only previous abstract
2323 * method is now a default method of the type-specific interface.
2424 */
2525
00 /*
1 * Copyright (C) 2002-2021 Sebastiano Vigna
1 * Copyright (C) 2002-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2002-2021 Sebastiano Vigna
1 * Copyright (C) 2002-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2002-2021 Sebastiano Vigna
1 * Copyright (C) 2002-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2002-2021 Sebastiano Vigna
1 * Copyright (C) 2002-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
1818
1919 /** An abstract class facilitating the creation of type-specific {@linkplain java.util.ListIterator list iterators}.
2020 *
21 * @deprecated As of fastutil 8 this class is no longer necessary, as its previous abstract
21 * @deprecated As of {@code fastutil} 8 this class is no longer necessary, as its previous abstract
2222 * methods are now default methods of the type-specific interface.
2323 */
2424
00 /*
1 * Copyright (C) 2002-2021 Sebastiano Vigna
1 * Copyright (C) 2002-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
357357 }
358358
359359 /** {@inheritDoc} */
360 @SuppressWarnings({"unchecked","deprecation"})
360 @SuppressWarnings({"unchecked", "deprecation"})
361361 @Override
362362 public void putAll(final Map<? extends KEY_GENERIC_CLASS,? extends VALUE_GENERIC_CLASS> m) {
363363 if (m instanceof MAP) {
00 /*
1 * Copyright (C) 2002-2021 Sebastiano Vigna
1 * Copyright (C) 2002-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
1717 package PACKAGE;
1818
1919 /** An abstract class providing basic methods for priority queues implementing a type-specific interface.
20 * @deprecated As of fastutil 8 this class is no longer necessary, as its previous abstract
20 * @deprecated As of {@code fastutil} 8 this class is no longer necessary, as its previous abstract
2121 * methods are now default methods of the type-specific interface.
2222 */
2323 @Deprecated
00 /*
1 * Copyright (C) 2002-2021 Sebastiano Vigna
1 * Copyright (C) 2002-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2002-2021 Sebastiano Vigna
1 * Copyright (C) 2002-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2003-2021 Sebastiano Vigna
1 * Copyright (C) 2003-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2020-2021 Sebastiano Vigna
1 * Copyright (C) 2020-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2002-2021 Sebastiano Vigna
1 * Copyright (C) 2002-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
1818
1919 /** An abstract class providing basic methods for implementing a type-specific stack interface.
2020 *
21 * @deprecated As of fastutil 8 this class is no longer necessary, as its previous abstract
21 * @deprecated As of {@code fastutil} 8 this class is no longer necessary, as its previous abstract
2222 * methods are now default methods of the type-specific interface.
2323 */
2424 @Deprecated
00 /*
1 * Copyright (C) 2010-2021 Sebastiano Vigna
1 * Copyright (C) 2010-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2002-2021 Sebastiano Vigna
1 * Copyright (C) 2002-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
3838 import java.util.NoSuchElementException;
3939 import java.util.RandomAccess;
4040
41 /** Compact storage of big lists of arrays using front coding.
41 /** Compact storage of big lists of arrays using front-coding (also known as prefix-omission) compression.
4242 *
4343 * <p>This class stores immutably a big list of arrays in a single {@linkplain it.unimi.dsi.fastutil.BigArrays big array}
4444 * using front coding (of course, the compression will be reasonable only if
4747 * calling {@link #get(long) get(<var>i</var>)}. The returned array may be
4848 * freely modified.
4949 *
50 * <p>Front coding is based on the idea that if the <var>i</var>-th and the
50 * <p>Front-coding (also known as prefix-omission) compression is based on the idea that if the <var>i</var>-th and the
5151 * (<var>i</var>+1)-th array have a common prefix, we might store the length
5252 * of the common prefix, and then the rest of the second array.
5353 *
123123 KEY_TYPE[][] a = new KEY_TYPE[2][];
124124 long curSize = 0;
125125 long n = 0;
126 int b = 0, common, length, minLength;
126 int b = 0, length;
127127
128128 while(arrays.hasNext()) {
129129 a[b] = arrays.next();
139139 curSize += length;
140140 }
141141 else {
142 minLength = a[1 - b].length;
143 if (length < minLength) minLength = length;
142 final int minLength = Math.min(a[1 - b].length, length);
143 int common;
144144 for(common = 0; common < minLength; common++) if (a[0][common] != a[1][common]) break;
145145 length -= common;
146146
447447 return p;
448448 }
449449
450 public void dump(java.io.DataOutputStream array, java.io.DataOutputStream pointers) throws java.io.IOException {
451 for(KEY_TYPE[] s: this.array)
452 for(KEY_TYPE e :s)
453 array.WRITE_KEY(e);
454
455 for(long[] s: p)
456 for(long e: s)
457 pointers.writeLong(e);
458 }
450459
451460 private void readObject(java.io.ObjectInputStream s) throws java.io.IOException, ClassNotFoundException {
452461 s.defaultReadObject();
00 /*
1 * Copyright (C) 2002-2021 Sebastiano Vigna
1 * Copyright (C) 2002-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
3535 import java.util.NoSuchElementException;
3636 import java.util.RandomAccess;
3737
38 /** Compact storage of lists of arrays using front coding.
38 /** Compact storage of lists of arrays using front-coding (also known as prefix-omission) compression.
3939 *
4040 * <p>This class stores immutably a list of arrays in a single {@linkplain it.unimi.dsi.fastutil.BigArrays big array}
4141 * using front coding (of course, the compression will be reasonable only if
4444 * calling {@link #get(int) get(<var>i</var>)}. The returned array may be
4545 * freely modified.
4646 *
47 * <p>Front coding is based on the idea that if the <var>i</var>-th and the
47 * <p>Front-coding (also known as prefix-omission) compression
48 * is based on the idea that if the <var>i</var>-th and the
4849 * (<var>i</var>+1)-th array have a common prefix, we might store the length
4950 * of the common prefix, and then the rest of the second array.
5051 *
119120
120121 KEY_TYPE[][] a = new KEY_TYPE[2][];
121122 long curSize = 0;
122 int n = 0, b = 0, common, length, minLength;
123 int n = 0, b = 0, length;
123124
124125 while(arrays.hasNext()) {
125126 a[b] = arrays.next();
135136 curSize += length;
136137 }
137138 else {
138 minLength = a[1 - b].length;
139 if (length < minLength) minLength = length;
139 final int minLength = Math.min(a[1 - b].length, length);
140 int common;
140141 for(common = 0; common < minLength; common++) if (a[0][common] != a[1][common]) break;
141142 length -= common;
142143
253254 final int count = count(length);
254255 BigArrays.set(a, pos + count - 1, (byte)(length & 0x7F));
255256
256 if (count != 1) {
257 int i = count - 1;
258 while(i-- != 0) {
259 length >>>= 7;
260 BigArrays.set(a, pos + i, (byte)(- (length & 0x7F) - 1));
261 }
257 for(int i = count -1; i-- != 0;) {
258 length >>>= 7;
259 BigArrays.set(a, pos + i, (byte)(- (length & 0x7F) - 1));
262260 }
263261
264262 return count;
00 /*
1 * Copyright (C) 2003-2021 Paolo Boldi and Sebastiano Vigna
1 * Copyright (C) 2003-2022 Paolo Boldi and Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2002-2021 Sebastiano Vigna
1 * Copyright (C) 2002-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2007-2021 Sebastiano Vigna
1 * Copyright (C) 2007-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2003-2021 Paolo Boldi and Sebastiano Vigna
1 * Copyright (C) 2003-2022 Paolo Boldi and Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2007-2021 Sebastiano Vigna
1 * Copyright (C) 2007-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2002-2021 Sebastiano Vigna
1 * Copyright (C) 2002-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
12361236 *
12371237 * <p>This method implements a <em>lexicographical</em> sorting of the arguments. Pairs of
12381238 * elements in the same position in the two provided arrays will be considered a single key, and
1239 * permuted accordingly. In the end, either {@code x[i] &lt; x[i + 1]} or <code>x[i]
1240 * == x[i + 1]</code> and {@code y[i] &le; y[i + 1]}.
1239 * permuted accordingly. In the end, either {@code x[i] &lt; x[i + 1]} or {@code x[i]
1240 * == x[i + 1]} and {@code y[i] &le; y[i + 1]}.
12411241 *
12421242 * @param x the first array to be sorted.
12431243 * @param y the second array to be sorted.
12981298 *
12991299 * <p>This method implements a <em>lexicographical</em> sorting of the arguments. Pairs of
13001300 * elements in the same position in the two provided arrays will be considered a single key, and
1301 * permuted accordingly. In the end, either {@code x[i] &lt; x[i + 1]} or <code>x[i]
1302 * == x[i + 1]</code> and {@code y[i] &le; y[i + 1]}.
1301 * permuted accordingly. In the end, either {@code x[i] &lt; x[i + 1]} or {@code x[i]
1302 * == x[i + 1]} and {@code y[i] &le; y[i + 1]}.
13031303 *
13041304 * @param x the first array to be sorted.
13051305 * @param y the second array to be sorted.
13811381 *
13821382 * <p>This method implements a <em>lexicographical</em> sorting of the arguments. Pairs of
13831383 * elements in the same position in the two provided arrays will be considered a single key, and
1384 * permuted accordingly. In the end, either {@code x[i] &lt; x[i + 1]} or <code>x[i]
1385 * == x[i + 1]</code> and {@code y[i] &le; y[i + 1]}.
1384 * permuted accordingly. In the end, either {@code x[i] &lt; x[i + 1]} or {@code x[i]
1385 * == x[i + 1]} and {@code y[i] &le; y[i + 1]}.
13861386 *
13871387 * @param x the first array to be sorted.
13881388 * @param y the second array to be sorted.
14061406 *
14071407 * <p>This method implements a <em>lexicographical</em> sorting of the arguments. Pairs of
14081408 * elements in the same position in the two provided arrays will be considered a single key, and
1409 * permuted accordingly. In the end, either {@code x[i] &lt; x[i + 1]} or <code>x[i]
1410 * == x[i + 1]</code> and {@code y[i] &le; y[i + 1]}.
1409 * permuted accordingly. In the end, either {@code x[i] &lt; x[i + 1]} or {@code x[i]
1410 * == x[i + 1]} and {@code y[i] &le; y[i + 1]}.
14111411 *
14121412 * @param x the first array to be sorted.
14131413 * @param y the second array to be sorted.
18361836 /** The number of digits per element. */
18371837 private static final int DIGITS_PER_ELEMENT = KEY_CLASS.SIZE / DIGIT_BITS;
18381838 private static final int RADIXSORT_NO_REC = 1024;
1839 private static final int RADIXSORT_NO_REC_SMALL = 64;
18391840 private static final int PARALLEL_RADIXSORT_NO_FORK = 1024;
18401841
18411842 // The thresholds were determined on an Intel i7 8700K.
21152116 */
21162117 public static void radixSortIndirect(final int[] perm, final KEY_TYPE[] a, final int from, final int to, final boolean stable) {
21172118 if (to - from < RADIXSORT_NO_REC) {
2118 insertionSortIndirect(perm, a, from, to);
2119 quickSortIndirect(perm, a, from, to);
2120 if (stable) stabilize(perm, a, from, to);
21192121 return;
21202122 }
21212123
21612163 System.arraycopy(support, 0, perm, first, length);
21622164 for(int i = 0, p = first; i <= lastUsed; i++) {
21632165 if (level < maxLevel && count[i] > 1) {
2164 if (count[i] < RADIXSORT_NO_REC) insertionSortIndirect(perm, a, p, p + count[i]);
2166 if (count[i] < RADIXSORT_NO_REC) {
2167 quickSortIndirect(perm, a, p, p + count[i]);
2168 if (stable) stabilize(perm, a, p, p + count[i]);
2169 }
21652170 else {
21662171 offsetStack[stackPos] = p;
21672172 lengthStack[stackPos] = count[i];
21902195 }
21912196
21922197 if (level < maxLevel && count[c] > 1) {
2193 if (count[c] < RADIXSORT_NO_REC) insertionSortIndirect(perm, a, i, i + count[c]);
2198 if (count[c] < RADIXSORT_NO_REC) {
2199 quickSortIndirect(perm, a, i, i + count[c]);
2200 if (stable) stabilize(perm, a, i, i + count[c]);
2201 }
21942202 else {
21952203 offsetStack[stackPos] = i;
21962204 lengthStack[stackPos] = count[c];
23682376 */
23692377 public static void radixSort(final KEY_TYPE[] a, final KEY_TYPE[] b, final int from, final int to) {
23702378 if (to - from < RADIXSORT_NO_REC) {
2371 selectionSort(a, b, from, to);
2379 quickSort(a, b, from, to);
23722380 return;
23732381 }
23742382
24352443 }
24362444
24372445 if (level < maxLevel && count[c] > 1) {
2438 if (count[c] < RADIXSORT_NO_REC) selectionSort(a, b, i, i + count[c]);
2446 if (count[c] < RADIXSORT_NO_REC) quickSort(a, b, i, i + count[c]);
24392447 else {
24402448 offsetStack[stackPos] = i;
24412449 lengthStack[stackPos] = count[c];
26132621 * @param stable whether the sorting algorithm should be stable.
26142622 */
26152623 public static void radixSortIndirect(final int[] perm, final KEY_TYPE[] a, final KEY_TYPE[] b, final int from, final int to, final boolean stable) {
2616 if (to - from < RADIXSORT_NO_REC) {
2624 if (to - from < RADIXSORT_NO_REC_SMALL) {
26172625 insertionSortIndirect(perm, a, b, from, to);
26182626 return;
26192627 }
26632671 System.arraycopy(support, 0, perm, first, length);
26642672 for(int i = 0, p = first; i < 1 << DIGIT_BITS; i++) {
26652673 if (level < maxLevel && count[i] > 1) {
2666 if (count[i] < RADIXSORT_NO_REC) insertionSortIndirect(perm, a, b, p, p + count[i]);
2674 if (count[i] < RADIXSORT_NO_REC_SMALL) insertionSortIndirect(perm, a, b, p, p + count[i]);
26672675 else {
26682676 offsetStack[stackPos] = p;
26692677 lengthStack[stackPos] = count[i];
26932701
26942702
26952703 if (level < maxLevel && count[c] > 1) {
2696 if (count[c] < RADIXSORT_NO_REC) insertionSortIndirect(perm, a, b, i, i + count[c]);
2704 if (count[c] < RADIXSORT_NO_REC_SMALL) insertionSortIndirect(perm, a, b, i, i + count[c]);
26972705 else {
26982706 offsetStack[stackPos] = i;
26992707 lengthStack[stackPos] = count[c];
27642772 * @param to the index of the last element (exclusive) to be sorted.
27652773 */
27662774 public static void radixSort(final KEY_TYPE[][] a, final int from, final int to) {
2767 if (to - from < RADIXSORT_NO_REC) {
2775 if (to - from < RADIXSORT_NO_REC_SMALL) {
27682776 selectionSort(a, from, to, 0);
27692777 return;
27702778 }
28292837 }
28302838
28312839 if (level < maxLevel && count[c] > 1) {
2832 if (count[c] < RADIXSORT_NO_REC) selectionSort(a, i, i + count[c], level + 1);
2840 if (count[c] < RADIXSORT_NO_REC_SMALL) selectionSort(a, i, i + count[c], level + 1);
28332841 else {
28342842 offsetStack[stackPos] = i;
28352843 lengthStack[stackPos] = count[c];
00 /*
1 * Copyright (C) 2002-2021 Sebastiano Vigna
1 * Copyright (C) 2002-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2002-2021 Sebastiano Vigna
1 * Copyright (C) 2002-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2002-2021 Sebastiano Vigna
1 * Copyright (C) 2002-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
856856 @Override
857857 public void getElements(final long from, final KEY_TYPE[][] a, final long offset, final long length) {
858858 BigArrays.copy(this.a, from, a, offset, length);
859 }
860
861 /** Copies element of this type-specific list into the given array using optimized system calls.
862 *
863 * @param from the start index (inclusive).
864 * @param a the destination array.
865 * @param offset the offset into the destination array where to store the first element copied.
866 * @param length the number of elements to be copied.
867 */
868
869 @Override
870 public void getElements(final long from, final KEY_TYPE[] a, final int offset, final int length) {
871 BigArrays.copyFromBig(this.a, from, a, offset, length);
859872 }
860873
861874 /** Removes elements of this type-specific list using optimized system calls.
00 /*
1 * Copyright (C) 2009-2021 Sebastiano Vigna
1 * Copyright (C) 2009-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
440440 * @deprecated Please use the version in {@link it.unimi.dsi.fastutil.BigArrays}.
441441 */
442442 @Deprecated
443 SUPPRESS_WARNINGS_KEY_UNCHECKED
444443 public static KEY_GENERIC KEY_GENERIC_TYPE[][] ensureCapacity(final KEY_GENERIC_TYPE[][] array, final long length, final long preserve) {
445444 return length > length(array) ? forceCapacity(array, length, preserve) : array;
446445 }
00 /*
1 * Copyright (C) 2010-2021 Sebastiano Vigna
1 * Copyright (C) 2010-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2004-2021 Sebastiano Vigna
1 * Copyright (C) 2004-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
443443 * a big array with {@code length} entries whose first {@code preserve}
444444 * entries are the same as those of {@code array}.
445445 */
446 SUPPRESS_WARNINGS_KEY_UNCHECKED
447446 public static KEY_GENERIC KEY_GENERIC_TYPE[][] ensureCapacity(final KEY_GENERIC_TYPE[][] array, final long length, final long preserve) {
448447 return length > length(array) ? forceCapacity(array, length, preserve) : array;
449448 }
00 /*
1 * Copyright (C) 2010-2021 Sebastiano Vigna
1 * Copyright (C) 2010-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
140140 * @param length the number of elements to be copied.
141141 */
142142 void getElements(long from, KEY_TYPE a[][], long offset, long length);
143
144 /** Copies (hopefully quickly) elements of this type-specific big list into the given array.
145 *
146 * @param from the start index (inclusive).
147 * @param a the destination array.
148 * @param offset the offset into the destination array where to store the first element copied.
149 * @param length the number of elements to be copied.
150 */
151 default void getElements(long from, KEY_TYPE a[], int offset, int length) {
152 #if KEYS_REFERENCE
153 getElements(from, new KEY_TYPE[][]{a}, (long)offset, (long)length);
154 #else
155 getElements(from, new KEY_TYPE[][]{a}, offset, length);
156 #endif
157 }
143158
144159 /** Removes (hopefully quickly) elements of this type-specific big list.
145160 *
00 /*
1 * Copyright (C) 2010-2021 Sebastiano Vigna
1 * Copyright (C) 2010-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2002-2021 Sebastiano Vigna
1 * Copyright (C) 2002-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2002-2021 Sebastiano Vigna
1 * Copyright (C) 2002-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2019-2021 Sebastiano Vigna
1 * Copyright (C) 2019-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2005-2021 Sebastiano Vigna
1 * Copyright (C) 2005-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
2222 import static it.unimi.dsi.fastutil.BigArrays.segment;
2323 import static it.unimi.dsi.fastutil.BigArrays.displacement;
2424 import static it.unimi.dsi.fastutil.BigArrays.ensureOffsetLength;
25 import static it.unimi.dsi.fastutil.Arrays.ensureOffsetLength;
26
27 import java.nio.*;
28 import java.nio.channels.*;
29 import java.nio.file.*;
2530
2631 import java.io.*;
2732 import java.util.*;
5055 * resulting files from other languages.
5156 *
5257 * <p>For each primitive type, this class provides methods that read elements
53 * from a {@link DataInput} or from a filename into an array. Analogously, there are
54 * methods that store the content of an array (fragment) or the elements
55 * returned by an iterator to a {@link DataOutput} or to a given filename. Files
56 * are buffered using {@link FastBufferedInputStream} and {@link FastBufferedOutputStream}.
58 * from a {@link DataInput}, an {@link InputStream} or from a file into an array
59 * or a {@linkplain it.unimi.dsi.fastutil.BigArrays big array}, or expose those elements as a type-specific {@link Iterator iterator}.
60 * There are also methods that let you choose a {@linkplain ByteOrder byte order} and
61 * that work with {@link ReadableByteChannel byte channels}.
62 * Analogously, there are
63 * methods that store the content of a (big) array (fragment) or the elements
64 * returned by an iterator to a {@link DataOutput}, to an {@link OutputStream},
65 * to a {@link WritableByteChannel}, or to a given file. Files
66 * are buffered using {@link FastBufferedInputStream} and {@link FastBufferedOutputStream},
67 * or, when possible, with a {@linkplain ByteBuffer byte buffer} allocated with
68 * {@linkplain ByteBuffer#allocateDirect(int)}.
5769 *
5870 * <p>Since bytes can be read from or written to any stream, additional methods
5971 * makes it possible to {@linkplain #loadBytes(InputStream,byte[]) load bytes from} and
6173 * use the bulk-read methods of {@link InputStream} and {@link OutputStream}, but they
6274 * also include a workaround for <a href="http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6478546">bug #6478546</a>.
6375 *
64 * <p>Finally, there are useful wrapper methods that {@linkplain #asIntIterator(CharSequence)
65 * exhibit a file as a type-specific iterator}.
76 * <p>The store methods with a specified byte order are particularly useful when writing
77 * data that is intended to be {@linkplain mapped into memory it.unimi.dsi.fastutil.ints.IntMappedBigList},
78 * as using the {@linkplain ByteOrder#nativeOrder() native order} enhances performances significantly.
6679 *
6780 * @since 4.4
6881 */
6982
7083 public class BinIO {
84 /** The size used with {@link ByteBuffer#allocateDirect(int)}. */
85 public static int BUFFER_SIZE = 8192;
7186
7287 private BinIO() {}
7388
8398 oos.close();
8499 }
85100
86 /** Stores an object in a file given by a pathname.
101 /** Stores an object in a file given by a filename.
87102 *
88103 * @param o an object.
89104 * @param filename a filename.
107122 return result;
108123 }
109124
110 /** Loads an object from a file given by a pathname.
125 /** Loads an object from a file given by a filename.
111126 *
112127 * @param filename a filename.
113128 * @return the object stored under the given filename.
00 /*
1 * Copyright (C) 2004-2021 Sebastiano Vigna
1 * Copyright (C) 2004-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
6363 * @param length the number of elements of {@code array} to be filled.
6464 * @return the number of elements actually read from {@code inputStream} (it might be less than {@code length} if {@code inputStream} ends).
6565 */
66 public static int LOAD_KEYS(final InputStream inputStream, final KEY_TYPE[] array, final int offset, final int length) throws IOException {
66 public static int loadBytes(final InputStream inputStream, final byte[] array, final int offset, final int length) throws IOException {
6767 return read(inputStream, array, offset, length);
6868 }
6969
7676 * @param array an array which will be filled with data from {@code inputStream}.
7777 * @return the number of elements actually read from {@code inputStream} (it might be less than the array length if {@code inputStream} ends).
7878 */
79 public static int LOAD_KEYS(final InputStream inputStream, final KEY_TYPE[] array) throws IOException {
79 public static int loadBytes(final InputStream inputStream, final byte[] array) throws IOException {
8080 return read(inputStream, array, 0, array.length);
8181 }
8282
83 /** Stores an array fragment to a given output stream.
83 /** Stores an array fragment to a given writable channel.
8484 *
8585 * <p>Note that this method is going to be significantly faster than {@link #storeBytes(byte[],int,int,DataOutput)}
86 * as it uses {@link OutputStream}'s bulk-read methods.
86 * as it uses {@link OutputStream}'s bulk-write methods.
8787 *
8888 * @param array an array whose elements will be written to {@code outputStream}.
8989 * @param offset the index of the first element of {@code array} to be written.
9090 * @param length the number of elements of {@code array} to be written.
9191 * @param outputStream an output stream.
9292 */
93 public static void STORE_KEYS(final KEY_TYPE array[], final int offset, final int length, final OutputStream outputStream) throws IOException {
93 public static void storeBytes(final byte array[], final int offset, final int length, final OutputStream outputStream) throws IOException {
9494 write(outputStream, array, offset, length);
9595 }
9696
97 /** Stores an array to a given output stream.
97 /** Stores an array to a given writable channel.
9898 *
9999 * <p>Note that this method is going to be significantly faster than {@link #storeBytes(byte[],DataOutput)}
100 * as it uses {@link OutputStream}'s bulk-read methods.
100 * as it uses {@link OutputStream}'s bulk-write methods.
101101 *
102102 * @param array an array whose elements will be written to {@code outputStream}.
103103 * @param outputStream an output stream.
104104 */
105 public static void STORE_KEYS(final KEY_TYPE array[], final OutputStream outputStream) throws IOException {
105 public static void storeBytes(final byte array[], final OutputStream outputStream) throws IOException {
106106 write(outputStream, array, 0, array.length);
107107 }
108108
167167 // Additional read/write methods to work around the DataInput/DataOutput schizophrenia.
168168
169169
170 /** Loads bytes from a given input stream, storing them in a given big-array fragment.
170 /** Loads bytes from a given readable channel, storing them in a given big-array fragment.
171171 *
172172 * <p>Note that this method is going to be significantly faster than {@link #loadBytes(DataInput,byte[][],long,long)}
173173 * as it uses {@link InputStream}'s bulk-read methods.
178178 * @param length the number of elements of {@code array} to be filled.
179179 * @return the number of elements actually read from {@code inputStream} (it might be less than {@code length} if {@code inputStream} ends).
180180 */
181 public static long LOAD_KEYS(final InputStream inputStream, final KEY_TYPE[][] array, final long offset, final long length) throws IOException {
181 public static long loadBytes(final InputStream inputStream, final byte[][] array, final long offset, final long length) throws IOException {
182182 return read(inputStream, array, offset, length);
183183 }
184184
185 /** Loads bytes from a given input stream, storing them in a given big array.
185 /** Loads bytes from a given readable channel, storing them in a given big array.
186186 *
187187 * <p>Note that this method is going to be significantly faster than {@link #loadBytes(DataInput,byte[][])}
188188 * as it uses {@link InputStream}'s bulk-read methods.
191191 * @param array a big array which will be filled with data from {@code inputStream}.
192192 * @return the number of elements actually read from {@code inputStream} (it might be less than the array length if {@code inputStream} ends).
193193 */
194 public static long LOAD_KEYS(final InputStream inputStream, final KEY_TYPE[][] array) throws IOException {
194 public static long loadBytes(final InputStream inputStream, final byte[][] array) throws IOException {
195195 return read(inputStream, array, 0, length(array));
196196 }
197197
198 /** Stores a big-array fragment to a given output stream.
198 /** Stores a big-array fragment to a given writable channel.
199199 *
200200 * <p>Note that this method is going to be significantly faster than {@link #storeBytes(byte[][],long,long,DataOutput)}
201 * as it uses {@link OutputStream}'s bulk-read methods.
201 * as it uses {@link OutputStream}'s bulk-write methods.
202202 *
203203 * @param array a big array whose elements will be written to {@code outputStream}.
204204 * @param offset the index of the first element of {@code array} to be written.
205205 * @param length the number of elements of {@code array} to be written.
206206 * @param outputStream an output stream.
207207 */
208 public static void STORE_KEYS(final KEY_TYPE array[][], final long offset, final long length, final OutputStream outputStream) throws IOException {
208 public static void storeBytes(final byte array[][], final long offset, final long length, final OutputStream outputStream) throws IOException {
209209 write(outputStream, array, offset, length);
210210 }
211211
212 /** Stores a big array to a given output stream.
212 /** Stores a big array to a given writable channel.
213213 *
214214 * <p>Note that this method is going to be significantly faster than {@link #storeBytes(byte[][],DataOutput)}
215 * as it uses {@link OutputStream}'s bulk-read methods.
215 * as it uses {@link OutputStream}'s bulk-write methods.
216216 *
217217 * @param array a big array whose elements will be written to {@code outputStream}.
218218 * @param outputStream an output stream.
219219 */
220 public static void STORE_KEYS(final KEY_TYPE array[][], final OutputStream outputStream) throws IOException {
220 public static void storeBytes(final byte array[][], final OutputStream outputStream) throws IOException {
221221 write(outputStream, array, 0, length(array));
222 }
223
224
225 // Methods working with channels.
226
227 /** Loads bytes from a given readable channel, storing them in a given array fragment.
228 *
229 * <p>Note that this method is going to be significantly faster than {@link #loadBytes(DataInput,byte[],int,int)}
230 * as it uses {@link ReadableByteChannel}'s bulk-read methods.
231 *
232 * @param channel a readable channel.
233 * @param array an array which will be filled with data from {@code channel}.
234 * @param offset the index of the first element of {@code array} to be filled.
235 * @param length the number of elements of {@code array} to be filled.
236 * @return the number of elements actually read from {@code channel} (it might be less than {@code length} if {@code channel} ends).
237 */
238 public static int loadBytes(final ReadableByteChannel channel, final byte[] array, int offset, int length) throws IOException {
239 ensureOffsetLength(array.length, offset, length);
240 ByteBuffer buffer = ByteBuffer.allocateDirect(BUFFER_SIZE);
241 int read = 0;
242 for (;;) {
243 buffer.clear();
244 buffer.limit(Math.min(buffer.capacity(), length));
245 int r = channel.read(buffer);
246 if (r <= 0) return read;
247 read += r;
248 buffer.flip();
249 buffer.get(array, offset, r);
250 offset += r;
251 length -= r;
252 }
253 }
254
255 /** Loads bytes from a given readable channel, storing them in a given array.
256 *
257 * <p>Note that this method is going to be significantly faster than {@link #loadBytes(DataInput,byte[],int,int)}
258 * as it uses {@link ReadableByteChannel}'s bulk-read methods.
259 *
260 * @param channel a readable channel.
261 * @param array an array which will be filled with data from {@code channel}.
262 * @return the number of elements actually read from {@code channel} (it might be less than the array length if {@code channel} ends).
263 */
264 public static int loadBytes(final ReadableByteChannel channel, final byte[] array) throws IOException {
265 return loadBytes(channel, array, 0, array.length);
266 }
267
268 /** Stores an array fragment to a given writable channel.
269 *
270 * <p>Note that this method is going to be significantly faster than {@link #loadBytes(DataInput,byte[],int,int)}
271 * as it uses {@link WritableByteChannel}'s bulk-write methods.
272 *
273 * @param array an array whose elements will be written to {@code channel}.
274 * @param offset the index of the first element of {@code array} to be written.
275 * @param length the number of elements of {@code array} to be written.
276 * @param channel a writable channel.
277 */
278 public static void storeBytes(final byte array[], int offset, int length, final WritableByteChannel channel) throws IOException {
279 ensureOffsetLength(array.length, offset, length);
280 ByteBuffer buffer = ByteBuffer.allocateDirect(BUFFER_SIZE);
281
282 while(length != 0) {
283 final int l = Math.min(length, buffer.capacity());
284 buffer.clear();
285 buffer.put(array, offset, l);
286 buffer.flip();
287 channel.write(buffer);
288
289 offset += l;
290 length -= l;
291 }
292 }
293
294 /** Stores an array to a given writable channel.
295 *
296 * <p>Note that this method is going to be significantly faster than {@link #loadBytes(DataInput,byte[],int,int)}
297 * as it uses {@link WritableByteChannel}'s bulk-write methods.
298 *
299 * @param array an array whose elements will be written to {@code channel}.
300 * @param channel a writable channel.
301 */
302 public static void storeBytes(final byte array[], final WritableByteChannel channel) throws IOException {
303 storeBytes(array, 0, array.length, channel);
304 }
305
306 /** Loads bytes from a given readable channel, storing them in a given big-array fragment.
307 *
308 * <p>Note that this method is going to be significantly faster than {@link #loadBytes(DataInput,byte[],int,int)}
309 * as it uses {@link ReadableByteChannel}'s bulk-read methods.
310 *
311 * @param channel a readable channel.
312 * @param array a big array which will be filled with data from {@code channel}.
313 * @param offset the index of the first element of {@code array} to be filled.
314 * @param length the number of elements of {@code array} to be filled.
315 * @return the number of elements actually read from {@code channel} (it might be less than {@code length} if {@code channel} ends).
316 */
317 public static long loadBytes(final ReadableByteChannel channel, final byte[][] array, final long offset, final long length) throws IOException {
318 ensureOffsetLength(array, offset, length);
319 long read = 0;
320 for(int i = segment(offset); i < segment(offset + length + SEGMENT_MASK); i++) {
321 final byte[] t = array[i];
322 final int s = (int)Math.max(0, offset - start(i));
323 final int e = (int)Math.min(t.length, offset + length - start(i));
324 final int r = loadBytes(channel, t, s, e - s);
325 read += r;
326 if (r < e -s) break;
327 }
328 return read;
329 }
330
331 /** Loads bytes from a given readable channel, storing them in a given big array.
332 *
333 * <p>Note that this method is going to be significantly faster than {@link #loadBytes(DataInput,byte[],int,int)}
334 * as it uses {@link ReadableByteChannel}'s bulk-read methods.
335 *
336 * @param channel a readable channel.
337 * @param array a big array which will be filled with data from {@code channel}.
338 * @return the number of elements actually read from {@code channel} (it might be less than the array length if {@code channel} ends).
339 */
340 public static long loadBytes(final ReadableByteChannel channel, final byte[][] array) throws IOException {
341 return loadBytes(channel, array, 0, length(array));
342 }
343
344 /** Stores a big-array fragment to a given writable channel.
345 *
346 * <p>Note that this method is going to be significantly faster than {@link #loadBytes(DataInput,byte[],int,int)}
347 * as it uses {@link WritableByteChannel}'s bulk-write methods.
348 *
349 * @param array a big array whose elements will be written to {@code channel}.
350 * @param offset the index of the first element of {@code array} to be written.
351 * @param length the number of elements of {@code array} to be written.
352 * @param channel a writable channel.
353 */
354 public static void storeBytes(final byte array[][], final long offset, final long length, final WritableByteChannel channel) throws IOException {
355 for(int i = segment(offset); i < segment(offset + length + SEGMENT_MASK); i++) {
356 final int s = (int)Math.max(0, offset - start(i));
357 final int l = (int)Math.min(array[i].length, offset + length - start(i));
358 storeBytes(array[i], s, l - s, channel);
359 }
360 }
361
362 /** Stores a big array to a given writable channel.
363 *
364 * <p>Note that this method is going to be significantly faster than {@link #loadBytes(DataInput,byte[],int,int)}
365 * as it uses {@link WritableByteChannel}'s bulk-write methods.
366 *
367 * @param array a big array whose elements will be written to {@code channel}.
368 * @param channel a writable channel.
369 */
370 public static void storeBytes(final byte array[][], final WritableByteChannel channel) throws IOException {
371 for(byte[] t: array) storeBytes(t, channel);
372 }
373
374 #elif ! KEY_CLASS_Boolean
375
376 /** Loads elements from a given readable channel, using the given byte order, storing them in a given array fragment.
377 *
378 * @param channel a readable channel.
379 * @param byteOrder the byte order of the data from {@code channel}.
380 * @param array an array which will be filled with data from {@code channel}.
381 * @param offset the index of the first element of {@code array} to be filled.
382 * @param length the number of elements of {@code array} to be filled.
383 * @return the number of elements actually read from {@code channel} (it might be less than {@code length} if {@code channel} ends).
384 */
385 public static int LOAD_KEYS(final ReadableByteChannel channel, final ByteOrder byteOrder, final KEY_TYPE[] array, int offset, int length) throws IOException {
386 ensureOffsetLength(array.length, offset, length);
387 ByteBuffer byteBuffer = ByteBuffer.allocateDirect(BUFFER_SIZE).order(byteOrder);
388 final KEY_BUFFER buffer = byteBuffer.AS_KEY_BUFFER();
389 int read = 0;
390 for (;;) {
391 byteBuffer.clear();
392 byteBuffer.limit(Math.min(buffer.capacity(), length << MAPPED_BIG_LIST.LOG2_BYTES));
393 int r = channel.read(byteBuffer);
394 if (r <= 0) return read;
395 r >>>= MAPPED_BIG_LIST.LOG2_BYTES;
396 read += r;
397 // TODO: use the indexed get() method when switching to Java 13+
398 buffer.clear();
399 buffer.limit(r);
400 buffer.get(array, offset, r);
401 offset += r;
402 length -= r;
403 }
404 }
405
406 /** Loads elements from a given readable channel, using the given byte order, storing them in a given array.
407 *
408 * @param channel a readable channel.
409 * @param byteOrder the byte order of the data from {@code channel}.
410 * @param array an array which will be filled with data from {@code channel}.
411 * @return the number of elements actually read from {@code channel} (it might be less than the array length if {@code channel} ends).
412 */
413 public static int LOAD_KEYS(final ReadableByteChannel channel, final ByteOrder byteOrder, final KEY_TYPE[] array) throws IOException {
414 return LOAD_KEYS(channel, byteOrder, array, 0, array.length);
415 }
416
417 /** Loads elements from a file given by a {@link File} object, using the given byte order, storing them in a given array fragment.
418 *
419 * @param file a file.
420 * @param byteOrder the byte order of the data stored in {@code file}.
421 * @param array an array which will be filled with data from the specified file.
422 * @param offset the index of the first element of {@code array} to be filled.
423 * @param length the number of elements of {@code array} to be filled.
424 * @return the number of elements actually read from the given file (it might be less than {@code length} if the file is too short).
425 */
426 public static int LOAD_KEYS(final File file, final ByteOrder byteOrder, final KEY_TYPE[] array, final int offset, final int length) throws IOException {
427 ensureOffsetLength(array.length, offset, length);
428 final FileChannel channel = FileChannel.open(file.toPath());
429 final int read = LOAD_KEYS(channel, byteOrder, array, offset, length);
430 channel.close();
431 return read;
432 }
433
434 /** Loads elements from a file given by a filename, using the given byte order, storing them in a given array fragment.
435 *
436 * @param filename a filename.
437 * @param byteOrder the byte order of the data stored in the file {@code filename}.
438 * @param array an array which will be filled with data from the specified file.
439 * @param offset the index of the first element of {@code array} to be filled.
440 * @param length the number of elements of {@code array} to be filled.
441 * @return the number of elements actually read from the given file (it might be less than {@code length} if the file is too short).
442 */
443 public static int LOAD_KEYS(final CharSequence filename, final ByteOrder byteOrder, final KEY_TYPE[] array, final int offset, final int length) throws IOException {
444 return LOAD_KEYS(new File(filename.toString()), byteOrder, array, offset, length);
445 }
446
447 /** Loads elements from a file given by a {@link File} object, using the given byte order, storing them in a given array.
448 *
449 * @param file a file.
450 * @param byteOrder the byte order of the data stored in {@code file}.
451 * @param array an array which will be filled with data from the specified file.
452 * @return the number of elements actually read from the given file (it might be less than the array length if the file is too short).
453 */
454 public static int LOAD_KEYS(final File file, final ByteOrder byteOrder, final KEY_TYPE[] array) throws IOException {
455 return LOAD_KEYS(file, byteOrder, array, 0, array.length);
456 }
457
458 /** Loads elements from a file given by a filename, using the given byte order, storing them in a given array.
459 *
460 * @param filename a filename.
461 * @param byteOrder the byte order of the data stored in the file {@code filename}.
462 * @param array an array which will be filled with data from the specified file.
463 * @return the number of elements actually read from the given file (it might be less than the array length if the file is too short).
464 */
465 public static int LOAD_KEYS(final CharSequence filename, final ByteOrder byteOrder, final KEY_TYPE[] array) throws IOException {
466 return LOAD_KEYS(new File(filename.toString()), byteOrder, array);
467 }
468
469 /** Loads elements from a file given by a {@link File} object, using the given byte order, storing them in a new array.
470 *
471 * <p>Note that the length of the returned array will be computed
472 * dividing the specified file size by the number of bytes used to
473 * represent each element.
474 *
475 * @param file a file.
476 * @param byteOrder the byte order of the data stored in {@code file}.
477 * @return an array filled with the content of the specified file.
478 */
479 public static KEY_TYPE[] LOAD_KEYS(final File file, final ByteOrder byteOrder) throws IOException {
480 final FileChannel channel = FileChannel.open(file.toPath());
481 final long length = channel.size() / KEY_CLASS.BYTES;
482
483 if (length > Integer.MAX_VALUE) {
484 channel.close();
485 throw new IllegalArgumentException("File too long: " + channel.size()+ " bytes (" + length + " elements)");
486 }
487
488 final KEY_TYPE[] array = new KEY_TYPE[(int)length];
489 if (LOAD_KEYS(channel, byteOrder, array) < length) throw new EOFException();
490 channel.close();
491 return array;
492 }
493
494 /** Loads elements from a file given by a filename, using the given byte order, storing them in a new array.
495 *
496 * <p>Note that the length of the returned array will be computed
497 * dividing the specified file size by the number of bytes used to
498 * represent each element.
499 *
500 * @param filename a filename.
501 * @return an array filled with the content of the specified file.
502 */
503 public static KEY_TYPE[] LOAD_KEYS(final CharSequence filename, final ByteOrder byteOrder) throws IOException {
504 return LOAD_KEYS(new File(filename.toString()), byteOrder);
505 }
506
507 /** Stores an array fragment to a given writable channel, using the given byte order.
508 *
509 * @param array an array whose elements will be written to {@code channel}.
510 * @param offset the index of the first element of {@code array} to be written.
511 * @param length the number of elements of {@code array} to be written.
512 * @param channel a writable channel.
513 * @param byteOrder the byte order to be used to store data in {@code channel}.
514 */
515 public static void STORE_KEYS(final KEY_TYPE array[], int offset, int length, final WritableByteChannel channel, final ByteOrder byteOrder) throws IOException {
516 ensureOffsetLength(array.length, offset, length);
517
518 ByteBuffer byteBuffer = ByteBuffer.allocateDirect(BUFFER_SIZE).order(byteOrder);
519 final KEY_BUFFER buffer = byteBuffer.AS_KEY_BUFFER();
520
521 while(length != 0) {
522 final int l = Math.min(length, buffer.capacity());
523 buffer.clear();
524 buffer.put(array, offset, l);
525 buffer.flip();
526
527 byteBuffer.clear();
528 byteBuffer.limit(buffer.limit() << MAPPED_BIG_LIST.LOG2_BYTES);
529 channel.write(byteBuffer);
530
531 offset += l;
532 length -= l;
533 }
534 }
535
536 /** Stores an array to a given writable channel, using the given byte order.
537 *
538 * @param array an array whose elements will be written to {@code channel}.
539 * @param channel a writable channel.
540 * @param byteOrder the byte order to be used to store data in {@code channel}.
541 */
542 public static void STORE_KEYS(final KEY_TYPE array[], final WritableByteChannel channel, final ByteOrder byteOrder) throws IOException {
543 STORE_KEYS(array, 0, array.length, channel, byteOrder);
544 }
545
546 /** Stores an array fragment to a file given by a {@link File} object, using the given byte order.
547 *
548 * @param array an array whose elements will be written to {@code file}.
549 * @param offset the index of the first element of {@code array} to be written.
550 * @param length the number of elements of {@code array} to be written.
551 * @param file a file.
552 * @param byteOrder the byte order to be used to store data in {@code file}.
553 */
554 public static void STORE_KEYS(final KEY_TYPE array[], final int offset, final int length, final File file, final ByteOrder byteOrder) throws IOException {
555 final FileChannel channel = FileChannel.open(file.toPath(), StandardOpenOption.WRITE, StandardOpenOption.CREATE, StandardOpenOption.TRUNCATE_EXISTING);
556 STORE_KEYS(array, offset, length, channel, byteOrder);
557 channel.close();
558 }
559
560 /** Stores an array fragment to a file given by a filename, using the given byte order.
561 *
562 * @param array an array whose elements will be written to the file {@code filename}.
563 * @param offset the index of the first element of {@code array} to be written.
564 * @param length the number of elements of {@code array} to be written.
565 * @param filename a filename.
566 * @param byteOrder the byte order to be used to store data in the file {@code filename}.
567 */
568 public static void STORE_KEYS(final KEY_TYPE array[], final int offset, final int length, final CharSequence filename, final ByteOrder byteOrder) throws IOException {
569 STORE_KEYS(array, offset, length, new File(filename.toString()), byteOrder);
570 }
571
572 /** Stores an array to a file given by a {@link File} object, using the given byte order.
573 *
574 * @param array an array whose elements will be written to {@code file}.
575 * @param file a file.
576 * @param byteOrder the byte order to be used to store data in {@code file}.
577 */
578 public static void STORE_KEYS(final KEY_TYPE array[], final File file, final ByteOrder byteOrder) throws IOException {
579 STORE_KEYS(array, 0, array.length, file, byteOrder);
580 }
581
582 /** Stores an array to a file given by a filename, using the given byte order.
583 *
584 * @param array an array whose elements will be written to the file {@code filename}.
585 * @param filename a filename.
586 * @param byteOrder the byte order to be used to store data in the file {@code filename}.
587 */
588 public static void STORE_KEYS(final KEY_TYPE array[], final CharSequence filename, final ByteOrder byteOrder) throws IOException {
589 STORE_KEYS(array, new File(filename.toString()), byteOrder);
590 }
591
592
593
594 /** Loads elements from a given readable channel, using the given byte order, storing them in a given big-array fragment.
595 *
596 * @param channel a readable channel.
597 * @param byteOrder the byte order of the data from {@code channel}.
598 * @param array a big array which will be filled with data from {@code channel}.
599 * @param offset the index of the first element of {@code array} to be filled.
600 * @param length the number of elements of {@code array} to be filled.
601 * @return the number of elements actually read from {@code channel} (it might be less than {@code length} if {@code channel} ends).
602 */
603 public static long LOAD_KEYS(final ReadableByteChannel channel, final ByteOrder byteOrder, final KEY_TYPE[][] array, final long offset, final long length) throws IOException {
604 ensureOffsetLength(array, offset, length);
605 long read = 0;
606 for(int i = segment(offset); i < segment(offset + length + SEGMENT_MASK); i++) {
607 final KEY_TYPE[] t = array[i];
608 final int s = (int)Math.max(0, offset - start(i));
609 final int e = (int)Math.min(t.length, offset + length - start(i));
610 final int r = LOAD_KEYS(channel, byteOrder, t, s, e - s);
611 read += r;
612 if (r < e -s) break;
613 }
614 return read;
615 }
616
617 /** Loads elements from a given readable channel, using the given byte order, storing them in a given big array.
618 *
619 * @param channel a readable channel.
620 * @param byteOrder the byte order of the data from {@code channel}.
621 * @param array a big array which will be filled with data from {@code channel}.
622 * @return the number of elements actually read from {@code channel} (it might be less than the array length if {@code channel} ends).
623 */
624 public static long LOAD_KEYS(final ReadableByteChannel channel, final ByteOrder byteOrder, final KEY_TYPE[][] array) throws IOException {
625 return LOAD_KEYS(channel, byteOrder, array, 0, length(array));
626 }
627
628 /** Loads elements from a file given by a {@link File} object, using the given byte order, storing them in a given big-array fragment.
629 *
630 * @param file a file.
631 * @param byteOrder the byte order of the data stored in {@code file}.
632 * @param array a big array which will be filled with data from the specified file.
633 * @param offset the index of the first element of {@code array} to be filled.
634 * @param length the number of elements of {@code array} to be filled.
635 * @return the number of elements actually read from the given file (it might be less than {@code length} if the file is too short).
636 */
637 public static long LOAD_KEYS(final File file, final ByteOrder byteOrder, final KEY_TYPE[][] array, final long offset, final long length) throws IOException {
638 final FileChannel channel = FileChannel.open(file.toPath());
639 final long read = LOAD_KEYS(channel, byteOrder, array, offset, length);
640 channel.close();
641 return read;
642 }
643
644 /** Loads elements from a file given by a filename, using the given byte order, storing them in a given big-array fragment.
645 *
646 * @param filename a filename.
647 * @param byteOrder the byte order of the data stored in the file {@code filename}.
648 * @param array an array which will be filled with data from the specified file.
649 * @param offset the index of the first element of {@code array} to be filled.
650 * @param length the number of elements of {@code array} to be filled.
651 * @return the number of elements actually read from the given file (it might be less than {@code length} if the file is too short).
652 */
653 public static long LOAD_KEYS(final CharSequence filename, final ByteOrder byteOrder, final KEY_TYPE[][] array, final long offset, final long length) throws IOException {
654 return LOAD_KEYS(new File(filename.toString()), byteOrder, array, offset, length);
655 }
656
657 /** Loads elements from a file given by a {@link File} object, using the given byte order, storing them in a given big array.
658 *
659 * @param file a file.
660 * @param byteOrder the byte order of the data stored in {@code file}.
661 * @param array a big array which will be filled with data from the specified file.
662 * @return the number of elements actually read from the given file (it might be less than the array length if the file is too short).
663 */
664 public static long LOAD_KEYS(final File file, final ByteOrder byteOrder, final KEY_TYPE[][] array) throws IOException {
665 return LOAD_KEYS(file, byteOrder, array, 0, length(array));
666 }
667
668 /** Loads elements from a file given by a filename, using the given byte order, storing them in a given big array.
669 *
670 * @param filename a filename.
671 * @param byteOrder the byte order of the data stored in the file {@code filename}.
672 * @param array a big array which will be filled with data from the specified file.
673 * @return the number of elements actually read from the given file (it might be less than the array length if the file is too short).
674 */
675 public static long LOAD_KEYS(final CharSequence filename, final ByteOrder byteOrder, final KEY_TYPE[][] array) throws IOException {
676 return LOAD_KEYS(new File(filename.toString()), byteOrder, array);
677 }
678
679 /** Loads elements from a file given by a {@link File} object, using the given byte order, storing them in a new big array.
680 *
681 * <p>Note that the length of the returned big array will be computed
682 * dividing the specified file size by the number of bytes used to
683 * represent each element.
684 *
685 * @param file a file.
686 * @param byteOrder the byte order of the data stored in {@code file}.
687 * @return a big array filled with the content of the specified file.
688 */
689 public static KEY_TYPE[][] LOAD_KEYS_BIG(final File file, final ByteOrder byteOrder) throws IOException {
690 final FileChannel channel = FileChannel.open(file.toPath());
691 final long length = channel.size() / KEY_CLASS.BYTES;
692 final KEY_TYPE[][] array = BIG_ARRAYS.newBigArray(length);
693 for(final KEY_TYPE[] t: array) LOAD_KEYS(channel, byteOrder, t);
694 channel.close();
695 return array;
696 }
697
698 /** Loads elements from a file given by a filename, using the given byte order, storing them in a new big array.
699 *
700 * <p>Note that the length of the returned big array will be computed
701 * dividing the specified file size by the number of bytes used to
702 * represent each element.
703 *
704 * @param filename a filename.
705 * @param byteOrder the byte order of the data stored in the file {@code filename}.
706 * @return a big array filled with the content of the specified file.
707 */
708 public static KEY_TYPE[][] LOAD_KEYS_BIG(final CharSequence filename, final ByteOrder byteOrder) throws IOException {
709 return LOAD_KEYS_BIG(new File(filename.toString()), byteOrder);
710 }
711
712 /** Stores an array fragment to a given writable channel, using the given byte order.
713 *
714 * @param array an array whose elements will be written to {@code channel}.
715 * @param offset the index of the first element of {@code array} to be written.
716 * @param length the number of elements of {@code array} to be written.
717 * @param channel a writable channel.
718 * @param byteOrder the byte order to be used to store data in {@code channel}.
719 */
720 public static void STORE_KEYS(final KEY_TYPE array[][], final long offset, final long length, final WritableByteChannel channel, final ByteOrder byteOrder) throws IOException {
721 for(int i = segment(offset); i < segment(offset + length + SEGMENT_MASK); i++) {
722 final int s = (int)Math.max(0, offset - start(i));
723 final int l = (int)Math.min(array[i].length, offset + length - start(i));
724 STORE_KEYS(array[i], s, l - s, channel, byteOrder);
725 }
726 }
727
728 /** Stores a big array to a given writable channel, using the given byte order.
729 *
730 * @param array a big array whose elements will be written to {@code channel}.
731 * @param channel a writable channel.
732 * @param byteOrder the byte order to be used to store data in {@code channel}.
733 */
734 public static void STORE_KEYS(final KEY_TYPE array[][], final WritableByteChannel channel, final ByteOrder byteOrder) throws IOException {
735 for(KEY_TYPE[] t: array) STORE_KEYS(t, channel, byteOrder);
736 }
737
738 /** Stores a big-array fragment to a file given by a {@link File} object, using the given byte order.
739 *
740 * @param array a big array whose elements will be written to {@code file}.
741 * @param offset the index of the first element of {@code array} to be written.
742 * @param length the number of elements of {@code array} to be written.
743 * @param file a file.
744 * @param byteOrder the byte order to be used to store data in {@code file}.
745 */
746 public static void STORE_KEYS(final KEY_TYPE array[][], final long offset, final long length, final File file, final ByteOrder byteOrder) throws IOException {
747 final FileChannel channel = FileChannel.open(file.toPath(), StandardOpenOption.WRITE, StandardOpenOption.CREATE, StandardOpenOption.TRUNCATE_EXISTING);
748 STORE_KEYS(array, offset, length, channel, byteOrder);
749 channel.close();
750 }
751
752 /** Stores a big-array fragment to a file given by a filename, using the given byte order.
753 *
754 * @param array a big array whose elements will be written to the file {@code filename}.
755 * @param offset the index of the first element of {@code array} to be written.
756 * @param length the number of elements of {@code array} to be written.
757 * @param filename a filename.
758 * @param byteOrder the byte order to be used to store data in the file {@code filename}.
759 */
760 public static void STORE_KEYS(final KEY_TYPE array[][], final long offset, final long length, final CharSequence filename, final ByteOrder byteOrder) throws IOException {
761 STORE_KEYS(array, offset, length, new File(filename.toString()), byteOrder);
762 }
763
764 /** Stores an array to a file given by a {@link File} object, using the given byte order.
765 *
766 * @param array an array whose elements will be written to {@code file}.
767 * @param file a file.
768 * @param byteOrder the byte order to be used to store data in {@code file}.
769 */
770 public static void STORE_KEYS(final KEY_TYPE array[][], final File file, final ByteOrder byteOrder) throws IOException {
771 final FileChannel channel = FileChannel.open(file.toPath(), StandardOpenOption.WRITE, StandardOpenOption.CREATE, StandardOpenOption.TRUNCATE_EXISTING);
772 STORE_KEYS(array, channel, byteOrder);
773 channel.close();
774 }
775
776 /** Stores a big array to a file given by a filename, using the given byte order.
777 *
778 * @param array a big array whose elements will be written to the file {@code filename}.
779 * @param filename a filename.
780 * @param byteOrder the byte order to be used to store data in the file {@code filename}.
781 */
782 public static void STORE_KEYS(final KEY_TYPE array[][], final CharSequence filename, final ByteOrder byteOrder) throws IOException {
783 STORE_KEYS(array, new File(filename.toString()), byteOrder);
784 }
785
786 /** Stores the element returned by an iterator to a given writable channel, using the given byte order.
787 *
788 * @param i an iterator whose output will be written to {@code channel}.
789 * @param channel a writable channel.
790 * @param byteOrder the byte order to be used to store data in {@code channel}.
791 */
792 public static void STORE_KEYS(final KEY_ITERATOR i, final WritableByteChannel channel, final ByteOrder byteOrder) throws IOException {
793 ByteBuffer byteBuffer = ByteBuffer.allocateDirect(BUFFER_SIZE).order(byteOrder);
794 final KEY_BUFFER buffer = byteBuffer.AS_KEY_BUFFER();
795 while(i.hasNext()) {
796 if (! buffer.hasRemaining()) {
797 buffer.flip();
798 byteBuffer.clear();
799 byteBuffer.limit(buffer.limit() << MAPPED_BIG_LIST.LOG2_BYTES);
800 channel.write(byteBuffer);
801
802 buffer.clear();
803 }
804 buffer.put(i.NEXT_KEY());
805 }
806
807 buffer.flip();
808 byteBuffer.clear();
809 byteBuffer.limit(buffer.limit() << MAPPED_BIG_LIST.LOG2_BYTES);
810 channel.write(byteBuffer);
811 }
812
813 /** Stores the element returned by an iterator to a file given by a {@link File} object, using the given byte order.
814 *
815 * @param i an iterator whose output will be written to {@code file}.
816 * @param file a file.
817 * @param byteOrder the byte order to be used to store data in {@code file}.
818 */
819 public static void STORE_KEYS(final KEY_ITERATOR i, final File file, final ByteOrder byteOrder) throws IOException {
820 final FileChannel channel = FileChannel.open(file.toPath(), StandardOpenOption.WRITE, StandardOpenOption.CREATE, StandardOpenOption.TRUNCATE_EXISTING);
821 STORE_KEYS(i, channel, byteOrder);
822 channel.close();
823 }
824
825 /** Stores the element returned by an iterator to a file given by a filename, using the given byte order.
826 *
827 * @param i an iterator whose output will be written to the file {@code filename}.
828 * @param filename a filename.
829 * @param byteOrder the byte order to be used to store data in the file {@code filename}.
830 */
831 public static void STORE_KEYS(final KEY_ITERATOR i, final CharSequence filename, final ByteOrder byteOrder) throws IOException {
832 STORE_KEYS(i, new File(filename.toString()), byteOrder);
833 }
834
835 /** A wrapper that exhibits the content of a readable channel as a type-specific iterator. */
836
837 private static final class KEY_DATA_NIO_INPUT_WRAPPER implements KEY_ITERATOR {
838 private final ReadableByteChannel channel;
839 private final ByteBuffer byteBuffer;
840 private final KEY_BUFFER buffer;
841
842 public KEY_DATA_NIO_INPUT_WRAPPER(final ReadableByteChannel channel, final ByteOrder byteOrder) {
843 this.channel = channel;
844 byteBuffer = ByteBuffer.allocateDirect(BUFFER_SIZE).order(byteOrder);
845 buffer = byteBuffer.AS_KEY_BUFFER();
846 buffer.clear().flip();
847 }
848
849 @Override
850 public boolean hasNext() {
851 if (! buffer.hasRemaining()) {
852 byteBuffer.clear();
853 try {
854 channel.read(byteBuffer);
855 } catch(IOException e) {
856 throw new RuntimeException(e);
857 }
858 byteBuffer.flip();
859
860 buffer.clear();
861 buffer.limit(byteBuffer.limit() >>> MAPPED_BIG_LIST.LOG2_BYTES);
862 }
863 return buffer.hasRemaining();
864 }
865
866 @Override
867 public KEY_TYPE NEXT_KEY() {
868 if (! hasNext()) throw new NoSuchElementException();
869 return buffer.get();
870 }
871 }
872
873 /** Wraps the given readable channel, using the given byte order, into an iterator.
874 *
875 * @param channel a readable channel.
876 * @param byteOrder the byte order of the data from {@code channel}.
877 */
878 public static KEY_ITERATOR AS_KEY_ITERATOR(final ReadableByteChannel channel, final ByteOrder byteOrder) {
879 return new KEY_DATA_NIO_INPUT_WRAPPER(channel, byteOrder);
880 }
881
882 /** Wraps a file given by a {@link File} object, using the given byte order, into an iterator.
883 *
884 * @implNote This method opens a {@link FileChannel} that will not be closed until
885 * it is garbage collected.
886 *
887 * @param file a file.
888 * @param byteOrder the byte order of the data stored in {@code file}.
889 */
890 public static KEY_ITERATOR AS_KEY_ITERATOR(final File file, final ByteOrder byteOrder) throws IOException {
891 final FileChannel channel = FileChannel.open(file.toPath());
892 return new KEY_DATA_NIO_INPUT_WRAPPER(channel, byteOrder);
893 }
894
895 /** Wraps a file given by a filename, using the given byte order, into an iterator.
896 *
897 * @implNote This method opens a {@link FileChannel} that will not be closed until
898 * it is garbage collected.
899 *
900 * @param filename a filename.
901 * @param byteOrder the byte order of the data stored in the file {@code filename}.
902 */
903 public static KEY_ITERATOR AS_KEY_ITERATOR(final CharSequence filename, final ByteOrder byteOrder) throws IOException {
904 return AS_KEY_ITERATOR(new File(filename.toString()), byteOrder);
905 }
906
907 /** Wraps a file given by a {@link File} object, using the given byte order, into an iterable object.
908 *
909 * @implNote Each iterator returned by this class opens a {@link FileChannel}
910 * that will not be closed until it is garbage collected.
911 *
912 * @param file a file.
913 * @param byteOrder the byte order of the data stored in {@code file}.
914 */
915 public static KEY_ITERABLE AS_KEY_ITERABLE(final File file, final ByteOrder byteOrder) {
916 return () -> {
917 try { return AS_KEY_ITERATOR(file, byteOrder); }
918 catch(IOException e) { throw new RuntimeException(e); }
919 };
920 }
921
922 /** Wraps a file given by a filename, using the given byte order, into an iterable object.
923 *
924 * @implNote Each iterator returned by this class opens a {@link FileChannel}
925 * that will not be closed until it is garbage collected.
926 *
927 * @param filename a filename.
928 * @param byteOrder the byte order of the data stored in the file {@code filename}.
929 */
930 public static KEY_ITERABLE AS_KEY_ITERABLE(final CharSequence filename, final ByteOrder byteOrder) {
931 return () -> {
932 try { return AS_KEY_ITERATOR(filename, byteOrder); }
933 catch(IOException e) { throw new RuntimeException(e); }
934 };
222935 }
223936
224937 #endif
233946 * @return the number of elements actually read from {@code dataInput} (it might be less than {@code length} if {@code dataInput} ends).
234947 */
235948 public static int LOAD_KEYS(final DataInput dataInput, final KEY_TYPE[] array, final int offset, final int length) throws IOException {
236 PACKAGE.ARRAYS.ensureOffsetLength(array, offset, length);
949 ensureOffsetLength(array.length, offset, length);
237950 int i = 0;
238951 try {
239952 for(i = 0; i < length; i++) array[i + offset] = dataInput.READ_KEY();
267980 * @return the number of elements actually read from the given file (it might be less than {@code length} if the file is too short).
268981 */
269982 public static int LOAD_KEYS(final File file, final KEY_TYPE[] array, final int offset, final int length) throws IOException {
270 PACKAGE.ARRAYS.ensureOffsetLength(array, offset, length);
271
272 final FileInputStream fis = new FileInputStream(file);
273983 #if KEY_CLASS_Byte
274 final int result = read(fis, array, offset, length);
275 fis.close();
984 final FileChannel channel = FileChannel.open(file.toPath());
985 final int result = loadBytes(channel, array, offset, length);
986 channel.close();
276987 return result;
277 #else
278 final DataInputStream dis = new DataInputStream(new FastBufferedInputStream(fis));
988 #elif KEY_CLASS_Boolean
989 ensureOffsetLength(array.length, offset, length);
990 final DataInputStream dis = new DataInputStream(new FastBufferedInputStream(new FileInputStream(file)));
279991
280992 int i = 0;
281993 try {
285997
286998 dis.close();
287999 return i;
1000 #else
1001 return LOAD_KEYS(file, ByteOrder.BIG_ENDIAN, array, offset, length);
2881002 #endif
2891003 }
2901004
291 /** Loads elements from a file given by a pathname, storing them in a given array fragment.
1005 /** Loads elements from a file given by a filename, storing them in a given array fragment.
2921006 *
2931007 * @param filename a filename.
2941008 * @param array an array which will be filled with data from the specified file.
3071021 * @return the number of elements actually read from the given file (it might be less than the array length if the file is too short).
3081022 */
3091023 public static int LOAD_KEYS(final File file, final KEY_TYPE[] array) throws IOException {
310 final FileInputStream fis = new FileInputStream(file);
311 #if KEY_CLASS_Byte
312 final int result = read(fis, array, 0, array.length);
313 fis.close();
314 return result;
315 #else
316 final DataInputStream dis = new DataInputStream(new FastBufferedInputStream(fis));
317
318 int i = 0;
319 try {
320 final int length = array.length;
321 for(i = 0; i < length; i++) array[i] = dis.READ_KEY();
322 }
323 catch(EOFException itsOk) {}
324
325 dis.close();
326
327 return i;
328 #endif
329 }
330
331 /** Loads elements from a file given by a pathname, storing them in a given array.
1024 return LOAD_KEYS(file, array, 0, array.length);
1025 }
1026
1027 /** Loads elements from a file given by a filename, storing them in a given array.
3321028 *
3331029 * @param filename a filename.
3341030 * @param array an array which will be filled with data from the specified file.
3481044 * @return an array filled with the content of the specified file.
3491045 */
3501046 public static KEY_TYPE[] LOAD_KEYS(final File file) throws IOException {
1047 #if KEY_CLASS_Byte
1048 final FileChannel channel = FileChannel.open(file.toPath());
1049 final long length = channel.size();
1050 if (length > Integer.MAX_VALUE) {
1051 channel.close();
1052 throw new IllegalArgumentException("File too long: " + channel.size()+ " bytes (" + length + " elements)");
1053 }
1054
1055 final byte[] array = new byte[(int)length];
1056 if (loadBytes(channel, array) < length) throw new EOFException();
1057 return array;
1058 #elif KEY_CLASS_Boolean
3511059 final FileInputStream fis = new FileInputStream(file);
352
353 #if KEY_CLASS_Boolean
3541060 final long length = fis.getChannel().size();
355 #else
356 final long length = fis.getChannel().size() / (KEY_CLASS.SIZE / 8);
357 #endif
3581061
3591062 if (length > Integer.MAX_VALUE) {
3601063 fis.close();
3611064 throw new IllegalArgumentException("File too long: " + fis.getChannel().size()+ " bytes (" + length + " elements)");
3621065 }
3631066
364 final KEY_TYPE[] array = new KEY_TYPE[(int)length];
365
366 #if KEY_CLASS_Byte
367 if (read(fis, array, 0, (int)length) < length) throw new EOFException();
368 fis.close();
369 #else
1067 final boolean[] array = new boolean[(int)length];
3701068 final DataInputStream dis = new DataInputStream(new FastBufferedInputStream(fis));
3711069 for(int i = 0; i < length; i++) array[i] = dis.READ_KEY();
3721070 dis.close();
1071 return array;
1072 #else
1073 return LOAD_KEYS(file, ByteOrder.BIG_ENDIAN);
3731074 #endif
374 return array;
3751075 }
3761076
3771077 /** Loads elements from a file given by a filename, storing them in a new array.
3951095 * @param dataOutput a data output.
3961096 */
3971097 public static void STORE_KEYS(final KEY_TYPE array[], final int offset, final int length, final DataOutput dataOutput) throws IOException {
398 PACKAGE.ARRAYS.ensureOffsetLength(array, offset, length);
1098 ensureOffsetLength(array.length, offset, length);
3991099 #if KEY_CLASS_Byte
4001100 write(dataOutput, array, offset, length);
4011101 #else
4191119
4201120 /** Stores an array fragment to a file given by a {@link File} object.
4211121 *
422 * @param array an array whose elements will be written to {@code filename}.
1122 * @param array an array whose elements will be written to {@code file}.
4231123 * @param offset the index of the first element of {@code array} to be written.
4241124 * @param length the number of elements of {@code array} to be written.
4251125 * @param file a file.
4261126 */
4271127 public static void STORE_KEYS(final KEY_TYPE array[], final int offset, final int length, final File file) throws IOException {
428 PACKAGE.ARRAYS.ensureOffsetLength(array, offset, length);
4291128 #if KEY_CLASS_Byte
430 final OutputStream os = new FastBufferedOutputStream(new FileOutputStream(file));
431 write(os, array, offset, length);
432 os.close();
1129 final FileChannel channel = FileChannel.open(file.toPath(), StandardOpenOption.WRITE, StandardOpenOption.CREATE, StandardOpenOption.TRUNCATE_EXISTING);
1130 storeBytes(array, offset, length, channel);
1131 channel.close();
1132 #elif KEY_CLASS_Boolean
1133 ensureOffsetLength(array.length, offset, length);
1134 final DataOutputStream dos = new DataOutputStream(new FastBufferedOutputStream(new FileOutputStream(file)));
1135 for(int i = 0; i < length; i++) dos.writeBoolean(array[offset + i]);
1136 dos.close();
4331137 #else
434 final DataOutputStream dos = new DataOutputStream(new FastBufferedOutputStream(new FileOutputStream(file)));
435 for(int i = 0; i < length; i++) dos.WRITE_KEY(array[offset + i]);
436 dos.close();
1138 STORE_KEYS(array, offset, length, file, ByteOrder.BIG_ENDIAN);
4371139 #endif
4381140 }
4391141
440 /** Stores an array fragment to a file given by a pathname.
441 *
442 * @param array an array whose elements will be written to {@code filename}.
1142 /** Stores an array fragment to a file given by a filename.
1143 *
1144 * @param array an array whose elements will be written to the file {@code filename}.
4431145 * @param offset the index of the first element of {@code array} to be written.
4441146 * @param length the number of elements of {@code array} to be written.
4451147 * @param filename a filename.
4501152
4511153 /** Stores an array to a file given by a {@link File} object.
4521154 *
453 * @param array an array whose elements will be written to {@code filename}.
1155 * @param array an array whose elements will be written to {@code file}.
4541156 * @param file a file.
4551157 */
4561158 public static void STORE_KEYS(final KEY_TYPE array[], final File file) throws IOException {
457 #if KEY_CLASS_Byte
458 final OutputStream os = new FastBufferedOutputStream(new FileOutputStream(file));
459 write(os, array, 0, array.length);
460 os.close();
461 #else
462 final int length = array.length;
463 final DataOutputStream dos = new DataOutputStream(new FastBufferedOutputStream(new FileOutputStream(file)));
464 for(int i = 0; i < length; i++) dos.WRITE_KEY(array[i]);
465 dos.close();
466 #endif
467 }
468
469 /** Stores an array to a file given by a pathname.
470 *
471 * @param array an array whose elements will be written to {@code filename}.
1159 STORE_KEYS(array, 0, array.length, file);
1160 }
1161
1162 /** Stores an array to a file given by a filename.
1163 *
1164 * @param array an array whose elements will be written to the file {@code filename}.
4721165 * @param filename a filename.
4731166 */
4741167 public static void STORE_KEYS(final KEY_TYPE array[], final CharSequence filename) throws IOException {
4761169 }
4771170
4781171
479
480
481
4821172 /** Loads elements from a given data input, storing them in a given big-array fragment.
4831173 *
4841174 * @param dataInput a data input.
4851175 * @param array a big array which will be filled with data from {@code dataInput}.
486 * @param offset the index of the first element of {@code bigArray} to be filled.
487 * @param length the number of elements of {@code bigArray} to be filled.
1176 * @param offset the index of the first element of {@code array} to be filled.
1177 * @param length the number of elements of {@code array} to be filled.
4881178 * @return the number of elements actually read from {@code dataInput} (it might be less than {@code length} if {@code dataInput} ends).
4891179 */
4901180 public static long LOAD_KEYS(final DataInput dataInput, final KEY_TYPE[][] array, final long offset, final long length) throws IOException {
5351225 * @return the number of elements actually read from the given file (it might be less than {@code length} if the file is too short).
5361226 */
5371227 public static long LOAD_KEYS(final File file, final KEY_TYPE[][] array, final long offset, final long length) throws IOException {
1228 #if KEY_CLASS_Byte
1229 final FileChannel channel = FileChannel.open(file.toPath());
1230 final long read = LOAD_KEYS(channel, array, offset, length);
1231 return read;
1232 #elif KEY_CLASS_Boolean
5381233 ensureOffsetLength(array, offset, length);
539
5401234 final FileInputStream fis = new FileInputStream(file);
541 #if KEY_CLASS_Byte
542 final long result = read(fis, array, offset, length);
543 fis.close();
544 return result;
545 #else
5461235 final DataInputStream dis = new DataInputStream(new FastBufferedInputStream(fis));
5471236
5481237 long c = 0;
5511240 final KEY_TYPE[] t = array[i];
5521241 final int l = (int)Math.min(t.length, offset + length - start(i));
5531242 for(int d = (int)Math.max(0, offset - start(i)); d < l; d++) {
554 t[d] = dis.READ_KEY();
1243 t[d] = dis.readBoolean();
5551244 c++;
5561245 }
5571246 }
5591248 catch(EOFException itsOk) {}
5601249 dis.close();
5611250 return c;
1251 #else
1252 return LOAD_KEYS(file, ByteOrder.BIG_ENDIAN, array, offset, length);
5621253 #endif
5631254 }
5641255
565 /** Loads elements from a file given by a pathname, storing them in a given big-array fragment.
1256 /** Loads elements from a file given by a filename, storing them in a given big-array fragment.
5661257 *
5671258 * @param filename a filename.
5681259 * @param array an array which will be filled with data from the specified file.
5811272 * @return the number of elements actually read from the given file (it might be less than the array length if the file is too short).
5821273 */
5831274 public static long LOAD_KEYS(final File file, final KEY_TYPE[][] array) throws IOException {
1275 #if KEY_CLASS_Byte
1276 final FileChannel channel = FileChannel.open(file.toPath());
1277 final long read = LOAD_KEYS(channel, array);
1278 return read;
1279 #elif KEY_CLASS_Boolean
5841280 final FileInputStream fis = new FileInputStream(file);
585 #if KEY_CLASS_Byte
586 final long result = read(fis, array, 0, length(array));
587 fis.close();
588 return result;
589 #else
5901281 final DataInputStream dis = new DataInputStream(new FastBufferedInputStream(fis));
5911282
5921283 long c = 0;
5951286 final KEY_TYPE[] t = array[i];
5961287 final int l = t.length;
5971288 for(int d = 0; d < l; d++) {
598 t[d] = dis.READ_KEY();
1289 t[d] = dis.readBoolean();
5991290 c++;
6001291 }
6011292 }
6021293 }
6031294 catch(EOFException itsOk) {}
604
6051295 dis.close();
6061296
6071297 return c;
1298 #else
1299 return LOAD_KEYS(file, ByteOrder.BIG_ENDIAN, array);
6081300 #endif
6091301 }
6101302
611 /** Loads elements from a file given by a pathname, storing them in a given big array.
1303 /** Loads elements from a file given by a filename, storing them in a given big array.
6121304 *
6131305 * @param filename a filename.
6141306 * @param array a big array which will be filled with data from the specified file.
6281320 * @return a big array filled with the content of the specified file.
6291321 */
6301322 public static KEY_TYPE[][] LOAD_KEYS_BIG(final File file) throws IOException {
1323 #if KEY_CLASS_Byte
1324 final FileChannel channel = FileChannel.open(file.toPath());
1325 final long length = channel.size();
1326 final byte[][] array = ByteBigArrays.newBigArray(length);
1327 loadBytes(channel, array);
1328 channel.close();
1329 return array;
1330 #elif KEY_CLASS_Boolean
6311331 final FileInputStream fis = new FileInputStream(file);
632
633 #if KEY_CLASS_Boolean
6341332 final long length = fis.getChannel().size();
1333 final KEY_TYPE[][] array = BooleanBigArrays.newBigArray(length);
1334 final DataInputStream dis = new DataInputStream(new FastBufferedInputStream(fis));
1335
1336 for(int i = 0; i < array.length; i++) {
1337 final boolean[] t = array[i];
1338 final int l = t.length;
1339 for(int d = 0; d < l; d++) t[d] = dis.readBoolean();
1340 }
1341 dis.close();
1342 return array;
6351343 #else
636 final long length = fis.getChannel().size() / (KEY_CLASS.SIZE / 8);
1344 return LOAD_KEYS_BIG(file, ByteOrder.BIG_ENDIAN);
6371345 #endif
638
639 final KEY_TYPE[][] array = BIG_ARRAYS.newBigArray(length);
640
641 #if KEY_CLASS_Byte
642 if (read(fis, array, 0, length) < length) throw new EOFException();
643 fis.close();
644 #else
645 final DataInputStream dis = new DataInputStream(new FastBufferedInputStream(fis));
646
647 for(int i = 0; i < array.length; i++) {
648 final KEY_TYPE[] t = array[i];
649 final int l = t.length;
650 for(int d = 0; d < l; d++) t[d] = dis.READ_KEY();
651 }
652
653 dis.close();
654 #endif
655 return array;
6561346 }
6571347
6581348 /** Loads elements from a file given by a filename, storing them in a new big array.
7071397
7081398 /** Stores a big-array fragment to a file given by a {@link File} object.
7091399 *
710 * @param array a big array whose elements will be written to {@code filename}.
1400 * @param array a big array whose elements will be written to {@code file}.
7111401 * @param offset the index of the first element of {@code array} to be written.
7121402 * @param length the number of elements of {@code array} to be written.
7131403 * @param file a file.
7141404 */
7151405 public static void STORE_KEYS(final KEY_TYPE array[][], final long offset, final long length, final File file) throws IOException {
716 ensureOffsetLength(array, offset, length);
717 #if KEY_CLASS_Byte
718 final OutputStream os = new FastBufferedOutputStream(new FileOutputStream(file));
719 write(os, array, offset, length);
720 os.close();
721 #else
1406 #if KEY_CLASS_Byte
1407 final FileChannel channel = FileChannel.open(file.toPath(), StandardOpenOption.WRITE, StandardOpenOption.CREATE, StandardOpenOption.TRUNCATE_EXISTING);
1408 storeBytes(array, offset, length, channel);
1409 channel.close();
1410 #elif KEY_CLASS_Boolean
7221411 final DataOutputStream dos = new DataOutputStream(new FastBufferedOutputStream(new FileOutputStream(file)));
7231412 for(int i = segment(offset); i < segment(offset + length + SEGMENT_MASK); i++) {
7241413 final KEY_TYPE[] t = array[i];
7261415 for(int d = (int)Math.max(0, offset - start(i)); d < l; d++) dos.WRITE_KEY(t[d]);
7271416 }
7281417 dos.close();
729
1418 #else
1419 STORE_KEYS(array, offset, length, file, ByteOrder.BIG_ENDIAN);
7301420 #endif
7311421 }
7321422
733 /** Stores a big-array fragment to a file given by a pathname.
734 *
735 * @param array a big array whose elements will be written to {@code filename}.
1423 /** Stores a big-array fragment to a file given by a filename.
1424 *
1425 * @param array a big array whose elements will be written to the file {@code filename}.
7361426 * @param offset the index of the first element of {@code array} to be written.
7371427 * @param length the number of elements of {@code array} to be written.
7381428 * @param filename a filename.
7431433
7441434 /** Stores an array to a file given by a {@link File} object.
7451435 *
746 * @param array an array whose elements will be written to {@code filename}.
1436 * @param array an array whose elements will be written to {@code file}.
7471437 * @param file a file.
7481438 */
7491439 public static void STORE_KEYS(final KEY_TYPE array[][], final File file) throws IOException {
7501440 #if KEY_CLASS_Byte
751 final OutputStream os = new FastBufferedOutputStream(new FileOutputStream(file));
752 write(os, array, 0, length(array));
753 os.close();
754 #else
1441 final FileChannel channel = FileChannel.open(file.toPath(), StandardOpenOption.WRITE, StandardOpenOption.CREATE, StandardOpenOption.TRUNCATE_EXISTING);
1442 storeBytes(array, channel);
1443 channel.close();
1444 #elif KEY_CLASS_Boolean
7551445 final DataOutputStream dos = new DataOutputStream(new FastBufferedOutputStream(new FileOutputStream(file)));
7561446 for(int i = 0; i < array.length; i++) {
7571447 final KEY_TYPE[] t = array[i];
7591449 for(int d = 0; d < l; d++) dos.WRITE_KEY(t[d]);
7601450 }
7611451 dos.close();
1452 #else
1453 STORE_KEYS(array, file, ByteOrder.BIG_ENDIAN);
7621454 #endif
7631455 }
7641456
765 /** Stores a big array to a file given by a pathname.
766 *
767 * @param array a big array whose elements will be written to {@code filename}.
1457 /** Stores a big array to a file given by a filename.
1458 *
1459 * @param array a big array whose elements will be written to the file {@code filename}.
7681460 * @param filename a filename.
7691461 */
7701462 public static void STORE_KEYS(final KEY_TYPE array[][], final CharSequence filename) throws IOException {
7821474
7831475 /** Stores the element returned by an iterator to a file given by a {@link File} object.
7841476 *
785 * @param i an iterator whose output will be written to {@code filename}.
1477 * @param i an iterator whose output will be written to {@code file}.
7861478 * @param file a file.
7871479 */
7881480 public static void STORE_KEYS(final KEY_ITERATOR i, final File file) throws IOException {
1481 #if KEY_CLASS_Boolean || KEY_CLASS_Byte
7891482 final DataOutputStream dos = new DataOutputStream(new FastBufferedOutputStream(new FileOutputStream(file)));
7901483 while(i.hasNext()) dos.WRITE_KEY(i.NEXT_KEY());
7911484 dos.close();
792 }
793
794 /** Stores the element returned by an iterator to a file given by a pathname.
795 *
796 * @param i an iterator whose output will be written to {@code filename}.
1485 #else
1486 STORE_KEYS(i, file, ByteOrder.BIG_ENDIAN);
1487 #endif
1488 }
1489
1490 /** Stores the element returned by an iterator to a file given by a filename.
1491 *
1492 * @param i an iterator whose output will be written to the file {@code filename}.
7971493 * @param filename a filename.
7981494 */
7991495 public static void STORE_KEYS(final KEY_ITERATOR i, final CharSequence filename) throws IOException {
8431539
8441540 /** Wraps a file given by a {@link File} object into an iterator.
8451541 *
1542 * @implNote This method opens a {@link FileChannel} that will not be closed until
1543 * it is garbage collected.
1544 *
8461545 * @param file a file.
8471546 */
8481547 public static KEY_ITERATOR AS_KEY_ITERATOR(final File file) throws IOException {
1548 #if KEY_CLASS_Boolean || KEY_CLASS_Byte
8491549 return new KEY_DATA_INPUT_WRAPPER(new DataInputStream(new FastBufferedInputStream(new FileInputStream(file))));
850 }
851
852 /** Wraps a file given by a pathname into an iterator.
1550 #else
1551 return AS_KEY_ITERATOR(file, ByteOrder.BIG_ENDIAN);
1552 #endif
1553 }
1554
1555 /** Wraps a file given by a filename into an iterator.
1556 *
1557 * @implNote This method opens a {@link FileChannel} that will not be closed until
1558 * it is garbage collected.
8531559 *
8541560 * @param filename a filename.
8551561 */
8581564 }
8591565
8601566 /** Wraps a file given by a {@link File} object into an iterable object.
1567 *
1568 * @implNote Each iterator returned by this class opens a {@link FileChannel}
1569 * that will not be closed until it is garbage collected.
8611570 *
8621571 * @param file a file.
8631572 */
8681577 };
8691578 }
8701579
871 /** Wraps a file given by a pathname into an iterable object.
1580 /** Wraps a file given by a filename into an iterable object.
1581 *
1582 * @implNote Each iterator returned by this class opens a {@link FileChannel}
1583 * that will not be closed until it is garbage collected.
8721584 *
8731585 * @param filename a filename.
8741586 */
8781590 catch(IOException e) { throw new RuntimeException(e); }
8791591 };
8801592 }
881
00 /*
1 * Copyright (C) 2020-2021 Sebastiano Vigna
1 * Copyright (C) 2020-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2002-2021 Sebastiano Vigna
1 * Copyright (C) 2002-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2002-2021 Sebastiano Vigna
1 * Copyright (C) 2002-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2002-2021 Sebastiano Vigna
1 * Copyright (C) 2002-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2003-2021 Paolo Boldi and Sebastiano Vigna
1 * Copyright (C) 2003-2022 Paolo Boldi and Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2017-2021 Sebastiano Vigna
1 * Copyright (C) 2017-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2002-2021 Sebastiano Vigna
1 * Copyright (C) 2002-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2002-2021 Sebastiano Vigna
1 * Copyright (C) 2002-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2002-2021 Sebastiano Vigna
1 * Copyright (C) 2002-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2003-2021 Paolo Boldi and Sebastiano Vigna
1 * Copyright (C) 2003-2022 Paolo Boldi and Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2003-2021 Paolo Boldi and Sebastiano Vigna
1 * Copyright (C) 2003-2022 Paolo Boldi and Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2003-2021 Paolo Boldi and Sebastiano Vigna
1 * Copyright (C) 2003-2022 Paolo Boldi and Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2003-2021 Paolo Boldi and Sebastiano Vigna
1 * Copyright (C) 2003-2022 Paolo Boldi and Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2020-2021 Sebastiano Vigna
1 * Copyright (C) 2020-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2020-2021 Sebastiano Vigna
1 * Copyright (C) 2020-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2020-2021 Sebastiano Vigna
1 * Copyright (C) 2020-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2003-2021 Paolo Boldi and Sebastiano Vigna
1 * Copyright (C) 2003-2022 Paolo Boldi and Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2003-2021 Paolo Boldi and Sebastiano Vigna
1 * Copyright (C) 2003-2022 Paolo Boldi and Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2002-2021 Sebastiano Vigna
1 * Copyright (C) 2002-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2020-2021 Sebastiano Vigna
1 * Copyright (C) 2020-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2002-2021 Sebastiano Vigna
1 * Copyright (C) 2002-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2002-2021 Sebastiano Vigna
1 * Copyright (C) 2002-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2002-2021 Sebastiano Vigna
1 * Copyright (C) 2002-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
207207 /** Set (hopefully quickly) elements to match the array given.
208208 *
209209 * Sets each in this list to the corresponding elements in the array, as if by
210 * <pre><code>
210 * <pre>
211211 * ListIterator iter = listIterator(index);
212212 * int i = 0;
213213 * while (i &lt; length) {
214214 * iter.next();
215215 * iter.set(a[offset + i++]);
216216 * }
217 * </code></pre>
217 * </pre>
218218 * However, the exact implementation may be more efficient, taking into account
219219 * whether random access is faster or not, or at the discretion of subclasses,
220220 * abuse internals.
00 /*
1 * Copyright (C) 2002-2021 Sebastiano Vigna
1 * Copyright (C) 2002-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2002-2021 Sebastiano Vigna
1 * Copyright (C) 2002-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2002-2021 Sebastiano Vigna
1 * Copyright (C) 2002-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
111111 /** Removes all of the mappings from this map (optional operation).
112112 * The map will be empty after this call returns.
113113 *
114 * @throws UnsupportedOperationException if the <code>clear()</code> operation is not supported by this map
114 * @throws UnsupportedOperationException if the {@link #clear()} operation is not supported by this map
115115 */
116116
117117 @Override
317317 // Defaultable methods
318318
319319 @Override
320 SUPPRESS_WARNINGS_KEY_VALUE_UNCHECKED
321320 default void forEach(final java.util.function.BiConsumer<? super KEY_GENERIC_CLASS, ? super VALUE_GENERIC_CLASS> consumer) {
322321 final ObjectSet<MAP.Entry KEY_VALUE_GENERIC> entrySet = ENTRYSET();
323322 final Consumer<MAP.Entry KEY_VALUE_GENERIC> wrappingConsumer = (entry) -> consumer.accept(KEY2OBJ(entry.ENTRY_GET_KEY()), VALUE2OBJ(entry.ENTRY_GET_VALUE()));
508507 * in the given mapping function.
509508 *
510509 * <p>This version of {@linkplain java.util.Map#computeIfAbsent(Object, java.util.function.Function) computeIfAbsent()}
511 * uses a type-specific version of <code>fastutil</code>'s {@link it.unimi.dsi.fastutil.Function Function}.
510 * uses a type-specific version of {@code fastutil}'s {@link it.unimi.dsi.fastutil.Function Function}.
512511 * Since {@link it.unimi.dsi.fastutil.Function Function} has a {@link it.unimi.dsi.fastutil.Function#containsKey(Object) containsKey()}
513512 * method, it is possible to avoid adding a key by having {@code containsKey()} return {@code false} for that key.
514513 *
546545
547546
548547 /** If the value for the specified key is present, attempts to compute a new mapping given the key and its current mapped value.
548 *
549 * @apiNote The JDK specification for this method equates not being associated with a value with being associated with {code null}.
550 * This is not the case for this method.
549551 *
550552 * @param key key with which the specified value is to be associated.
551553 * @param remappingFunction the function to compute a value.
627629 */
628630 default VALUE_GENERIC_TYPE merge(final KEY_GENERIC_TYPE key, final VALUE_GENERIC_TYPE value, final java.util.function.BiFunction<? super VALUE_GENERIC_CLASS, ? super VALUE_GENERIC_CLASS, ? extends VALUE_GENERIC_CLASS> remappingFunction) {
629631 java.util.Objects.requireNonNull(remappingFunction);
630 #if VALUES_REFERENCE
631 java.util.Objects.requireNonNull(value);
632 #endif
632 REQUIRE_VALUE_NON_NULL(value)
633
633634 final VALUE_GENERIC_TYPE oldValue = GET_VALUE(key), drv = defaultReturnValue();
634635 final VALUE_GENERIC_TYPE newValue;
635636 if (oldValue != drv || containsKey(key)) {
0 /*
1 * Copyright (C) 2002-2022 Sebastiano Vigna
2 *
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 * http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15
16
17 package PACKAGE;
18
19 import java.io.DataOutput;
20 import java.io.IOException;
21 import java.nio.KEY_BUFFER;
22 import java.nio.ByteOrder;
23 import java.nio.ByteBuffer;
24 import java.nio.MappedByteBuffer;
25 import java.nio.channels.FileChannel;
26 import java.nio.channels.FileChannel.MapMode;
27 import java.util.Arrays;
28
29 /** A bridge between byte {@linkplain ByteBuffer buffers} and type-specific {@linkplain it.unimi.dsi.fastutil.BigList big lists}.
30 *
31 * <p>Java's {@linkplain FileChannel#map(MapMode, long, long) memory-mapping facilities} have
32 * the severe limitation of mapping at most {@link Integer#MAX_VALUE} bytes, as they
33 * expose the content of a file using a {@link MappedByteBuffer}. This class can {@linkplain #map(FileChannel, ByteOrder, FileChannel.MapMode) expose
34 * a file of primitive types of arbitrary length} as a {@link it.unimi.dsi.fastutil.BigList}
35 * that is actually based on an array of {@link MappedByteBuffer}s, each mapping
36 * a <em>chunk</em> of {@link #CHUNK_SIZE} longs.
37 *
38 * <p>Mapping can happen with a specified byte order: saving and mapping data in {@linkplain ByteOrder#nativeOrder() native order}
39 * using methods from {@link it.unimi.dsi.fastutil.io.BinIO} will enhance performance significantly.
40 *
41 * <p>Instances of this class are not thread safe, but the {@link #copy()} method provides a lightweight
42 * duplicate that can be read independently by another thread.
43 * Only chunks that are actually used will be {@linkplain ByteBuffer#duplicate() duplicated} lazily.
44 * If you are modifiying the content of list, however, you will need to provide external synchronization.
45 *
46 * @author Sebastiano Vigna
47 */
48
49 public class MAPPED_BIG_LIST extends ABSTRACT_BIG_LIST {
50 /** The logarithm of the number of bytes of the primitive type of this list. */
51 public static int LOG2_BYTES = Long.SIZE - 1 - Long.numberOfLeadingZeros(KEY_CLASS.BYTES);
52
53 /** @deprecated Use {@link #LOG2_BYTES}. */
54 @Deprecated
55 public static int LOG2_BITS = Long.SIZE - 1 - Long.numberOfLeadingZeros(KEY_CLASS.BYTES);
56
57 private static int CHUNK_SHIFT = 30 - LOG2_BYTES;
58
59 /** The size in elements of a chunk created by {@link #map(FileChannel, ByteOrder, FileChannel.MapMode)}. */
60 public static final long CHUNK_SIZE = 1L << CHUNK_SHIFT;
61
62 /** The mask used to compute the offset in the chunk in longs. */
63 private static final long CHUNK_MASK = CHUNK_SIZE - 1;
64
65 /** The underlying buffers. */
66 private final KEY_BUFFER[] buffer;
67
68 /** An array parallel to {@link #buffer} specifying which buffers do not need to be
69 * duplicated before being used. */
70 private final boolean[] readyToUse;
71
72 /** The number of byte buffers. */
73 private final int n;
74
75 /** The overall size in elements. */
76 private final long size;
77
78 /** Creates a new mapped big list.
79 *
80 * @param buffer the underlying buffers.
81 * @param size the overall number of elements in the underlying buffers (i.e., the
82 * sum of the capacities of the byte buffers divided by the size of an element in bytes).
83 * @param readyToUse an array parallel to {@code buffer} specifying which buffers do not need to be
84 * {@linkplain ByteBuffer#duplicate() duplicated} before being used (the process will happen lazily); the array
85 * will be used internally by the newly created mapped big list.
86 */
87
88 protected MAPPED_BIG_LIST(final KEY_BUFFER[] buffer, final long size, final boolean[] readyToUse) {
89 this.buffer = buffer;
90 this.n = buffer.length;
91 this.size = size;
92 this.readyToUse = readyToUse;
93
94 for(int i = 0; i < n; i++) if (i < n - 1 && buffer[i].capacity() != CHUNK_SIZE) throw new IllegalArgumentException();
95 }
96
97 /** Creates a new mapped big list by read-only mapping a given file channel using the
98 * standard Java (i.e., {@link DataOutput}) byte order ({@link ByteOrder#BIG_ENDIAN}).
99 *
100 * @param fileChannel the file channel that will be mapped.
101 * @return a new read-only mapped big list over the contents of {@code fileChannel}.
102 *
103 * @see #map(FileChannel, ByteOrder, MapMode)
104 */
105
106 public static MAPPED_BIG_LIST map(final FileChannel fileChannel) throws IOException {
107 return map(fileChannel, ByteOrder.BIG_ENDIAN);
108 }
109
110 /** Creates a new mapped big list by read-only mapping a given file channel.
111 *
112 * @param fileChannel the file channel that will be mapped.
113 * @param byteOrder a prescribed byte order.
114 * @return a new read-only mapped big list over the contents of {@code fileChannel}.
115 *
116 * @see #map(FileChannel, ByteOrder, MapMode)
117 */
118
119 public static MAPPED_BIG_LIST map(final FileChannel fileChannel, final ByteOrder byteOrder) throws IOException {
120 return map(fileChannel, byteOrder, MapMode.READ_ONLY);
121 }
122
123 /** Creates a new mapped big list by mapping a given file channel.
124 *
125 * @param fileChannel the file channel that will be mapped.
126 * @param byteOrder a prescribed byte order.
127 * @param mapMode the mapping mode: usually {@link MapMode#READ_ONLY}, but if intend to make the list
128 * {@linkplain #set mutable}, you have to pass {@link MapMode#READ_WRITE}.
129 * @return a new mapped big list over the contents of {@code fileChannel}.
130 */
131
132 public static MAPPED_BIG_LIST map(final FileChannel fileChannel, final ByteOrder byteOrder, final MapMode mapMode) throws IOException {
133 final long size = fileChannel.size() / KEY_CLASS.BYTES;
134 final int chunks = (int)((size + (CHUNK_SIZE - 1)) / CHUNK_SIZE);
135 final KEY_BUFFER[] buffer = new KEY_BUFFER[chunks];
136 #if KEY_CLASS_Byte
137 for(int i = 0; i < chunks; i++) buffer[i] = fileChannel.map(mapMode, i * CHUNK_SIZE * KEY_CLASS.BYTES, Math.min(CHUNK_SIZE, size - i * CHUNK_SIZE) * KEY_CLASS.BYTES);
138 #else
139 for(int i = 0; i < chunks; i++) buffer[i] = fileChannel.map(mapMode, i * CHUNK_SIZE * KEY_CLASS.BYTES, Math.min(CHUNK_SIZE, size - i * CHUNK_SIZE) * KEY_CLASS.BYTES).order(byteOrder).AS_KEY_BUFFER();
140 #endif
141 final boolean[] readyToUse = new boolean[chunks];
142 Arrays.fill(readyToUse, true);
143 return new MAPPED_BIG_LIST(buffer, size, readyToUse);
144 }
145
146 private KEY_BUFFER KEY_BUFFER(final int n) {
147 if (readyToUse[n]) return buffer[n];
148 readyToUse[n] = true;
149 return buffer[n] = buffer[n].duplicate();
150 }
151
152 /** Returns a lightweight duplicate that can be read independently by another thread.
153 *
154 * <p>Only chunks that are actually used will be {@linkplain ByteBuffer#duplicate() duplicated} lazily.
155 * @return a lightweight duplicate that can be read independently by another thread.
156 */
157 public MAPPED_BIG_LIST copy() {
158 return new MAPPED_BIG_LIST(buffer.clone(), size, new boolean[n]);
159 }
160
161 @Override
162 public KEY_TYPE GET_KEY(final long index) {
163 return KEY_BUFFER((int)(index >>> CHUNK_SHIFT)).get((int)(index & CHUNK_MASK));
164 }
165
166 @Override
167 public void getElements(long from, KEY_TYPE a[], int offset, int length) {
168 int chunk = (int)(from >>> CHUNK_SHIFT);
169 int displ = (int)(from & CHUNK_MASK);
170
171 while(length > 0) {
172 KEY_BUFFER b = KEY_BUFFER(chunk);
173 final int l = Math.min(b.capacity() - displ, length);
174 if (l == 0) throw new ArrayIndexOutOfBoundsException();
175
176 // TODO: use chaining switching to Java 9+
177 b.position(displ);
178 b.get(a, offset, l);
179
180 if ((displ += l) == CHUNK_SIZE) {
181 displ = 0;
182 chunk++;
183 }
184
185 offset += l;
186 length -= l;
187 }
188 }
189
190 @Override
191 public KEY_TYPE set(final long index, final KEY_TYPE value) {
192 final KEY_BUFFER b = KEY_BUFFER((int)(index >>> CHUNK_SHIFT));
193 final int i = (int)(index & CHUNK_MASK);
194 final KEY_TYPE previousValue = b.get(i);
195 b.put(i, value);
196 return previousValue;
197 }
198
199 @Override
200 public long size64() {
201 return size;
202 }
203 }
00 /*
1 * Copyright (C) 2002-2021 Sebastiano Vigna
1 * Copyright (C) 2002-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
124124 @Override
125125 public void putAll(final Map<? extends KEY_GENERIC_CLASS, ? extends VALUE_GENERIC_CLASS> m) { throw new UnsupportedOperationException(); }
126126
127 @SuppressWarnings("unchecked")
128127 @Override
129128 public ObjectSet<MAP.Entry KEY_VALUE_GENERIC> ENTRYSET() { return ObjectSets.EMPTY_SET; }
130129
00 /*
1 * Copyright (C) 2020-2021 Sebastiano Vigna
1 * Copyright (C) 2020-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2002-2021 Sebastiano Vigna
1 * Copyright (C) 2002-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2002-2021 Sebastiano Vigna
1 * Copyright (C) 2002-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
12011201 java.util.Objects.requireNonNull(remappingFunction);
12021202 final int pos = find(k);
12031203 if (pos < 0) return defRetValue;
1204 #if VALUES_REFERENCE
1205 if (value[pos] == null) return defRetValue;
1206 #endif
12041207 final VALUE_GENERIC_CLASS newValue = remappingFunction.apply(KEY2OBJ(k), VALUE2OBJ(value[pos]));
12051208 if (newValue == null) {
12061209 if (KEY_EQUALS_NULL(k)) removeNullEntry();
12371240 @Override
12381241 public VALUE_GENERIC_TYPE merge(final KEY_GENERIC_TYPE k, final VALUE_GENERIC_TYPE v, final java.util.function.BiFunction<? super VALUE_GENERIC_CLASS, ? super VALUE_GENERIC_CLASS, ? extends VALUE_GENERIC_CLASS> remappingFunction) {
12391242 java.util.Objects.requireNonNull(remappingFunction);
1243 REQUIRE_VALUE_NON_NULL(v)
12401244
12411245 final int pos = find(k);
12421246 #if VALUES_PRIMITIVE
12431247 if (pos < 0) {
12441248 #else
12451249 if (pos < 0 || value[pos] == null) {
1246 if (v == null) return defRetValue;
1247 #endif
1248 insert(-pos - 1, k, v);
1250 #endif
1251 if (pos < 0) insert(-pos - 1, k, v);
1252 else value[pos] = v;
1253
12491254 return v;
12501255 }
12511256
00 /*
1 * Copyright (C) 2002-2021 Sebastiano Vigna
1 * Copyright (C) 2002-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2020-2021 Sebastiano Vigna
1 * Copyright (C) 2020-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2020-2021 Sebastiano Vigna
1 * Copyright (C) 2020-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2003-2021 Paolo Boldi and Sebastiano Vigna
1 * Copyright (C) 2003-2022 Paolo Boldi and Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2003-2021 Sebastiano Vigna
1 * Copyright (C) 2003-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2002-2021 Sebastiano Vigna
1 * Copyright (C) 2002-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
298298 */
299299 private Entry KEY_VALUE_GENERIC add(final KEY_GENERIC_TYPE k) {
300300 /* After execution of this method, modified is true iff a new entry has been inserted. */
301 REQUIRE_KEY_NON_NULL(k)
301302 modified = false;
302303 int maxDepth = 0;
303304
993994 SUPPRESS_WARNINGS_KEY_UNCHECKED
994995 @Override
995996 public boolean containsKey(final KEY_TYPE k) {
997 RETURN_FALSE_IF_KEY_NULL(k)
996998 return findKey(KEY_GENERIC_CAST k) != null;
997999 }
9981000
11361138
11371139
11381140 @Override
1141 SUPPRESS_WARNINGS_KEY_UNCHECKED
11391142 public ObjectSortedSet<MAP.Entry KEY_VALUE_GENERIC> ENTRYSET() {
11401143 if (entries == null) entries = new AbstractObjectSortedSet<MAP.Entry KEY_VALUE_GENERIC>() {
1141 final Comparator<? super MAP.Entry KEY_VALUE_GENERIC> comparator = (Comparator<MAP.Entry KEY_VALUE_GENERIC>) (x, y) -> RB_TREE_MAP.this.actualComparator.compare(x.ENTRY_GET_KEY(), y.ENTRY_GET_KEY());
1144 final Comparator<? super MAP.Entry KEY_VALUE_GENERIC> comparator = (RB_TREE_MAP.this.actualComparator == null ?
1145 (Comparator<MAP.Entry KEY_VALUE_GENERIC>) (x, y) -> KEY_CMP(x.ENTRY_GET_KEY(), y.ENTRY_GET_KEY()) :
1146 (Comparator<MAP.Entry KEY_VALUE_GENERIC>) (x, y) -> RB_TREE_MAP.this.actualComparator.compare(x.ENTRY_GET_KEY(), y.ENTRY_GET_KEY())
1147 );
1148
11421149
11431150 @Override
11441151 public Comparator<? super MAP.Entry KEY_VALUE_GENERIC> comparator() { return comparator; }
11521159 @Override
11531160 SUPPRESS_WARNINGS_KEY_UNCHECKED
11541161 public boolean contains(final Object o) {
1155 if (!(o instanceof Map.Entry)) return false;
1162 if (o == null || !(o instanceof Map.Entry)) return false;
11561163 final Map.Entry<?,?> e = (Map.Entry<?,?>)o;
1164 if (e.getKey() == null) return false;
11571165 #if KEYS_PRIMITIVE
1158 if (e.getKey() == null || ! (e.getKey() instanceof KEY_CLASS)) return false;
1166 if (! (e.getKey() instanceof KEY_CLASS)) return false;
11591167 #endif
11601168 #if VALUES_PRIMITIVE
11611169 if (e.getValue() == null || ! (e.getValue() instanceof VALUE_CLASS)) return false;
11691177 public boolean remove(final Object o) {
11701178 if (!(o instanceof Map.Entry)) return false;
11711179 final Map.Entry<?,?> e = (Map.Entry<?,?>)o;
1180 if (e.getKey() == null) return false;
11721181 #if KEYS_PRIMITIVE
1173 if (e.getKey() == null || ! (e.getKey() instanceof KEY_CLASS)) return false;
1182 if (! (e.getKey() instanceof KEY_CLASS)) return false;
11741183 #endif
11751184 #if VALUES_PRIMITIVE
11761185 if (e.getValue() == null || ! (e.getValue() instanceof VALUE_CLASS)) return false;
14681477
14691478 @Override
14701479 SUPPRESS_WARNINGS_KEY_UNCHECKED
1471 public boolean containsKey(final KEY_TYPE k) { return in(KEY_GENERIC_CAST k) && RB_TREE_MAP.this.containsKey(k); }
1480 public boolean containsKey(final KEY_TYPE k) {
1481 RETURN_FALSE_IF_KEY_NULL(k)
1482 return in(KEY_GENERIC_CAST k) && RB_TREE_MAP.this.containsKey(k);
1483 }
14721484
14731485 @Override
14741486 public boolean containsValue(final VALUE_TYPE v) {
00 /*
1 * Copyright (C) 2002-2021 Sebastiano Vigna
1 * Copyright (C) 2002-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
289289
290290 @Override
291291 public boolean add(final KEY_GENERIC_TYPE k) {
292 REQUIRE_KEY_NON_NULL(k)
292293 int maxDepth = 0;
293294
294295 if (tree == null) { // The case of the empty tree is treated separately.
00 /*
1 * Copyright (C) 2003-2021 Paolo Boldi and Sebastiano Vigna
1 * Copyright (C) 2003-2022 Paolo Boldi and Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2002-2021 Sebastiano Vigna
1 * Copyright (C) 2002-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2002-2021 Sebastiano Vigna
1 * Copyright (C) 2002-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2002-2021 Sebastiano Vigna
1 * Copyright (C) 2002-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2002-2021 Sebastiano Vigna
1 * Copyright (C) 2002-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
8686 @Override
8787 public KEY_COMPARATOR KEY_SUPER_GENERIC comparator() { return null; }
8888
89 @SuppressWarnings("unchecked")
9089 @Override
9190 public ObjectSortedSet<MAP.Entry KEY_VALUE_GENERIC> ENTRYSET() { return ObjectSortedSets.EMPTY_SET; }
9291
9897 /** {@inheritDoc} */
9998 #endif
10099 @Override
101 @SuppressWarnings("unchecked")
102100 public ObjectSortedSet<Map.Entry<KEY_GENERIC_CLASS, VALUE_GENERIC_CLASS>> entrySet() { return ObjectSortedSets.EMPTY_SET; }
103101
104102 SUPPRESS_WARNINGS_KEY_UNCHECKED
284282
285283 public static KEY_VALUE_GENERIC SORTED_MAP KEY_VALUE_GENERIC singleton(final KEY_GENERIC_CLASS key, VALUE_GENERIC_CLASS value) { return new Singleton KEY_VALUE_GENERIC_DIAMOND(KEY_CLASS2TYPE(key), VALUE_CLASS2TYPE(value));}
286284
287 /** RETURNS a type-specific immutable sorted map containing only the specified pair. The returned sorted map is serializable and cloneable.
285 /** Returns a type-specific immutable sorted map containing only the specified pair. The returned sorted map is serializable and cloneable.
288286 *
289287 * <p>Note that albeit the returned map is immutable, its default return value may be changed.
290288 *
00
11
22 /*
3 * Copyright (C) 2020-2021 Sebastiano Vigna
3 * Copyright (C) 2020-2022 Sebastiano Vigna
44 *
55 * Licensed under the Apache License, Version 2.0 (the "License");
66 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2002-2021 Sebastiano Vigna
1 * Copyright (C) 2002-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2002-2021 Sebastiano Vigna
1 * Copyright (C) 2002-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2002-2021 Sebastiano Vigna
1 * Copyright (C) 2002-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2002-2021 Sebastiano Vigna
1 * Copyright (C) 2002-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2002-2021 Sebastiano Vigna
1 * Copyright (C) 2002-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
4343
4444 /** Peeks at an element on the stack (optional operation).
4545 * @param i an index from the stop of the stack (0 represents the top).
46 * @return the <code>i</code>-th element on the stack.
46 * @return the {@code i}-th element on the stack.
4747 * @see Stack#peek(int)
4848 */
4949 KEY_TYPE PEEK(int i);
00 /*
1 * Copyright (C) 2002-2021 Sebastiano Vigna
1 * Copyright (C) 2002-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2005-2021 Sebastiano Vigna
1 * Copyright (C) 2005-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2004-2021 Sebastiano Vigna
1 * Copyright (C) 2004-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2020-2021 Sebastiano Vigna
1 * Copyright (C) 2020-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
3838
3939 file=${2##*/}
4040 name=${file%.*}
41
4142 class=${name#Abstract}
42 if [[ "$class" == "$name" ]]; then
43 abstract=
44 else
45 abstract=Abstract
46 fi
47 class=${class#Striped}
4843
4944 # Now we rip off the types.
5045 rem=${class##[A-Z]+([a-z])}
572567 "#define ARRAY_LIST ${TYPE_CAP[$k]}ArrayList\n"\
573568 "#define IMMUTABLE_LIST ${TYPE_CAP[$k]}ImmutableList\n"\
574569 "#define BIG_ARRAY_BIG_LIST ${TYPE_CAP[$k]}BigArrayBigList\n"\
570 "#define MAPPED_BIG_LIST ${TYPE_CAP[$k]}MappedBigList\n"\
575571 "#define ARRAY_FRONT_CODED_LIST ${TYPE_CAP[$k]}ArrayFrontCodedList\n"\
576572 "#define ARRAY_FRONT_CODED_BIG_LIST ${TYPE_CAP[$k]}ArrayFrontCodedBigList\n"\
577573 "#define HEAP_PRIORITY_QUEUE ${TYPE_CAP2[$k]}HeapPriorityQueue\n"\
583579 "#define ARRAY_PRIORITY_QUEUE ${TYPE_CAP2[$k]}ArrayPriorityQueue\n"\
584580 "#define ARRAY_INDIRECT_PRIORITY_QUEUE ${TYPE_CAP2[$k]}ArrayIndirectPriorityQueue\n"\
585581 "#define ARRAY_INDIRECT_DOUBLE_PRIORITY_QUEUE ${TYPE_CAP2[$k]}ArrayIndirectDoublePriorityQueue\n"\
582 "#define KEY_BUFFER ${TYPE_CAP[$k]}Buffer\n"\
586583 \
587584 \
588585 "/* Synchronized wrappers */\n"\
615612 \
616613 "#define KEY_READER_WRAPPER ${TYPE_CAP[$k]}ReaderWrapper\n"\
617614 "#define KEY_DATA_INPUT_WRAPPER ${TYPE_CAP[$k]}DataInputWrapper\n"\
615 "#define KEY_DATA_NIO_INPUT_WRAPPER ${TYPE_CAP[$k]}DataNioInputWrapper\n"\
618616 \
619617 \
620618 "/* Methods (keys) */\n"\
631629 "#define FIRST_KEY first${TYPE_STD[$k]}Key\n"\
632630 "#define LAST_KEY last${TYPE_STD[$k]}Key\n"\
633631 "#define GET_KEY get${TYPE_STD[$k]}\n"\
632 "#define AS_KEY_BUFFER as${TYPE_STD[$k]}Buffer\n"\
634633 "#define PAIR_LEFT left${TYPE_STD[$k]}\n"\
635634 "#define PAIR_FIRST first${TYPE_STD[$k]}\n"\
636635 "#define PAIR_KEY key${TYPE_STD[$k]}\n"\
664663 "#if KEYS_REFERENCE\n"\
665664 "#define MAP_TO_KEY map\n"\
666665 "#define MAP_TO_KEY_WIDENED map\n"\
666 "#define RETURN_FALSE_IF_KEY_NULL(k) if (k == null) return false;\n"\
667 "#define REQUIRE_KEY_NON_NULL(k) java.util.Objects.requireNonNull(k);\n"\
667668 "#else\n"\
668669 "#define MAP_TO_KEY mapTo${TYPE_CAP2[$k]}\n"\
669670 "#define MAP_TO_KEY_WIDENED mapTo${TYPE_CAP2[$wk]}\n"\
671 "#define REQUIRE_KEY_NON_NULL(k)\n"\
672 "#define RETURN_FALSE_IF_KEY_NULL(k)\n"\
670673 "#endif\n"\
671674 \
672675 \
686689 "#define PAIR_RIGHT right${TYPE_STD[$v]}\n"\
687690 "#define PAIR_SECOND second${TYPE_STD[$v]}\n"\
688691 "#define PAIR_VALUE value${TYPE_STD[$v]}\n"\
692 "#if VALUES_REFERENCE\n"\
693 "#define REQUIRE_VALUE_NON_NULL(v) java.util.Objects.requireNonNull(v);\n"\
694 "#else\n"\
695 "#define REQUIRE_VALUE_NON_NULL(v)\n"\
696 "#endif\n"\
689697 \
690698 \
691699 "/* Methods (keys/values) */\n"\
0 /*
1 * Copyright (C) 2017-2022 Sebastiano Vigna
2 *
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 * http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15
16 package it.unimi.dsi.fastutil.ints;
17
18 import java.lang.reflect.Method;
19 import java.util.Arrays;
20 import java.util.HashSet;
21 import java.util.List;
22 import java.util.Map;
23 import java.util.Map.Entry;
24 import java.util.function.Supplier;
25
26 import com.google.common.collect.testing.Helpers;
27 import com.google.common.collect.testing.MapTestSuiteBuilder;
28 import com.google.common.collect.testing.SampleElements;
29 import com.google.common.collect.testing.TestMapGenerator;
30 import com.google.common.collect.testing.features.CollectionFeature;
31 import com.google.common.collect.testing.features.CollectionSize;
32 import com.google.common.collect.testing.features.MapFeature;
33 import com.google.common.collect.testing.testers.CollectionToStringTester;
34 import com.google.common.collect.testing.testers.MapToStringTester;
35
36 import junit.framework.TestCase;
37 import junit.framework.TestSuite;
38
39 public class Int2IntOpenHashMapGuavaTest extends TestCase {
40
41 public static TestSuite suite() {
42 return suite("Int2IntOpenHashMap", Int2IntOpenHashMap::new);
43 }
44
45 public static TestSuite suite(final String name, final Supplier<Map<Integer, Integer>> factory) {
46 final HashSet<Method> toStringTests = new HashSet<>();
47 toStringTests.addAll(Arrays.asList(MapToStringTester.class.getDeclaredMethods()));
48 toStringTests.addAll(Arrays.asList(CollectionToStringTester.class.getDeclaredMethods()));
49
50 return MapTestSuiteBuilder.using(new TestMapGenerator<Integer, Integer>() {
51
52 @Override
53 public SampleElements<Entry<Integer, Integer>> samples() {
54 return new SampleElements<>(Helpers.mapEntry(Integer.valueOf(0), Integer.valueOf(1)),
55 Helpers.mapEntry(Integer.valueOf(-2), Integer.valueOf(4)),
56 Helpers.mapEntry(Integer.valueOf(100), Integer.valueOf(-1)),
57 Helpers.mapEntry(Integer.valueOf(2), Integer.valueOf(1000)),
58 Helpers.mapEntry(Integer.valueOf(1), Integer.valueOf(2)));
59 }
60
61 @Override
62 public Map<Integer, Integer> create(final Object... entries) {
63 Map<Integer, Integer> map = factory.get();
64 for (final Object o : entries) {
65 @SuppressWarnings("unchecked")
66 final Entry<Integer, Integer> e = (Entry<Integer, Integer>)o;
67 map.put(e.getKey(), e.getValue());
68 }
69 return map;
70 }
71
72 @Override
73 @SuppressWarnings("unchecked")
74 public final Map.Entry<Integer, Integer>[] createArray(final int length) {
75 return new Map.Entry[length];
76 }
77
78 @Override
79 public final Integer[] createKeyArray(final int length) {
80 return new Integer[length];
81 }
82
83 @Override
84 public final Integer[] createValueArray(final int length) {
85 return new Integer[length];
86 }
87
88 /** Returns the original element list, unchanged. */
89 @Override
90 public Iterable<Entry<Integer, Integer>> order(final List<Entry<Integer, Integer>> insertionOrder) {
91 return insertionOrder;
92 }
93 }).named(name).withFeatures(CollectionSize.ANY, MapFeature.GENERAL_PURPOSE, MapFeature.SUPPORTS_PUT, MapFeature.SUPPORTS_REMOVE, MapFeature.ALLOWS_ANY_NULL_QUERIES, CollectionFeature.SUPPORTS_ITERATOR_REMOVE).suppressing(toStringTests).createTestSuite();
94 }
95 }
0 /*
1 * Copyright (C) 2017-2022 Sebastiano Vigna
2 *
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 * http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15
16 package it.unimi.dsi.fastutil.ints;
17
18 import java.lang.reflect.Method;
19 import java.util.Arrays;
20 import java.util.HashSet;
21 import java.util.List;
22 import java.util.Set;
23 import java.util.function.Supplier;
24
25 import com.google.common.collect.testing.SampleElements;
26 import com.google.common.collect.testing.SetTestSuiteBuilder;
27 import com.google.common.collect.testing.TestSetGenerator;
28 import com.google.common.collect.testing.features.CollectionFeature;
29 import com.google.common.collect.testing.features.CollectionSize;
30 import com.google.common.collect.testing.features.SetFeature;
31 import com.google.common.collect.testing.testers.CollectionToStringTester;
32 import com.google.common.collect.testing.testers.MapToStringTester;
33
34 import junit.framework.TestCase;
35 import junit.framework.TestSuite;
36
37 public class IntSetGuavaTest extends TestCase {
38
39 public static TestSuite suite() {
40 return suite("IntOpenHashSet", IntOpenHashSet::new);
41 }
42
43 public static TestSuite suite(final String name, final Supplier<Set<Integer>> factory) {
44 final HashSet<Method> toStringTests = new HashSet<>();
45 toStringTests.addAll(Arrays.asList(MapToStringTester.class.getDeclaredMethods()));
46 toStringTests.addAll(Arrays.asList(CollectionToStringTester.class.getDeclaredMethods()));
47
48 return SetTestSuiteBuilder.using(new TestSetGenerator<Integer>() {
49 @Override
50 public Integer[] createArray(final int n) {
51 return new Integer[n];
52 }
53
54 @Override
55 public Iterable<Integer> order(final List<Integer> insertionOrder) {
56 return insertionOrder;
57 }
58
59 @Override
60 public Set<Integer> create(final Object... elements) {
61 final Set<Integer> set = factory.get();
62 for (final Object e : elements) {
63 set.add((Integer)e);
64 }
65 return set;
66 }
67
68 @Override
69 public SampleElements<Integer> samples() {
70 return new SampleElements<>(Integer.valueOf(0), Integer.valueOf(1), Integer.valueOf(2), Integer.valueOf(3), Integer.valueOf(4));
71 }
72 }).named(name).withFeatures(CollectionSize.ANY, SetFeature.GENERAL_PURPOSE, CollectionFeature.ALLOWS_NULL_QUERIES, CollectionFeature.RESTRICTS_ELEMENTS, CollectionFeature.SUPPORTS_ADD, CollectionFeature.SUPPORTS_REMOVE, CollectionFeature.SERIALIZABLE, CollectionFeature.REMOVE_OPERATIONS, CollectionFeature.SUPPORTS_ITERATOR_REMOVE).suppressing(toStringTests).createTestSuite();
73 }
74 }
0 /*
1 * Copyright (C) 2017-2022 Sebastiano Vigna
2 *
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 * http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15
16 package it.unimi.dsi.fastutil.objects;
17
18 import java.lang.reflect.Method;
19 import java.util.Arrays;
20 import java.util.HashSet;
21 import java.util.Map;
22 import java.util.function.Supplier;
23
24 import com.google.common.collect.testing.MapTestSuiteBuilder;
25 import com.google.common.collect.testing.TestStringMapGenerator;
26 import com.google.common.collect.testing.features.CollectionFeature;
27 import com.google.common.collect.testing.features.CollectionSize;
28 import com.google.common.collect.testing.features.MapFeature;
29 import com.google.common.collect.testing.testers.CollectionToStringTester;
30 import com.google.common.collect.testing.testers.MapComputeIfPresentTester;
31 import com.google.common.collect.testing.testers.MapMergeTester;
32 import com.google.common.collect.testing.testers.MapToStringTester;
33
34 import junit.framework.TestCase;
35 import junit.framework.TestSuite;
36
37 public class Object2ObjectOpenHashMapGuavaTest extends TestCase {
38
39 public static TestSuite suite() throws NoSuchMethodException, SecurityException {
40 return suite("Object2ObjectOpenHashMap", Object2ObjectOpenHashMap::new);
41 }
42
43 public static TestSuite suite(final String name, final Supplier<Map<String, String>> factory) throws NoSuchMethodException, SecurityException {
44 final HashSet<Method> suppressed = new HashSet<>();
45 suppressed.addAll(Arrays.asList(MapToStringTester.class.getDeclaredMethods()));
46 suppressed.addAll(Arrays.asList(CollectionToStringTester.class.getDeclaredMethods()));
47 // An @apiNote explains that our semantics is slightly different
48 suppressed.add(MapMergeTester.class.getDeclaredMethod("testMappedToNull"));
49 suppressed.add(MapComputeIfPresentTester.class.getDeclaredMethod("testComputeIfPresent_nullTreatedAsAbsent"));
50
51 return MapTestSuiteBuilder.using(new TestStringMapGenerator() {
52
53 @Override
54 protected Map<String, String> create(final Map.Entry<String, String>[] entries) {
55 final Map<String, String> map = factory.get();
56 for (final Map.Entry<String, String> entry : entries) {
57 map.put(entry.getKey(), entry.getValue());
58 }
59 return map;
60 }
61 }).named(name).withFeatures(CollectionSize.ANY, MapFeature.GENERAL_PURPOSE, MapFeature.SUPPORTS_PUT, MapFeature.SUPPORTS_REMOVE, MapFeature.ALLOWS_NULL_KEYS, MapFeature.ALLOWS_NULL_VALUES, MapFeature.ALLOWS_ANY_NULL_QUERIES, CollectionFeature.SUPPORTS_ITERATOR_REMOVE).suppressing(suppressed).createTestSuite();
62 }
63 }
0 /*
1 * Copyright (C) 2017-2022 Sebastiano Vigna
2 *
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 * http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15
16 package it.unimi.dsi.fastutil.objects;
17
18 import java.lang.reflect.Method;
19 import java.util.Arrays;
20 import java.util.HashSet;
21 import java.util.Map;
22 import java.util.SortedMap;
23 import java.util.function.Supplier;
24
25 import com.google.common.collect.testing.MapTestSuiteBuilder;
26 import com.google.common.collect.testing.TestStringSortedMapGenerator;
27 import com.google.common.collect.testing.features.CollectionFeature;
28 import com.google.common.collect.testing.features.CollectionSize;
29 import com.google.common.collect.testing.features.MapFeature;
30 import com.google.common.collect.testing.testers.CollectionToStringTester;
31 import com.google.common.collect.testing.testers.MapComputeIfPresentTester;
32 import com.google.common.collect.testing.testers.MapMergeTester;
33 import com.google.common.collect.testing.testers.MapToStringTester;
34
35 import junit.framework.TestCase;
36 import junit.framework.TestSuite;
37
38 public class Object2ObjectRBTreeMapGuavaTest extends TestCase {
39
40 public static TestSuite suite() throws NoSuchMethodException, SecurityException {
41 return suite("Object2ObjectRBTreeMap", Object2ObjectRBTreeMap::new);
42 }
43
44 public static TestSuite suite(final String name, final Supplier<Map<String, String>> factory) throws NoSuchMethodException, SecurityException {
45 final HashSet<Method> suppressed = new HashSet<>();
46 suppressed.addAll(Arrays.asList(MapToStringTester.class.getDeclaredMethods()));
47 suppressed.addAll(Arrays.asList(CollectionToStringTester.class.getDeclaredMethods()));
48 // An @apiNote explains that our semantics is slightly different
49 suppressed.add(MapMergeTester.class.getDeclaredMethod("testMappedToNull"));
50 suppressed.add(MapComputeIfPresentTester.class.getDeclaredMethod("testComputeIfPresent_nullTreatedAsAbsent"));
51
52 return MapTestSuiteBuilder.using(new TestStringSortedMapGenerator() {
53
54 @Override
55 protected SortedMap<String, String> create(final Map.Entry<String, String>[] entries) {
56 final Map<String, String> map = factory.get();
57 for (final Map.Entry<String, String> entry : entries) {
58 map.put(entry.getKey(), entry.getValue());
59 }
60 return (SortedMap<String, String>)map;
61 }
62 }).named(name).withFeatures(CollectionSize.ANY, CollectionFeature.KNOWN_ORDER, MapFeature.GENERAL_PURPOSE, MapFeature.SUPPORTS_PUT, MapFeature.SUPPORTS_REMOVE, MapFeature.ALLOWS_NULL_VALUES, CollectionFeature.SUPPORTS_ITERATOR_REMOVE).suppressing(suppressed).createTestSuite();
63 }
64 }
0 /*
1 * Copyright (C) 2017-2022 Sebastiano Vigna
2 *
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 * http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15
16 package it.unimi.dsi.fastutil.objects;
17
18 import java.lang.reflect.Method;
19 import java.util.Arrays;
20 import java.util.HashSet;
21 import java.util.Set;
22 import java.util.function.Supplier;
23
24 import com.google.common.collect.testing.SetTestSuiteBuilder;
25 import com.google.common.collect.testing.TestStringSetGenerator;
26 import com.google.common.collect.testing.features.CollectionFeature;
27 import com.google.common.collect.testing.features.CollectionSize;
28 import com.google.common.collect.testing.features.SetFeature;
29 import com.google.common.collect.testing.testers.CollectionToStringTester;
30 import com.google.common.collect.testing.testers.MapToStringTester;
31
32 import junit.framework.TestCase;
33 import junit.framework.TestSuite;
34
35 public class ObjectOpenHashSetGuavaTest extends TestCase {
36
37 public static TestSuite suite() {
38 return suite("ObjectOpenHashSet", ObjectOpenHashSet::new);
39 }
40
41 public static TestSuite suite(final String name, final Supplier<Set<String>> factory) {
42 final HashSet<Method> toStringTests = new HashSet<>();
43 toStringTests.addAll(Arrays.asList(MapToStringTester.class.getDeclaredMethods()));
44 toStringTests.addAll(Arrays.asList(CollectionToStringTester.class.getDeclaredMethods()));
45
46 return SetTestSuiteBuilder.using(new TestStringSetGenerator() {
47
48 @Override
49 protected Set<String> create(final String[] elements) {
50 final Set<String> set = factory.get();
51 for (final String e : elements) {
52 set.add(e);
53 }
54 return set;
55 }
56 }).named(name).withFeatures(CollectionSize.ANY, SetFeature.GENERAL_PURPOSE, CollectionFeature.ALLOWS_NULL_VALUES, CollectionFeature.ALLOWS_NULL_QUERIES, CollectionFeature.RESTRICTS_ELEMENTS, CollectionFeature.SUPPORTS_ADD, CollectionFeature.SUPPORTS_REMOVE, CollectionFeature.SERIALIZABLE, CollectionFeature.REMOVE_OPERATIONS, CollectionFeature.SUPPORTS_ITERATOR_REMOVE).suppressing(toStringTests).createTestSuite();
57 }
58 }
438438 $(BIG_ARRAY_BIG_LISTS): drv/BigArrayBigList.drv; ./gencsource.sh $< $@ >$@
439439
440440 CSOURCES += $(BIG_ARRAY_BIG_LISTS)
441
442 MAPPED_BIG_LISTS := $(foreach k,$(TYPE_NOBOOL_NOOBJ), $(GEN_SRCDIR)/$(PKG_PATH)/$(PACKAGE_$(k))/$(k)MappedBigList.c)
443 $(MAPPED_BIG_LISTS): drv/MappedBigList.drv; ./gencsource.sh $< $@ >$@
444
445 CSOURCES += $(MAPPED_BIG_LISTS)
441446
442447 IMMUTABLE_LISTS := $(foreach k,$(TYPE), $(GEN_SRCDIR)/$(PKG_PATH)/$(PACKAGE_$(k))/$(k)ImmutableList.c)
443448 $(IMMUTABLE_LISTS): drv/ImmutableList.drv; ./gencsource.sh $< $@ >$@
44 <packaging>jar</packaging>
55 <name>fastutil</name>
66 <version>@VERSION@</version>
7 <description>fastutil extends the Java Collections Framework by providing type-specific maps, sets, lists and priority queues with a small memory footprint and fast operations; it provides also big (64-bit) arrays, sets and lists, sorting algorithms, and fast, practical I/O classes for binary and text files. This jar (fastutil-core.jar) contains data structures based on integers, longs, doubles, and objects, only; fastutil.jar contains all classes. If you have both jars in your dependencies, this jar should be excluded.</description>
7 <description>fastutil extends the Java Collections Framework by providing type-specific maps, sets, lists, and queues with a small memory footprint and fast operations; it provides also big (64-bit) arrays, sets, and lists, sorting algorithms, fast, practical I/O classes for binary and text files, and facilities for memory mapping large files. This jar (fastutil-core.jar) contains data structures based on integers, longs, doubles, and objects, only; fastutil.jar contains all classes. If you have both jars in your dependencies, this jar should be excluded.</description>
88 <url>http://fastutil.di.unimi.it/</url>
99 <licenses>
1010 <license>
44 <packaging>jar</packaging>
55 <name>fastutil</name>
66 <version>@VERSION@</version>
7 <description>fastutil extends the Java Collections Framework by providing type-specific maps, sets, lists and priority queues with a small memory footprint and fast access and insertion; provides also big (64-bit) arrays, sets and lists, sorting algorithms, and fast, practical I/O classes for binary and text files. Note that if you have both this jar and fastutil-core.jar in your dependencies, fastutil-core.jar should be excluded.</description>
7 <description>fastutil extends the Java Collections Framework by providing type-specific maps, sets, lists, and queues with a small memory footprint and fast access and insertion; it provides also big (64-bit) arrays, sets and lists, sorting algorithms, fast, practical I/O classes for binary and text files, and facilities for memory mapping large files. Note that if you have both this jar and fastutil-core.jar in your dependencies, fastutil-core.jar should be excluded.</description>
88 <url>http://fastutil.di.unimi.it/</url>
99 <licenses>
1010 <license>
00 /*
1 * Copyright (C) 2003-2020 Paolo Boldi and Sebastiano Vigna
1 * Copyright (C) 2003-2022 Paolo Boldi and Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
1717
1818 /** An abstract class providing basic methods for implementing the {@link IndirectPriorityQueue} interface.
1919 *
20 * @deprecated As of fastutil 8 this class is no longer necessary, as its previous abstract
20 * @deprecated As of {@code fastutil} 8 this class is no longer necessary, as its previous abstract
2121 * methods are now default methods of {@link IndirectPriorityQueue}.
2222 */
2323 @Deprecated
00 /*
1 * Copyright (C) 2003-2021 Paolo Boldi and Sebastiano Vigna
1 * Copyright (C) 2003-2022 Paolo Boldi and Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
1717
1818 /** An abstract class providing basic methods for implementing the {@link PriorityQueue} interface.
1919 *
20 * @deprecated As of fastutil 8 this class is no longer necessary, as its previous abstract
20 * @deprecated As of {@code fastutil} 8 this class is no longer necessary, as its previous abstract
2121 * methods are now default methods of {@link PriorityQueue}.
2222 */
2323 @Deprecated
00 /*
1 * Copyright (C) 2002-2021 Sebastiano Vigna
1 * Copyright (C) 2002-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
1717
1818 /** An abstract class providing basic methods for implementing the {@link Stack} interface.
1919 *
20 * @deprecated As of fastutil 8 this class is no longer necessary, as its previous abstract
20 * @deprecated As of {@code fastutil} 8 this class is no longer necessary, as its previous abstract
2121 * methods are now default methods of {@link Stack}.
2222 */
2323 @Deprecated
00 /*
1 * Copyright (C) 2002-2021 Sebastiano Vigna
1 * Copyright (C) 2002-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2002-2021 Sebastiano Vigna
1 * Copyright (C) 2002-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2010-2021 Sebastiano Vigna
1 * Copyright (C) 2010-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2010-2021 Sebastiano Vigna
1 * Copyright (C) 2010-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2010-2021 Sebastiano Vigna
1 * Copyright (C) 2010-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2002-2021 Sebastiano Vigna
1 * Copyright (C) 2002-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2002-2021 Sebastiano Vigna
1 * Copyright (C) 2002-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2002-2021 Sebastiano Vigna
1 * Copyright (C) 2002-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2003-2021 Paolo Boldi and Sebastiano Vigna
1 * Copyright (C) 2003-2022 Paolo Boldi and Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2003-2021 Sebastiano Vigna
1 * Copyright (C) 2003-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2020-2021 Sebastiano Vigna
1 * Copyright (C) 2020-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2003-2021 Paolo Boldi and Sebastiano Vigna
1 * Copyright (C) 2003-2022 Paolo Boldi and Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2003-2021 Sebastiano Vigna
1 * Copyright (C) 2003-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2017-2021 Sebastiano Vigna
1 * Copyright (C) 2017-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2010-2021 Sebastiano Vigna
1 * Copyright (C) 2010-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2020-2021 Sebastiano Vigna
1 * Copyright (C) 2020-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2002-2021 Sebastiano Vigna
1 * Copyright (C) 2002-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2010-2021 Sebastiano Vigna
1 * Copyright (C) 2010-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
11 * Type-specific classes for boolean elements or keys.
22 *
33 * <p>
4 * Not all classes are provided in a boolean-specific version: sorted sets and
5 * maps not generated, as they are useless. Unsorted sets and maps are kept
6 * around for orthogonality, whereas
7 * {@link it.unimi.dsi.fastutil.booleans.BooleanCollection} is used by maps with
8 * boolean values.
4 * Not all classes are provided in a boolean-specific version: sorted sets and maps not generated,
5 * as they are useless. Unsorted sets and maps are kept around for orthogonality, whereas
6 * {@link it.unimi.dsi.fastutil.booleans.BooleanCollection} is used by maps with boolean values.
97 */
108 package it.unimi.dsi.fastutil.booleans;
00 /*
1 * Copyright (C) 2005-2020 Sebastiano Vigna
1 * Copyright (C) 2005-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2005-2020 Sebastiano Vigna
1 * Copyright (C) 2005-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2005-2020 Sebastiano Vigna
1 * Copyright (C) 2005-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2005-2020 Sebastiano Vigna
1 * Copyright (C) 2005-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2005-2020 Sebastiano Vigna
1 * Copyright (C) 2005-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2005-2020 Sebastiano Vigna
1 * Copyright (C) 2005-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2005-2020 Sebastiano Vigna
1 * Copyright (C) 2005-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2005-2020 Sebastiano Vigna
1 * Copyright (C) 2005-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2005-2020 Sebastiano Vigna
1 * Copyright (C) 2005-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2005-2020 Sebastiano Vigna
1 * Copyright (C) 2005-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
11 * Type-specific classes for object elements or keys.
22 *
33 * <p>
4 * Whenever possible and useful, {@code fastutil} provides both typical
5 * collections, which compare objects using {@code equals()}, and
6 * {@linkplain it.unimi.dsi.fastutil.objects.ReferenceSet
7 * <em>reference-based</em> collections}, which use identity ({@code ==}). See
8 * the related comments in the overview.
4 * Whenever possible and useful, {@code fastutil} provides both typical collections, which compare
5 * objects using {@code equals()}, and {@linkplain it.unimi.dsi.fastutil.objects.ReferenceSet
6 * <em>reference-based</em> collections}, which use identity ({@code ==}). See the related comments
7 * in the overview.
98 */
109 package it.unimi.dsi.fastutil.objects;
5757 <p>To understand what's going on at a glance, the best thing is to look at
5858 the examples provided below. If you already used the
5959 Collections Framework, everything should look
60 rather natural. If, in particular, you use an IDE such as <A
61 HREF="http://www.eclipse.org/">Eclipse</A>, which can suggest you the
60 rather natural. If, in particular, you use an IDE that can suggest you the
6261 method names, all you need to know is the right name for
6362 the class you need.
6463
8887 The {@link it.unimi.dsi.fastutil.io.BinIO} and {@link it.unimi.dsi.fastutil.io.TextIO} static
8988 containers contain dozens of methods that make it possible to load and save quickly
9089 (big) arrays to disks, to adapt binary and text file to iterators, and so on.
90 Classes such as {@link it.unimi.dsi.fastutil.ints.MappedIntBigList} make it possible
91 to map into memory large file of primitive types and access them as {@linkplain it.unimi.dsi.fastutil.BigList big lists}.
9192
9293 <h1>More on type-specific classes</h1>
9394
9495 <p>All data structures in <code>fastutil</code> extend their standard
9596 counterpart interface whenever possible (e.g., {@link java.util.Map} for maps). Thus, they
96 can be just plugged into existing code, using the standard access methods
97 (of course, any attempt to use the wrong type for keys or values will
98 produce a {@link java.lang.ClassCastException}). However, they also provide
97 can be just plugged into existing code, using the standard access methods. However, they also provide
9998 (whenever possible) many polymorphic versions of the most used methods that
10099 avoid boxing/unboxing. In doing so, they specify more stringent interfaces that
101100 extend and strengthen the standard ones (e.g., {@link
108107 We suggest that your programming environment is set so to mark boxing/unboxing as
109108 a warning, or even better, as an error.
110109
111 <p>Of course, the main point of type-specific data structures is that the
110 <p>The main point of type-specific data structures is that the
112111 absence of wrappers around primitive types can increase speed and reduce
113112 space occupancy by several times. The presence of generics in Java
114113 does not change this fact, since there is no genericity for primitive
153152 java.lang.Object} or <code>Reference</code>. In the latter case, we
154153 are treating objects, but their equality is established by reference
155154 equality (that is, without invoking <code>equals()</code>), similarly
156 to {@link java.util.IdentityHashMap}. Of course, reference-based
155 to {@link java.util.IdentityHashMap}. Note that reference-based
157156 classes are significantly faster.</p>
158157
159158 <p>Thus, an {@link it.unimi.dsi.fastutil.ints.IntOpenHashSet} stores
225224 <tr><td>Function<td>AbstractFunction<td>
226225 <tr><td>Map<td>AbstractMap<td>OpenHashMap, OpenCustomHashMap, ArrayMap
227226 <tr><td>SortedMap<td>AbstractSortedMap<td>RBTreeMap, AVLTreeMap, LinkedOpenHashMap
228 <tr><td>List, BigList&dagger;<td>AbstractList, AbstractBigList<td>ArrayList, BigArrayBigList, ArrayFrontCodedList, ImmutableList
227 <tr><td>List, BigList&dagger;<td>AbstractList, AbstractBigList<td>ArrayList, BigArrayBigList, MappedBigList, ArrayFrontCodedList, ImmutableList
229228 <tr><td>PriorityQueue&dagger;<td><td>HeapPriorityQueue, ArrayPriorityQueue, ArrayFIFOQueue
230229 <tr><td>IndirectPriorityQueue&dagger;<td><td>HeapSemiIndirectPriorityQueue, HeapIndirectPriorityQueue, ArrayIndirectPriorityQueue
231230 <tr><td>Stack&dagger;<td><td>ArrayList
246245 <p>&Dagger;: this class has <em>only</em> a non-type-specific implementation in {@link it.unimi.dsi.fastutil}.
247246
248247 <p>Note that abstract implementations are named by prefixing the interface
249 name with <samp>Abstract</samp>. Thus, if you want to define a
248 name with {@code Abstract}. Thus, if you want to define a
250249 type-specific structure holding a set of integers without the hassle of
251250 defining object-based methods, you should inherit from {@link it.unimi.dsi.fastutil.ints.AbstractIntSet}.
252251
00 /*
1 * Copyright (C) 2017-2021 Sebastiano Vigna
1 * Copyright (C) 2017-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2017-2021 Sebastiano Vigna
1 * Copyright (C) 2017-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2017-2021 Sebastiano Vigna
1 * Copyright (C) 2017-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
99
1010 public class IntIntPairTest {
1111
12 @SuppressWarnings("boxing")
1312 @Test
1413 public void test() {
1514 final Comparator<IntIntPair> comparator = IntIntPair.lexComparator();
00 /*
1 * Copyright (C) 2017-2021 Sebastiano Vigna
1 * Copyright (C) 2017-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2017-2021 Sebastiano Vigna
1 * Copyright (C) 2017-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2017-2021 Sebastiano Vigna
1 * Copyright (C) 2017-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2017-2021 Sebastiano Vigna
1 * Copyright (C) 2017-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2017-2021 Sebastiano Vigna
1 * Copyright (C) 2017-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2017-2021 Sebastiano Vigna
1 * Copyright (C) 2017-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2017-2021 Sebastiano Vigna
1 * Copyright (C) 2017-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2017-2021 Sebastiano Vigna
1 * Copyright (C) 2017-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2017-2021 Sebastiano Vigna
1 * Copyright (C) 2017-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2017-2021 Sebastiano Vigna
1 * Copyright (C) 2017-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2017-2021 Sebastiano Vigna
1 * Copyright (C) 2017-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2017-2021 Sebastiano Vigna
1 * Copyright (C) 2017-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
8989 return new ObjectIterator<Entry>() {
9090 final IntIterator keyIter = keys.iterator();
9191 final IntIterator valueIter = values.iterator();
92
92
9393 @Override
9494 public boolean hasNext() {
9595 return keyIter.hasNext();
00 /*
1 * Copyright (C) 2017-2021 Sebastiano Vigna
1 * Copyright (C) 2017-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2017-2021 Sebastiano Vigna
1 * Copyright (C) 2017-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2017-2021 Sebastiano Vigna
1 * Copyright (C) 2017-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2017-2021 Sebastiano Vigna
1 * Copyright (C) 2017-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2017-2021 Sebastiano Vigna
1 * Copyright (C) 2017-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
3232 @Parameter(2)
3333 public float loadFactor;
3434
35 @SuppressWarnings({ "AutoBoxing", "boxing" })
35 @SuppressWarnings({ "boxing" })
3636 @Parameters(name = "{index}: lf {2}")
3737 public static Iterable<Object[]> data() {
3838 final EnumSet<Capability> capabilities = EnumSet.allOf(Capability.class);
00 /*
1 * Copyright (C) 2017-2021 Sebastiano Vigna
1 * Copyright (C) 2017-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2017-2021 Sebastiano Vigna
1 * Copyright (C) 2017-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
556556 assertTrue(m.int2IntEntrySet().isEmpty());
557557 }
558558
559 @SuppressWarnings({ "SuspiciousMethodCalls", "unlikely-arg-type" })
559 @SuppressWarnings({ "unlikely-arg-type" })
560560 @Test
561561 public void testEntrySetContains() {
562562 m.put(0, 0);
617617 }
618618 final Set<Entry> s = new HashSet<>();
619619 final Set<Entry> sIdentity = Collections.newSetFromMap(new IdentityHashMap<Entry, Boolean>());
620
620
621621 Int2IntMaps.fastIterator(m).forEachRemaining(x -> {
622622 s.add(new AbstractInt2IntMap.BasicEntry(x.getIntKey(), x.getIntValue()));
623623 sIdentity.add(x);
660660 for (int i = 0; i < 100; i++) {
661661 m.put(i, i);
662662 }
663 Iterator<Entry> i = m.int2IntEntrySet().iterator();
663 final Iterator<Entry> i = m.int2IntEntrySet().iterator();
664664 int key;
665665 int value;
666666 // This will be an invalid entry after the removal, so we can't trust it long term.
667667 // Enforce this with scoping; get the contents and then not use it again.
668668 {
669 Entry toRemoveEntry = i.next();
669 final Entry toRemoveEntry = i.next();
670670 key = toRemoveEntry.getIntKey();
671671 value = toRemoveEntry.getIntValue();
672672 }
677677 assertFalse(m.containsKey(key));
678678 assertFalse(m.containsValue(value));
679679 assertEquals(m.get(key), -1);
680 assertEquals(99, m.size());
680 assertEquals(99, m.size());
681681 }
682682
683683 @Test(expected = IllegalStateException.class)
697697 iterator.remove();
698698 }
699699
700 @SuppressWarnings({ "SuspiciousMethodCalls", "unlikely-arg-type" })
700 @SuppressWarnings({ "unlikely-arg-type" })
701701 @Test
702702 public void testEntrySetRemove() {
703703 m.put(0, 0);
797797 assertEquals(1, m.getOrDefault(1, 2));
798798 }
799799
800
800
801801 @Test
802802 public void testKeySetIteration() {
803803 for (int i = 0; i < 100; i++) {
820820 assertEquals(m.keySet(), s);
821821 }
822822
823 @SuppressWarnings("deprecation")
824823 @Test
825824 public void testKeySetForEachObject() {
826825 for (int i = 0; i < 100; i++) {
847846 assertEquals(m.keySet(), s);
848847 }
849848
850 @SuppressWarnings("deprecation")
851849 @Test
852850 public void testKeySetIteratorForEachObject() {
853851 for (int i = 0; i < 100; i++) {
872870 for (int i = 0; i < 100; i++) {
873871 m.put(i, i);
874872 }
875 IntIterator i = m.keySet().iterator();
876 int toRemoveKey = i.nextInt();
877
873 final IntIterator i = m.keySet().iterator();
874 final int toRemoveKey = i.nextInt();
875
878876 // Taking advantage of the fact we mapped keys to values
879877 assertTrue(m.containsKey(toRemoveKey));
880878 assertEquals(m.get(toRemoveKey), toRemoveKey);
14391437 assertEquals(0, m.size());
14401438 assertTrue(m.isEmpty());
14411439 }
1442
1440
14431441 // No testValuesIteration; it would basically turn into a test whether
14441442 // new IntOpenHashSet(m.values()).equals(new IntOpenHashSet(m.values()))
14451443 // which is not very instructive.
15201518 for (int i = 0; i < 100; i++) {
15211519 m.put(i, i);
15221520 }
1523 IntIterator i = m.values().iterator();
1524 int toRemoveValue = i.nextInt();
1525
1521 final IntIterator i = m.values().iterator();
1522 final int toRemoveValue = i.nextInt();
1523
15261524 // Taking advantage of the fact we mapped keys to values
15271525 assertTrue(m.containsKey(toRemoveValue));
15281526 assertTrue(m.containsValue(toRemoveValue));
00 /*
1 * Copyright (C) 2017-2021 Sebastiano Vigna
1 * Copyright (C) 2017-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2017-2021 Sebastiano Vigna
1 * Copyright (C) 2017-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2017-2021 Sebastiano Vigna
1 * Copyright (C) 2017-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
1919
2020 import org.junit.Test;
2121
22 @SuppressWarnings("rawtypes")
2322 public class Int2ObjectFunctionTest {
2423
2524 @SuppressWarnings("deprecation")
00 /*
1 * Copyright (C) 2017-2021 Sebastiano Vigna
1 * Copyright (C) 2017-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2017-2021 Sebastiano Vigna
1 * Copyright (C) 2017-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2017-2021 Sebastiano Vigna
1 * Copyright (C) 2017-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2017-2021 Sebastiano Vigna
1 * Copyright (C) 2017-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
1515
1616 package it.unimi.dsi.fastutil.ints;
1717
18 import it.unimi.dsi.fastutil.Hash;
1918 import java.util.ArrayList;
2019 import java.util.Collection;
2120 import java.util.EnumSet;
2221 import java.util.function.Supplier;
22
2323 import org.junit.runners.Parameterized.Parameter;
2424 import org.junit.runners.Parameterized.Parameters;
25
26 import it.unimi.dsi.fastutil.Hash;
2527
2628 public class Int2ObjectMapGenericOpenHashTest extends Int2ObjectMapGenericTest<Int2ObjectOpenHashMap<Integer>> {
2729 @Parameter(2)
2830 public float loadFactor;
2931
30 @SuppressWarnings({"AutoBoxing", "boxing"})
32 @SuppressWarnings({ "boxing" })
3133 @Parameters(name = "{index}: lf {2}")
3234 public static Iterable<Object[]> data() {
3335 final EnumSet<Capability> capabilities = EnumSet.allOf(Capability.class);
00 /*
1 * Copyright (C) 2017-2021 Sebastiano Vigna
1 * Copyright (C) 2017-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2017-2021 Sebastiano Vigna
1 * Copyright (C) 2017-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
514514 assertTrue(m.int2ObjectEntrySet().isEmpty());
515515 }
516516
517 @SuppressWarnings({ "SuspiciousMethodCalls", "unlikely-arg-type" })
517 @SuppressWarnings({ "unlikely-arg-type" })
518518 @Test
519519 public void testEntrySetContains() {
520520 m.put(0, ZERO);
581581 }
582582 final Set<Entry<Integer>> s = new HashSet<>();
583583 final Set<Entry<Integer>> sIdentity = Collections.newSetFromMap(new IdentityHashMap<Entry<Integer>, Boolean>());
584
584
585585 Int2ObjectMaps.fastIterator(m).forEachRemaining(x -> {
586586 s.add(new AbstractInt2ObjectMap.BasicEntry<>(x.getIntKey(), x.getValue()));
587587 sIdentity.add(x);
622622 for (int i = 0; i < 100; i++) {
623623 m.put(i, Integer.valueOf(i));
624624 }
625 Iterator<Entry<Integer>> i = m.int2ObjectEntrySet().iterator();
625 final Iterator<Entry<Integer>> i = m.int2ObjectEntrySet().iterator();
626626 int key;
627627 Integer value;
628628 // This will be an invalid entry after the removal, so we can't trust it long term.
629629 // Enforce this with scoping; get the contents and then not use it again.
630630 {
631 Entry<Integer> toRemoveEntry = i.next();
631 final Entry<Integer> toRemoveEntry = i.next();
632632 key = toRemoveEntry.getIntKey();
633633 value = toRemoveEntry.getValue();
634634 }
652652 iterator.remove();
653653 }
654654
655 @SuppressWarnings({ "SuspiciousMethodCalls", "unlikely-arg-type" })
655 @SuppressWarnings({ "unlikely-arg-type" })
656656 @Test
657657 public void testEntrySetRemove() {
658658 m.put(0, ZERO);
670670 assertTrue(m.equals(new Object2ObjectOpenHashMap<>(new Integer[] {ONE}, new Integer[] {ONE})));
671671 }
672672
673 @SuppressWarnings("unchecked")
674673 @Test(expected = IllegalStateException.class)
675674 public void testFastEntrySetEmptyIteratorRemove() {
676675 final ObjectSet<Entry<Integer>> entries = m.int2ObjectEntrySet();
680679 iterator.remove();
681680 }
682681
683 @SuppressWarnings("unchecked")
684682 @Test(expected = IllegalStateException.class)
685683 public void testFastEntrySetIteratorTwoRemoves() {
686684 m.put(0, ZERO);
763761 // Test symmetry of equals
764762 assertEquals(s, m.keySet());
765763 }
766
764
767765 @Test
768766 public void testKeySetForEach() {
769767 for (int i = 0; i < 100; i++) {
831829 for (int i = 0; i < 100; i++) {
832830 m.put(i, Integer.valueOf(i));
833831 }
834 IntIterator i = m.keySet().iterator();
835 int toRemoveKey = i.nextInt();
832 final IntIterator i = m.keySet().iterator();
833 final int toRemoveKey = i.nextInt();
836834 assertTrue(m.containsKey(toRemoveKey));
837835 // Taking advantage of the fact we mapped keys to their Integer values
838836 assertEquals(m.get(toRemoveKey), Integer.valueOf(toRemoveKey));
13861384 // values() is a Collection without an equals, so need to convert to Set first.
13871385 assertEquals(new IntOpenHashSet(m.values()), s);
13881386 }
1389
1387
13901388 @Test
13911389 public void testValuesIteratorRemove() {
13921390 assumeTrue(capabilities.contains(Capability.ITERATOR_MODIFY));
13931391 for (int i = 0; i < 100; i++) {
13941392 m.put(i, Integer.valueOf(i));
13951393 }
1396 Iterator<Integer> i = m.values().iterator();
1397 Integer toRemoveValue = i.next();
1394 final Iterator<Integer> i = m.values().iterator();
1395 final Integer toRemoveValue = i.next();
13981396 // Taking advantage of the fact we mapped keys to their Integer values
13991397 assertTrue(m.containsKey(toRemoveValue.intValue()));
14001398 assertTrue(m.containsValue(toRemoveValue));
00 /*
1 * Copyright (C) 2017-2021 Sebastiano Vigna
1 * Copyright (C) 2017-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
9898 assertNull(m.get(ONE));
9999 }
100100
101 @SuppressWarnings("deprecation")
102101 @Test
103102 public void testDefaultReplaceTernary() {
104103 final Int2ObjectMap<Object> m = new SimpleInt2ObjectMap(new Int2ObjectArrayMap<>());
00 /*
1 * Copyright (C) 2017-2021 Sebastiano Vigna
1 * Copyright (C) 2017-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2017-2021 Sebastiano Vigna
1 * Copyright (C) 2017-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2017-2021 Sebastiano Vigna
1 * Copyright (C) 2017-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2017-2021 Sebastiano Vigna
1 * Copyright (C) 2017-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
2626
2727 @Test
2828 public void testFront() {
29 int refArray[] = { 4, 3, 2, 1, 0, 3, 2, 1, 0, 2, 1, 0, 1, 0, 0 };
30 int tops[] = new int[refArray.length];
29 final int refArray[] = { 4, 3, 2, 1, 0, 3, 2, 1, 0, 2, 1, 0, 1, 0, 0 };
30 final int tops[] = new int[refArray.length];
3131 final IntArrayIndirectPriorityQueue queue = new IntArrayIndirectPriorityQueue(refArray);
3232 for (int i = refArray.length; i-- != 0;)
3333 queue.enqueue(i);
6868
6969 private int[] ref;
7070
71 private boolean heapEqual(int[] a, int[] b, int sizea, int sizeb) {
71 private boolean heapEqual(final int[] a, final int[] b, int sizea, final int sizeb) {
7272 if (sizea != sizeb) return false;
73 int[] aa = new int[sizea];
74 int[] bb = new int[sizea];
73 final int[] aa = new int[sizea];
74 final int[] bb = new int[sizea];
7575 for (int i = 0; i < sizea; i++) {
7676 aa[i] = ref[a[i]];
7777 bb[i] = ref[b[i]];
8383 return true;
8484 }
8585
86 public void test(int n, IntComparator comparator) {
86 public void test(final int n, final IntComparator comparator) {
8787 Exception mThrowsIllegal, tThrowsIllegal, mThrowsOutOfBounds, tThrowsOutOfBounds, mThrowsNoElement, tThrowsNoElement;
8888 int rm = 0, rt = 0;
89 Random r = new Random(0);
89 final Random r = new Random(0);
9090 ref = new int[n];
9191
9292 for (int i = 0; i < n; i++) ref[i] = r.nextInt();
9393
9494 IntArrayIndirectPriorityQueue m = new IntArrayIndirectPriorityQueue(ref, comparator);
95 IntHeapIndirectPriorityQueue t = new IntHeapIndirectPriorityQueue(ref, comparator);
95 final IntHeapIndirectPriorityQueue t = new IntHeapIndirectPriorityQueue(ref, comparator);
9696
9797 /* We add pairs to t. */
9898 for (int i = 0; i < n / 2; i++) {
114114 }
115115 }
116116
117 int T = r.nextInt(2 * n);
117 final int T = r.nextInt(2 * n);
118118
119119 mThrowsNoElement = tThrowsNoElement = mThrowsOutOfBounds = tThrowsOutOfBounds = mThrowsIllegal = tThrowsIllegal = null;
120120
121121 try {
122122 t.enqueue(T);
123123 }
124 catch (IndexOutOfBoundsException e) {
124 catch (final IndexOutOfBoundsException e) {
125125 tThrowsOutOfBounds = e;
126126 }
127 catch (IllegalArgumentException e) {
127 catch (final IllegalArgumentException e) {
128128 tThrowsIllegal = e;
129129 }
130130
132132 try {
133133 m.enqueue(T);
134134 }
135 catch (IndexOutOfBoundsException e) {
135 catch (final IndexOutOfBoundsException e) {
136136 mThrowsOutOfBounds = e;
137137 }
138 catch (IllegalArgumentException e) {
138 catch (final IllegalArgumentException e) {
139139 mThrowsIllegal = e;
140140 }
141141 }
154154 ((ref[m.first()]) == (ref[t.first()])));
155155 }
156156
157 mThrowsNoElement = tThrowsNoElement = mThrowsOutOfBounds = tThrowsOutOfBounds = mThrowsIllegal = tThrowsIllegal = null;
157 mThrowsOutOfBounds = tThrowsOutOfBounds = null;
158158
159159 try {
160160 rm = m.dequeue();
161161 while (!m.isEmpty() && ((ref[m.first()]) == (ref[rm]))) m.dequeue();
162162 }
163 catch (IndexOutOfBoundsException e) {
163 catch (final IndexOutOfBoundsException e) {
164164 mThrowsOutOfBounds = e;
165165 }
166 catch (IllegalArgumentException e) {
166 catch (final IllegalArgumentException e) {
167167 mThrowsIllegal = e;
168168 }
169 catch (java.util.NoSuchElementException e) {
169 catch (final java.util.NoSuchElementException e) {
170170 mThrowsNoElement = e;
171171 }
172172
175175 while (!t.isEmpty() && ((ref[t.first()]) == (ref[rt])))
176176 t.dequeue();
177177 }
178 catch (IndexOutOfBoundsException e) {
178 catch (final IndexOutOfBoundsException e) {
179179 tThrowsOutOfBounds = e;
180180 }
181 catch (IllegalArgumentException e) {
181 catch (final IllegalArgumentException e) {
182182 tThrowsIllegal = e;
183183 }
184 catch (java.util.NoSuchElementException e) {
184 catch (final java.util.NoSuchElementException e) {
185185 tThrowsNoElement = e;
186186 }
187187
209209 try {
210210 m.remove(pos);
211211 }
212 catch (IndexOutOfBoundsException e) {
212 catch (final IndexOutOfBoundsException e) {
213213 mThrowsOutOfBounds = e;
214214 }
215 catch (IllegalArgumentException e) {
215 catch (final IllegalArgumentException e) {
216216 mThrowsIllegal = e;
217217 }
218 catch (java.util.NoSuchElementException e) {
218 catch (final java.util.NoSuchElementException e) {
219219 mThrowsNoElement = e;
220220 }
221221
222222 try {
223223 t.remove(pos);
224224 }
225 catch (IndexOutOfBoundsException e) {
225 catch (final IndexOutOfBoundsException e) {
226226 tThrowsOutOfBounds = e;
227227 }
228 catch (IllegalArgumentException e) {
228 catch (final IllegalArgumentException e) {
229229 tThrowsIllegal = e;
230230 }
231 catch (java.util.NoSuchElementException e) {
231 catch (final java.util.NoSuchElementException e) {
232232 tThrowsNoElement = e;
233233 }
234234
253253 try {
254254 t.changed(pos);
255255 }
256 catch (IndexOutOfBoundsException e) {
256 catch (final IndexOutOfBoundsException e) {
257257 tThrowsOutOfBounds = e;
258258 }
259 catch (IllegalArgumentException e) {
259 catch (final IllegalArgumentException e) {
260260 tThrowsIllegal = e;
261261 }
262 catch (java.util.NoSuchElementException e) {
262 catch (final java.util.NoSuchElementException e) {
263263 tThrowsNoElement = e;
264264 }
265265
267267 try {
268268 m.changed(pos);
269269 }
270 catch (IndexOutOfBoundsException e) {
270 catch (final IndexOutOfBoundsException e) {
271271 mThrowsOutOfBounds = e;
272272 }
273 catch (IllegalArgumentException e) {
273 catch (final IllegalArgumentException e) {
274274 mThrowsIllegal = e;
275275 }
276 catch (java.util.NoSuchElementException e) {
276 catch (final java.util.NoSuchElementException e) {
277277 mThrowsNoElement = e;
278278 }
279279 }
293293 ((ref[m.first()]) == (ref[t.first()])));
294294 }
295295
296 int[] temp = t.heap.clone();
296 final int[] temp = t.heap.clone();
297297 IntArrays.quickSort(temp, 0, t.size()); // To scramble a bit
298298 m = new IntArrayIndirectPriorityQueue(m.refArray, temp, t.size(), comparator);
299299
306306
307307 if (m.size() != 0 && ((new it.unimi.dsi.fastutil.ints.IntOpenHashSet(m.array, 0, m.size)).size() == m.size())) {
308308
309 int first = m.first();
309 final int first = m.first();
310310 ref[first] = r.nextInt();
311311
312312 // System.err.println("Pre-change m: " +m);
00 /*
1 * Copyright (C) 2017-2021 Sebastiano Vigna
1 * Copyright (C) 2017-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2017-2021 Sebastiano Vigna
1 * Copyright (C) 2017-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2017-2021 Sebastiano Vigna
1 * Copyright (C) 2017-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2017-2021 Sebastiano Vigna
1 * Copyright (C) 2017-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
3737
3838 @Test
3939 public void testMergeSort() {
40 int[] a = { 2, 1, 5, 2, 1, 0, 9, 1, 4, 2, 4, 6, 8, 9, 10, 12, 1, 7 }, b = a.clone(), sorted = a.clone();
40 final int[] a = { 2, 1, 5, 2, 1, 0, 9, 1, 4, 2, 4, 6, 8, 9, 10, 12, 1, 7 }, b = a.clone(), sorted = a.clone();
4141 Arrays.sort(sorted);
4242 IntArrays.mergeSort(b);
4343 assertArrayEquals(sorted, b);
5555
5656 @Test
5757 public void testMergeSortSmallSupport() {
58 int[] a = { 2, 1, 5, 2, 1, 0, 9, 1, 4, 2, 4, 6, 8, 9, 10, 12, 1, 7 };
58 final int[] a = { 2, 1, 5, 2, 1, 0, 9, 1, 4, 2, 4, 6, 8, 9, 10, 12, 1, 7 };
5959 for(int to = 1; to < a.length; to++)
6060 for(int from = 0; from <= to; from++) {
6161 final int[] support = new int[to];
6767
6868 @Test
6969 public void testStableSort() {
70 int[] a = { 2, 1, 5, 2, 1, 0, 9, 1, 4, 2, 4, 6, 8, 9, 10, 12, 1, 7 }, b = a.clone(), sorted = a.clone();
70 final int[] a = { 2, 1, 5, 2, 1, 0, 9, 1, 4, 2, 4, 6, 8, 9, 10, 12, 1, 7 }, b = a.clone(), sorted = a.clone();
7171 Arrays.sort(sorted);
7272 IntArrays.stableSort(b);
7373 assertArrayEquals(sorted, b);
8484
8585 @Test
8686 public void testQuickSort() {
87 int[] a = { 2, 1, 5, 2, 1, 0, 9, 1, 4, 2, 4, 6, 8, 9, 10, 12, 1, 7 }, b = a.clone(), sorted = a.clone();
87 final int[] a = { 2, 1, 5, 2, 1, 0, 9, 1, 4, 2, 4, 6, 8, 9, 10, 12, 1, 7 }, b = a.clone(), sorted = a.clone();
8888 Arrays.sort(sorted);
8989 Arrays.sort(b);
9090 assertArrayEquals(sorted, b);
100100
101101 @Test
102102 public void testParallelQuickSort() {
103 int[] a = { 2, 1, 5, 2, 1, 0, 9, 1, 4, 2, 4, 6, 8, 9, 10, 12, 1, 7 }, b = a.clone(), sorted = a.clone();
103 final int[] a = { 2, 1, 5, 2, 1, 0, 9, 1, 4, 2, 4, 6, 8, 9, 10, 12, 1, 7 }, b = a.clone(), sorted = a.clone();
104104 Arrays.sort(sorted);
105105 Arrays.sort(b);
106106 assertArrayEquals(sorted, b);
426426
427427 @Test
428428 public void testQuickSort2() {
429 int[][] d = new int[2][];
429 final int[][] d = new int[2][];
430430
431431 d[0] = new int[10];
432432 for(int i = d[0].length; i-- != 0;) d[0][i] = 3 - i % 3;
472472
473473 @Test
474474 public void testParallelQuickSort2() {
475 int[][] d = new int[2][];
475 final int[][] d = new int[2][];
476476
477477 d[0] = new int[10];
478478 for(int i = d[0].length; i-- != 0;) d[0][i] = 3 - i % 3;
517517
518518 @Test
519519 public void testShuffle() {
520 int[] a = new int[100];
520 final int[] a = new int[100];
521521 for(int i = a.length; i-- != 0;) a[i] = i;
522522 IntArrays.shuffle(a, new Random());
523 boolean[] b = new boolean[a.length];
523 final boolean[] b = new boolean[a.length];
524524 for(int i = a.length; i-- != 0;) {
525525 assertFalse(b[a[i]]);
526526 b[a[i]] = true;
529529
530530 @Test
531531 public void testShuffleFragment() {
532 int[] a = new int[100];
532 final int[] a = new int[100];
533533 for(int i = a.length; i-- != 0;) a[i] = -1;
534534 for(int i = 10; i < 30; i++) a[i] = i - 10;
535535 IntArrays.shuffle(a, 10, 30, new Random());
536 boolean[] b = new boolean[20];
536 final boolean[] b = new boolean[20];
537537 for(int i = 20; i-- != 0;) {
538538 assertFalse(b[a[i + 10]]);
539539 b[a[i + 10]] = true;
614614
615615 @Test
616616 public void testRadixSort2() {
617 int[][] d = new int[2][];
617 final int[][] d = new int[2][];
618618
619619 d[0] = new int[10];
620620 for(int i = d[0].length; i-- != 0;) d[0][i] = 3 - i % 3;
659659
660660 @Test
661661 public void testParallelRadixSort2() {
662 int[][] d = new int[2][];
662 final int[][] d = new int[2][];
663663
664664 d[0] = new int[10];
665665 for(int i = d[0].length; i-- != 0;) d[0][i] = 3 - i % 3;
705705
706706 @Test
707707 public void testRadixSort() {
708 int[][] t = { { 2, 1, 0, 4 } };
708 final int[][] t = { { 2, 1, 0, 4 } };
709709 IntArrays.radixSort(t);
710710 for(int i = t[0].length - 1; i-- != 0;) assertTrue(t[0][i] <= t[0][i + 1]);
711711
713713 IntArrays.radixSort(t);
714714 for(int i = t[0].length - 1; i-- != 0;) assertTrue(t[0][i] <= t[0][i + 1]);
715715
716 int[][] d = new int[2][];
716 final int[][] d = new int[2][];
717717
718718 d[0] = new int[10];
719719 for(int i = d[0].length; i-- != 0;) d[0][i] = 3 - i % 3;
12911291 IntArrays.stabilize(perm, val, 1, 3);
12921292 assertArrayEquals(new int[] { 4, 2, 3, 1, 0 }, perm);
12931293 }
1294
1294
12951295 @Test
12961296 public void testLegacyMainMethodTests() throws Exception {
12971297 MainRunner.callMainIfExists(IntArrays.class, "test", /*num=*/"1000", /*seed=*/"848747");
00 /*
1 * Copyright (C) 2017-2021 Sebastiano Vigna
1 * Copyright (C) 2017-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
4242 assertEquals(IntBigLists.EMPTY_BIG_LIST, list);
4343 }
4444
45 @SuppressWarnings("boxing")
4645 @Test
4746 public void testRemoveAllSkipSegment() {
4847 final IntBigList list = new IntBigArrayBigList();
00 /*
1 * Copyright (C) 2017-2021 Sebastiano Vigna
1 * Copyright (C) 2017-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2017-2021 Sebastiano Vigna
1 * Copyright (C) 2017-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2017-2021 Sebastiano Vigna
1 * Copyright (C) 2017-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2017-2021 Sebastiano Vigna
1 * Copyright (C) 2017-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2017-2021 Sebastiano Vigna
1 * Copyright (C) 2017-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2017-2021 Sebastiano Vigna
1 * Copyright (C) 2017-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2017-2021 Sebastiano Vigna
1 * Copyright (C) 2017-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
0 /*
1 * Copyright (C) 2017-2022 Sebastiano Vigna
2 *
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 * http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15
16 package it.unimi.dsi.fastutil.ints;
17
18 import static org.junit.Assert.assertEquals;
19
20 import java.io.DataOutputStream;
21 import java.io.File;
22 import java.io.FileOutputStream;
23 import java.io.IOException;
24 import java.nio.ByteOrder;
25 import java.nio.channels.FileChannel;
26 import java.nio.channels.FileChannel.MapMode;
27 import java.nio.file.StandardOpenOption;
28 import java.util.SplittableRandom;
29
30 import org.junit.Test;
31
32 import it.unimi.dsi.fastutil.io.FastBufferedOutputStream;
33
34 public class IntMappedBigListTest {
35 @Test
36 public void testReadWrite() throws IOException {
37 final File file = File.createTempFile(this.getClass().getName(), ".bin");
38 file.deleteOnExit();
39 SplittableRandom r = new SplittableRandom(0);
40 final DataOutputStream dos = new DataOutputStream(new FastBufferedOutputStream(new FileOutputStream(file)));
41 for (long i = 0; i < IntMappedBigList.CHUNK_SIZE + 10; i++) dos.writeInt(r.nextInt());
42 dos.close();
43
44 final IntMappedBigList list = IntMappedBigList.map(FileChannel.open(file.toPath(), StandardOpenOption.READ, StandardOpenOption.WRITE), ByteOrder.BIG_ENDIAN, MapMode.READ_WRITE);
45 r = new SplittableRandom(0);
46 for (long i = 0; i < IntMappedBigList.CHUNK_SIZE + 10; i++) assertEquals(Long.toString(i), r.nextInt(), list.getInt(i));
47
48 r = new SplittableRandom(0);
49 for (long i = 0; i < IntMappedBigList.CHUNK_SIZE - 10; i++) r.nextInt();
50 final int[] a = new int[20];
51 list.getElements(IntMappedBigList.CHUNK_SIZE - 10, a, 0, 20);
52 for (long i = IntMappedBigList.CHUNK_SIZE - 10; i < IntMappedBigList.CHUNK_SIZE + 10; i++) assertEquals(Long.toString(i), r.nextInt(), a[(int)(i - (IntMappedBigList.CHUNK_SIZE - 10))]);
53
54 r = new SplittableRandom(0);
55 list.getElements(1, a, 1, 19);
56 r.nextInt();
57 for (int i = 1; i < 20; i++) assertEquals(Long.toString(i), r.nextInt(), a[i]);
58
59 r = new SplittableRandom(1);
60 for (long i = 0; i < IntMappedBigList.CHUNK_SIZE + 10; i++) list.set(i, r.nextInt());
61
62 r = new SplittableRandom(1);
63 for (long i = 0; i < IntMappedBigList.CHUNK_SIZE + 10; i++) assertEquals(Long.toString(i), r.nextInt(), list.getInt(i));
64
65
66 file.delete();
67
68 }
69
70 @Test
71 public void testSmallEndian() throws IOException {
72 final File file = File.createTempFile(this.getClass().getName(), ".bin");
73 file.deleteOnExit();
74 final java.nio.ByteBuffer buffer = java.nio.ByteBuffer.allocate(10000);
75
76 buffer.order(ByteOrder.LITTLE_ENDIAN);
77 SplittableRandom r = new SplittableRandom(0);
78 for (long i = 0; i < 100; i++) buffer.putInt(r.nextInt());
79 buffer.flip();
80
81 final FileChannel channel = FileChannel.open(file.toPath(), StandardOpenOption.WRITE);
82 channel.write(buffer);
83 channel.close();
84
85 final IntMappedBigList list = IntMappedBigList.map(FileChannel.open(file.toPath()), ByteOrder.LITTLE_ENDIAN);
86 r = new SplittableRandom(0);
87 for (long i = 0; i < 100; i++) assertEquals(Long.toString(i), r.nextInt(), list.getInt(i));
88
89 final int[] a = new int[1];
90 r = new SplittableRandom(0);
91 for (long i = 0; i < 100; i++) {
92 list.getElements(i, a, 0, 1);
93 assertEquals(Long.toString(i), r.nextInt(), a[0]);
94 }
95
96 final IntMappedBigList copy = list.copy();
97 r = new SplittableRandom(0);
98 for (long i = 0; i < 100; i++) assertEquals(Long.toString(i), r.nextInt(), copy.getInt(i));
99 file.delete();
100 }
101
102 @Test
103 public void testBigEndian() throws IOException {
104 final File file = File.createTempFile(this.getClass().getName(), ".bin");
105 file.deleteOnExit();
106 final java.nio.ByteBuffer buffer = java.nio.ByteBuffer.allocate(10000);
107
108 buffer.order(ByteOrder.BIG_ENDIAN);
109 SplittableRandom r = new SplittableRandom(0);
110 for (long i = 0; i < 100; i++) buffer.putInt(r.nextInt());
111 buffer.flip();
112
113 final FileChannel channel = FileChannel.open(file.toPath(), StandardOpenOption.WRITE);
114 channel.write(buffer);
115 channel.close();
116
117 final IntMappedBigList list = IntMappedBigList.map(FileChannel.open(file.toPath()), ByteOrder.BIG_ENDIAN);
118 r = new SplittableRandom(0);
119 for (long i = 0; i < 100; i++) assertEquals(Long.toString(i), r.nextInt(), list.getInt(i));
120
121 final int[] a = new int[1];
122 r = new SplittableRandom(0);
123 for (long i = 0; i < 100; i++) {
124 list.getElements(i, a, 0, 1);
125 assertEquals(Long.toString(i), r.nextInt(), a[0]);
126 }
127
128 final IntMappedBigList copy = list.copy();
129 r = new SplittableRandom(0);
130 for (long i = 0; i < 100; i++) assertEquals(Long.toString(i), r.nextInt(), copy.getInt(i));
131 file.delete();
132 }
133 }
00 /*
1 * Copyright (C) 2017-2021 Sebastiano Vigna
1 * Copyright (C) 2017-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2017-2021 Sebastiano Vigna
1 * Copyright (C) 2017-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2017-2021 Sebastiano Vigna
1 * Copyright (C) 2017-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2017-2021 Sebastiano Vigna
1 * Copyright (C) 2017-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2017-2021 Sebastiano Vigna
1 * Copyright (C) 2017-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2017-2021 Sebastiano Vigna
1 * Copyright (C) 2017-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2017-2021 Sebastiano Vigna
1 * Copyright (C) 2017-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2017-2021 Sebastiano Vigna
1 * Copyright (C) 2017-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2017-2021 Sebastiano Vigna
1 * Copyright (C) 2017-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
2020 import static it.unimi.dsi.fastutil.BigArrays.length;
2121 import static it.unimi.dsi.fastutil.BigArrays.set;
2222 import static it.unimi.dsi.fastutil.BigArrays.wrap;
23 import static java.nio.ByteOrder.BIG_ENDIAN;
24 import static java.nio.ByteOrder.LITTLE_ENDIAN;
2325 import static org.junit.Assert.assertArrayEquals;
2426 import static org.junit.Assert.assertEquals;
2527 import static org.junit.Assert.assertFalse;
3335 import java.io.FileInputStream;
3436 import java.io.FileOutputStream;
3537 import java.io.IOException;
38 import java.nio.ByteOrder;
39 import java.nio.channels.FileChannel;
40 import java.util.Arrays;
41 import java.util.SplittableRandom;
3642
3743 import org.junit.Test;
3844
45 import it.unimi.dsi.fastutil.BigArrays;
46 import it.unimi.dsi.fastutil.booleans.BooleanBigArrays;
47 import it.unimi.dsi.fastutil.booleans.BooleanIterator;
48 import it.unimi.dsi.fastutil.booleans.BooleanIterators;
3949 import it.unimi.dsi.fastutil.bytes.ByteBigArrays;
50 import it.unimi.dsi.fastutil.bytes.ByteIterators;
51 import it.unimi.dsi.fastutil.doubles.DoubleBigArrays;
4052 import it.unimi.dsi.fastutil.doubles.DoubleIterator;
53 import it.unimi.dsi.fastutil.doubles.DoubleIterators;
4154
4255 public class BinIOTest {
4356
7386 assertEquals(a.length, BinIO.loadBytes(file, b, 0, a.length));
7487 assertArrayEquals(a, b);
7588
89 assertEquals(a.length, BinIO.loadBytes(file.toString(), b));
90 assertArrayEquals(a, b);
91 assertEquals(a.length, BinIO.loadBytes(file.toString(), b, 0, a.length));
92 assertArrayEquals(a, b);
93
94 assertArrayEquals(a, BinIO.loadBytes(file));
95 assertArrayEquals(a, BinIO.loadBytes(file.toString()));
96
7697 assertEquals(a.length, BinIO.loadBytes(new FileInputStream(file), b));
7798 assertArrayEquals(a, b);
7899 assertEquals(a.length, BinIO.loadBytes(new FileInputStream(file), b, 0, a.length));
79100 assertArrayEquals(a, b);
101
102 final DataInputStream dis = new DataInputStream(new FileInputStream(file));
103 assertArrayEquals(a, ByteIterators.unwrap(BinIO.asByteIterator(dis)));
104 dis.close();
105 assertArrayEquals(a, ByteIterators.unwrap(BinIO.asByteIterator(file)));
106 assertArrayEquals(a, ByteIterators.unwrap(BinIO.asByteIterator(file.toString())));
107 assertArrayEquals(a, ByteIterators.unwrap(BinIO.asByteIterable(file).iterator()));
108 assertArrayEquals(a, ByteIterators.unwrap(BinIO.asByteIterable(file.toString()).iterator()));
80109
81110 final byte[] c = new byte[a.length + 1];
82111 assertEquals(a.length, BinIO.loadBytes(new FileInputStream(file), c));
167196 testBigBytes(wrap(LARGE));
168197 }
169198
199 @Test
170200 public void testFileDataWrappers() throws IOException {
171201 final File file = File.createTempFile(getClass().getSimpleName(), "dump");
172202 file.deleteOnExit();
226256 testInts(new int[1024]);
227257 testInts(new int[1024 * 1024]);
228258 }
229 }
259
260 @Test
261 public void testNioDataWrappersDoubles() throws IOException {
262 final File file = File.createTempFile(getClass().getSimpleName(), "dump");
263 file.deleteOnExit();
264 for (final ByteOrder o : new ByteOrder[] { LITTLE_ENDIAN, BIG_ENDIAN }) {
265 for (final int size : new int[] { 100, BinIO.BUFFER_SIZE / Double.BYTES,
266 BinIO.BUFFER_SIZE / Double.BYTES + 100, BinIO.BUFFER_SIZE, 10000 }) {
267 final SplittableRandom r = new SplittableRandom(0);
268 final double[] d = new double[size];
269 for (int i = 0; i < size; i++) d[i] = r.nextDouble();
270
271 BinIO.storeDoubles(d, file, o);
272 assertArrayEquals(d, BinIO.loadDoubles(file, o), 0);
273 BinIO.storeDoubles(d, file.toString(), o);
274 assertArrayEquals(d, BinIO.loadDoubles(file, o), 0);
275 BinIO.storeDoubles(DoubleIterators.wrap(d), file, o);
276 assertArrayEquals(d, BinIO.loadDoubles(file, o), 0);
277 BinIO.storeDoubles(DoubleIterators.wrap(d), file.toString(), o);
278 assertArrayEquals(d, BinIO.loadDoubles(file, o), 0);
279
280 final FileChannel channel = FileChannel.open(file.toPath());
281 DoubleIterator di = BinIO.asDoubleIterator(channel, o);
282 for (int i = 0; i < size; i++) assertEquals(d[i], di.nextDouble(), 0.);
283 assertFalse(Integer.toString(size), di.hasNext());
284 channel.close();
285
286 di = BinIO.asDoubleIterator(file, o);
287 for (int i = 0; i < size; i++) assertEquals(d[i], di.nextDouble(), 0.);
288 assertFalse(Integer.toString(size), di.hasNext());
289
290 di = BinIO.asDoubleIterator(file.toString(), o);
291 for (int i = 0; i < size; i++) assertEquals(d[i], di.nextDouble(), 0.);
292 assertFalse(Integer.toString(size), di.hasNext());
293
294 di = BinIO.asDoubleIterable(file, o).iterator();
295 for (int i = 0; i < size; i++) assertEquals(d[i], di.nextDouble(), 0.);
296 assertFalse(Integer.toString(size), di.hasNext());
297
298 di = BinIO.asDoubleIterable(file.toString(), o).iterator();
299 for (int i = 0; i < size; i++) assertEquals(d[i], di.nextDouble(), 0.);
300 assertFalse(Integer.toString(size), di.hasNext());
301
302 di = BinIO.asDoubleIterator(file, o);
303 for (int i = 0; i < size; i++) {
304 assertTrue(di.hasNext());
305 assertEquals(d[i], di.nextDouble(), 0.);
306 }
307
308 di = BinIO.asDoubleIterator(file, o);
309 int s = 1;
310 for (int i = 0; i < size; i++) {
311 assertEquals(Math.min(s, size - i), di.skip(s));
312 i += s;
313 if (i >= size) break;
314 assertEquals(d[i], di.nextDouble(), 0.);
315 s *= 2;
316 }
317
318 di = BinIO.asDoubleIterator(file, o);
319 s = 1;
320 for (int i = 0; i < size; i++) {
321 if (s > size - i) break;
322 assertTrue(di.hasNext());
323 assertEquals(Math.min(s, size - i), di.skip(s));
324 i += s;
325 if (i >= size) {
326 assertFalse(di.hasNext());
327 break;
328 }
329 assertTrue(di.hasNext());
330 assertTrue(di.hasNext()); // To increase coverage
331 assertEquals(d[i], di.nextDouble(), 0.);
332 s *= 2;
333 }
334 }
335 }
336 }
337
338 @Test
339 public void testNioBigDoubles() throws IOException {
340 final File file = File.createTempFile(getClass().getSimpleName(), "dump");
341 file.deleteOnExit();
342 for (final ByteOrder o : new ByteOrder[] { LITTLE_ENDIAN, BIG_ENDIAN }) {
343 for (final int size : new int[] { 100, BinIO.BUFFER_SIZE / Double.BYTES,
344 BinIO.BUFFER_SIZE / Double.BYTES + 100, BinIO.BUFFER_SIZE, 10000 }) {
345 final int size2 = size / 2, size34 = 3 * size / 4;
346 final SplittableRandom r = new SplittableRandom(0);
347 final double[] d = new double[size];
348 for (int i = 0; i < size; i++) d[i] = r.nextDouble();
349 final double[][] dd = BigArrays.wrap(d);
350
351 BinIO.storeDoubles(dd, file, o);
352 assertArrayEquals(d, BinIO.loadDoubles(file, o), 0);
353 BinIO.storeDoubles(dd, file.toString(), o);
354 assertArrayEquals(d, BinIO.loadDoubles(file.toString(), o), 0);
355 assertTrue(BigArrays.equals(dd, BinIO.loadDoublesBig(file, o)));
356
357 final double[] e = new double[size];
358 assertEquals(size - size2, BinIO.loadDoubles(file, o, e, size2, size - size2));
359 for (int i = size2; i < size; i++) assertEquals(e[i], d[i - size2], 0);
360 assertEquals(size - size2, BinIO.loadDoubles(file.toString(), o, e, size2, size - size2));
361 for (int i = size2; i < size; i++) assertEquals(e[i], d[i - size2], 0);
362
363 final double[] h = new double[size2];
364 assertEquals(size2, BinIO.loadDoubles(file, o, h));
365 for (int i = 0; i < size2; i++) assertEquals(h[i], d[i], 0);
366 assertEquals(size2, BinIO.loadDoubles(file.toString(), o, h));
367 for (int i = 0; i < size2; i++) assertEquals(h[i], d[i], 0);
368
369 final double[][] ee = DoubleBigArrays.newBigArray(length(dd));
370 final double[][] hh = BigArrays.wrap(h);
371
372 FileChannel channel = FileChannel.open(file.toPath());
373 assertEquals(size, BinIO.loadDoubles(channel, o, ee));
374 assertTrue(BigArrays.equals(dd, ee));
375 channel.close();
376
377 channel = FileChannel.open(file.toPath());
378 assertEquals(size2, BinIO.loadDoubles(channel, o, hh));
379 for (int i = 0; i < size2; i++) assertEquals(h[i], get(hh, i), 0);
380 channel.close();
381
382 assertEquals(size, BinIO.loadDoubles(file, o, ee, 0, size));
383 assertTrue(BigArrays.equals(dd, ee));
384 assertEquals(size, BinIO.loadDoubles(file, o, ee));
385 assertEquals(size, BinIO.loadDoubles(file, o, DoubleBigArrays.newBigArray(size * 2)));
386 assertTrue(BigArrays.equals(dd, ee));
387 assertEquals(size, BinIO.loadDoubles(file.toString(), o, ee, 0, size));
388 assertTrue(BigArrays.equals(dd, ee));
389 assertEquals(size, BinIO.loadDoubles(file.toString(), o, ee));
390 assertTrue(BigArrays.equals(dd, ee));
391 assertTrue(BigArrays.equals(dd, BinIO.loadDoublesBig(file, o)));
392 assertTrue(BigArrays.equals(dd, BinIO.loadDoublesBig(file.toString(), o)));
393
394 assertEquals(size - size2, BinIO.loadDoubles(file, o, ee, size2, size - size2));
395 for (int i = size2; i < size; i++) assertEquals(get(ee, i), get(dd, i - size2), 0);
396
397 assertEquals(size - size2, BinIO.loadDoubles(file, o, ee, size2, size - size2));
398 for (int i = size2; i < size; i++) assertEquals(get(ee, i), get(dd, i - size2), 0);
399
400 assertEquals(size34 - size2, BinIO.loadDoubles(file.toString(), o, ee, size2, size34 - size2));
401 for (int i = size2; i < size34; i++) assertEquals(get(ee, i), get(dd, i - size2), 0);
402
403 BinIO.storeDoubles(dd, size2, size - size2, file, o);
404 assertArrayEquals(Arrays.copyOfRange(d, size2, size), BinIO.loadDoubles(file, o), 0);
405 BinIO.storeDoubles(dd, size2, size - size2, file.toString(), o);
406 assertArrayEquals(Arrays.copyOfRange(d, size2, size), BinIO.loadDoubles(file, o), 0);
407
408 BinIO.storeDoubles(dd, size2, size34 - size2, file, o);
409 assertArrayEquals(Arrays.copyOfRange(d, size2, size34), BinIO.loadDoubles(file, o), 0);
410
411 BinIO.storeDoubles(d, size2, size - size2, file, o);
412 assertArrayEquals(Arrays.copyOfRange(d, size2, size), BinIO.loadDoubles(file, o), 0);
413 BinIO.storeDoubles(d, size2, size - size2, file.toString(), o);
414 assertArrayEquals(Arrays.copyOfRange(d, size2, size), BinIO.loadDoubles(file, o), 0);
415
416 BinIO.storeDoubles(d, size2, size34 - size2, file, o);
417 assertArrayEquals(Arrays.copyOfRange(d, size2, size34), BinIO.loadDoubles(file, o), 0);
418
419 }
420 }
421 }
422
423 @SuppressWarnings("boxing")
424 @Test
425 public void testNioDataWrappersBooleans() throws IOException {
426 final File file = File.createTempFile(getClass().getSimpleName(), "dump");
427 file.deleteOnExit();
428 for (final int size : new int[] { 100, BinIO.BUFFER_SIZE / Double.BYTES,
429 BinIO.BUFFER_SIZE / Double.BYTES + 100, BinIO.BUFFER_SIZE, 10000 }) {
430 final int size2 = size / 2, size34 = 3 * size / 4;
431 final SplittableRandom r = new SplittableRandom(0);
432 final boolean[] d = new boolean[size];
433 final boolean[] e = new boolean[size];
434 for (int i = 0; i < size; i++) d[i] = r.nextBoolean();
435
436 BinIO.storeBooleans(d, file);
437 assertArrayEquals(d, BinIO.loadBooleans(file));
438 BinIO.storeBooleans(d, file.toString());
439 assertArrayEquals(d, BinIO.loadBooleans(file));
440 BinIO.storeBooleans(BooleanIterators.wrap(d), file);
441 assertArrayEquals(d, BinIO.loadBooleans(file));
442 BinIO.storeBooleans(BooleanIterators.wrap(d), file.toString());
443 assertArrayEquals(d, BinIO.loadBooleans(file));
444
445 DataInputStream dis = new DataInputStream(new FileInputStream(file));
446 assertEquals(size, BinIO.loadBooleans(dis, e));
447 assertArrayEquals(d, e);
448 dis.close();
449
450 dis = new DataInputStream(new FileInputStream(file));
451 assertEquals(size, BinIO.loadBooleans(dis, new boolean[size * 2]));
452 dis.close();
453
454 DataOutputStream dos = new DataOutputStream(new FileOutputStream(file));
455 BinIO.storeBooleans(d, size2, size34 - size2, dos);
456 assertArrayEquals(Arrays.copyOfRange(d, size2, size34), BinIO.loadBooleans(file));
457 dos.close();
458
459 BinIO.storeBooleans(d, file);
460
461 dis = new DataInputStream(new FileInputStream(file));
462 assertEquals(size, BinIO.loadBooleans(dis, new boolean[size * 3], size, 2 * size));
463 dis.close();
464
465 assertEquals(size, BinIO.loadBooleans(file, new boolean[size * 3], size, 2 * size));
466
467 dos = new DataOutputStream(new FileOutputStream(file));
468 BinIO.storeBooleans(BooleanIterators.wrap(d), dos);
469 assertArrayEquals(d, BinIO.loadBooleans(file));
470 dos.close();
471
472 BinIO.storeBooleans(BooleanIterators.wrap(d), file);
473 assertArrayEquals(d, BinIO.loadBooleans(file));
474
475 BinIO.storeBooleans(BooleanIterators.wrap(d), file.toString());
476 assertArrayEquals(d, BinIO.loadBooleans(file));
477
478 dos = new DataOutputStream(new FileOutputStream(file));
479 BinIO.storeBooleans(d, dos);
480 assertArrayEquals(d, BinIO.loadBooleans(file));
481 dos.close();
482
483 dis = new DataInputStream(new FileInputStream(file));
484 assertEquals(size34 - size2, BinIO.loadBooleans(dis, e, size2, size34 - size2));
485 for (int i = size2; i < size34; i++) assertEquals(d[i - size2], e[i]);
486 dis.close();
487
488 dis = new DataInputStream(new FileInputStream(file));
489 BooleanIterator di = BinIO.asBooleanIterator(dis);
490 for (int i = 0; i < size; i++) assertEquals(d[i], di.nextBoolean());
491 assertFalse(Integer.toString(size), di.hasNext());
492 dis.close();
493
494 di = BinIO.asBooleanIterator(file);
495 for (int i = 0; i < size; i++) assertEquals(d[i], di.nextBoolean());
496 assertFalse(Integer.toString(size), di.hasNext());
497
498 di = BinIO.asBooleanIterator(file.toString());
499 for (int i = 0; i < size; i++) assertEquals(d[i], di.nextBoolean());
500 assertFalse(Integer.toString(size), di.hasNext());
501
502 di = BinIO.asBooleanIterable(file).iterator();
503 for (int i = 0; i < size; i++) assertEquals(d[i], di.nextBoolean());
504 assertFalse(Integer.toString(size), di.hasNext());
505
506 di = BinIO.asBooleanIterable(file.toString()).iterator();
507 for (int i = 0; i < size; i++) assertEquals(d[i], di.nextBoolean());
508 assertFalse(Integer.toString(size), di.hasNext());
509
510 di = BinIO.asBooleanIterator(file);
511 for (int i = 0; i < size; i++) {
512 assertTrue(di.hasNext());
513 assertEquals(d[i], di.nextBoolean());
514 }
515
516 di = BinIO.asBooleanIterator(file);
517 int s = 1;
518 for (int i = 0; i < size; i++) {
519 assertEquals(Math.min(s, size - i), di.skip(s));
520 i += s;
521 if (i >= size) break;
522 assertEquals(d[i], di.nextBoolean());
523 s *= 2;
524 }
525
526 di = BinIO.asBooleanIterator(file);
527 s = 1;
528 for (int i = 0; i < size; i++) {
529 if (s > size - i) break;
530 assertTrue(di.hasNext());
531 assertEquals(Math.min(s, size - i), di.skip(s));
532 i += s;
533 if (i >= size) {
534 assertFalse(di.hasNext());
535 break;
536 }
537 assertTrue(di.hasNext());
538 assertTrue(di.hasNext()); // To increase coverage
539 assertEquals(d[i], di.nextBoolean());
540 s *= 2;
541 }
542 }
543 }
544
545 @SuppressWarnings("boxing")
546 @Test
547 public void testNioBigBooleans() throws IOException {
548 final File file = File.createTempFile(getClass().getSimpleName(), "dump");
549 file.deleteOnExit();
550 for (final int size : new int[] { 100, BinIO.BUFFER_SIZE / Double.BYTES,
551 BinIO.BUFFER_SIZE / Double.BYTES + 100, BinIO.BUFFER_SIZE, 10000 }) {
552 final int size2 = size / 2, size34 = 3 * size / 4;
553 final SplittableRandom r = new SplittableRandom(0);
554 final boolean[] d = new boolean[size];
555 for (int i = 0; i < size; i++) d[i] = r.nextBoolean();
556 final boolean[][] dd = BigArrays.wrap(d);
557
558 BinIO.storeBooleans(dd, file);
559 assertArrayEquals(d, BinIO.loadBooleans(file));
560 BinIO.storeBooleans(dd, file.toString());
561 assertArrayEquals(d, BinIO.loadBooleans(file.toString()));
562 assertTrue(BigArrays.equals(dd, BinIO.loadBooleansBig(file)));
563
564 final boolean[] e = new boolean[size];
565 assertEquals(size - size2, BinIO.loadBooleans(file, e, size2, size - size2));
566 for (int i = size2; i < size; i++) assertEquals(e[i], d[i - size2]);
567 assertEquals(size - size2, BinIO.loadBooleans(file.toString(), e, size2, size - size2));
568 for (int i = size2; i < size; i++) assertEquals(e[i], d[i - size2]);
569
570 final boolean[] h = new boolean[size2];
571 assertEquals(size2, BinIO.loadBooleans(file, h));
572 for (int i = 0; i < size2; i++) assertEquals(h[i], d[i]);
573 assertEquals(size2, BinIO.loadBooleans(file.toString(), h));
574 for (int i = 0; i < size2; i++) assertEquals(h[i], d[i]);
575
576 final boolean[][] ee = BooleanBigArrays.newBigArray(length(dd));
577 final boolean[][] hh = BigArrays.wrap(h);
578
579 DataInputStream dis = new DataInputStream(new FileInputStream(file));
580 assertEquals(size, BinIO.loadBooleans(dis, ee));
581 assertTrue(BigArrays.equals(dd, ee));
582 dis.close();
583
584 dis = new DataInputStream(new FileInputStream(file));
585 assertEquals(size, BinIO.loadBooleans(dis, BooleanBigArrays.newBigArray(size * 3)));
586 dis.close();
587
588 dis = new DataInputStream(new FileInputStream(file));
589 assertEquals(size, BinIO.loadBooleans(dis, BooleanBigArrays.newBigArray(size * 3), size, 2 * size));
590 dis.close();
591
592 dis = new DataInputStream(new FileInputStream(file));
593 assertEquals(size2, BinIO.loadBooleans(dis, hh));
594 for (int i = 0; i < size2; i++) assertEquals(h[i], get(hh, i));
595 dis.close();
596
597 dis = new DataInputStream(new FileInputStream(file));
598 assertEquals(size34 - size2, BinIO.loadBooleans(dis, ee, size2, size34 - size2));
599 for (int i = size2; i < size34 - size2; i++) assertEquals(d[i - size2], get(ee, i));
600 dis.close();
601
602 assertEquals(size, BinIO.loadBooleans(file, ee, 0, size));
603 assertTrue(BigArrays.equals(dd, ee));
604 assertEquals(size, BinIO.loadBooleans(file, ee));
605 assertTrue(BigArrays.equals(dd, ee));
606 assertEquals(size, BinIO.loadBooleans(file.toString(), ee, 0, size));
607 assertTrue(BigArrays.equals(dd, ee));
608 assertEquals(size, BinIO.loadBooleans(file.toString(), ee));
609 assertTrue(BigArrays.equals(dd, ee));
610 assertTrue(BigArrays.equals(dd, BinIO.loadBooleansBig(file)));
611 assertTrue(BigArrays.equals(dd, BinIO.loadBooleansBig(file.toString())));
612
613 assertEquals(size - size2, BinIO.loadBooleans(file, ee, size2, size - size2));
614 for (int i = size2; i < size; i++) assertEquals(get(ee, i), get(dd, i - size2));
615
616 assertEquals(size34 - size2, BinIO.loadBooleans(file, ee, size2, size34 - size2));
617 for (int i = size2; i < size34; i++) assertEquals(get(ee, i), get(dd, i - size2));
618
619 BinIO.storeBooleans(dd, size2, size - size2, file);
620 assertArrayEquals(Arrays.copyOfRange(d, size2, size), BinIO.loadBooleans(file));
621 BinIO.storeBooleans(dd, size2, size - size2, file.toString());
622 assertArrayEquals(Arrays.copyOfRange(d, size2, size), BinIO.loadBooleans(file));
623
624 BinIO.storeBooleans(dd, size2, size34 - size2, file);
625 assertArrayEquals(Arrays.copyOfRange(d, size2, size34), BinIO.loadBooleans(file));
626
627 BinIO.storeBooleans(d, size2, size - size2, file);
628 assertArrayEquals(Arrays.copyOfRange(d, size2, size), BinIO.loadBooleans(file));
629 BinIO.storeBooleans(d, size2, size - size2, file.toString());
630 assertArrayEquals(Arrays.copyOfRange(d, size2, size), BinIO.loadBooleans(file));
631
632 BinIO.storeBooleans(d, size2, size34 - size2, file);
633 assertArrayEquals(Arrays.copyOfRange(d, size2, size34), BinIO.loadBooleans(file));
634
635 DataOutputStream dos = new DataOutputStream(new FileOutputStream(file));
636 BinIO.storeBooleans(dd, dos);
637 dos.close();
638 assertTrue(BigArrays.equals(dd, BinIO.loadBooleansBig(file)));
639
640 dos = new DataOutputStream(new FileOutputStream(file));
641 BinIO.storeBooleans(dd, size2, size34 - size2, dos);
642 dos.close();
643 assertTrue(BigArrays.equals(BigArrays.copy(dd, size2, size34 - size2), BinIO.loadBooleansBig(file)));
644
645 }
646 }
647
648 }
00 /*
1 * Copyright (C) 2017-2021 Sebastiano Vigna
1 * Copyright (C) 2017-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2017-2021 Sebastiano Vigna
1 * Copyright (C) 2017-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2017-2021 Sebastiano Vigna
1 * Copyright (C) 2017-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2017-2021 Sebastiano Vigna
1 * Copyright (C) 2017-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2017-2021 Sebastiano Vigna
1 * Copyright (C) 2017-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2017-2021 Sebastiano Vigna
1 * Copyright (C) 2017-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2017-2021 Sebastiano Vigna
1 * Copyright (C) 2017-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2017-2021 Sebastiano Vigna
1 * Copyright (C) 2017-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2017-2021 Sebastiano Vigna
1 * Copyright (C) 2017-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2017-2021 Sebastiano Vigna
1 * Copyright (C) 2017-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2017-2021 Sebastiano Vigna
1 * Copyright (C) 2017-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2019-2021 Sebastiano Vigna
1 * Copyright (C) 2019-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2017-2021 Sebastiano Vigna
1 * Copyright (C) 2017-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2017-2021 Sebastiano Vigna
1 * Copyright (C) 2017-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2017-2021 Sebastiano Vigna
1 * Copyright (C) 2017-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
5959 assertFalse(map.containsKey("def"));
6060 }
6161 }
62
00 /*
1 * Copyright (C) 2017-2021 Sebastiano Vigna
1 * Copyright (C) 2017-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2017-2021 Sebastiano Vigna
1 * Copyright (C) 2017-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2017-2021 Sebastiano Vigna
1 * Copyright (C) 2017-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2017-2021 Sebastiano Vigna
1 * Copyright (C) 2017-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2017-2021 Sebastiano Vigna
1 * Copyright (C) 2017-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2017-2021 Sebastiano Vigna
1 * Copyright (C) 2017-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2017-2021 Sebastiano Vigna
1 * Copyright (C) 2017-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2017-2021 Sebastiano Vigna
1 * Copyright (C) 2017-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2017-2021 Sebastiano Vigna
1 * Copyright (C) 2017-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2017-2021 Sebastiano Vigna
1 * Copyright (C) 2017-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2017-2021 Sebastiano Vigna
1 * Copyright (C) 2017-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2017-2021 Sebastiano Vigna
1 * Copyright (C) 2017-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2017-2021 Sebastiano Vigna
1 * Copyright (C) 2017-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2017-2021 Sebastiano Vigna
1 * Copyright (C) 2017-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2017-2021 Sebastiano Vigna
1 * Copyright (C) 2017-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2017-2021 Sebastiano Vigna
1 * Copyright (C) 2017-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2017-2021 Sebastiano Vigna
1 * Copyright (C) 2017-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2017-2021 Sebastiano Vigna
1 * Copyright (C) 2017-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.
00 /*
1 * Copyright (C) 2017-2021 Sebastiano Vigna
1 * Copyright (C) 2017-2022 Sebastiano Vigna
22 *
33 * Licensed under the Apache License, Version 2.0 (the "License");
44 * you may not use this file except in compliance with the License.