Package org.ec4j.core.model
Class EditorConfig
java.lang.Object
org.ec4j.core.model.Adaptable.DefaultAdaptable
org.ec4j.core.model.EditorConfig
- All Implemented Interfaces:
Adaptable
A immutable model of an
.editorconfig file.-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface org.ec4j.core.model.Adaptable
Adaptable.DefaultAdaptable -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic EditorConfig.Builderbuilder()booleaninthashCode()booleanbooleanisRoot()toString()Methods inherited from class org.ec4j.core.model.Adaptable.DefaultAdaptable
getAdapter
-
Field Details
-
root
Citing from http://editorconfig.org/ : "A search for .editorconfig files will stop if the root filepath is reached or an EditorConfig file with root=true is found."Note that the type of
rootisBooleanrather thanboolean. Anullrootmeans that the `root` property was not available in the file. -
sections
-
version
-
-
Constructor Details
-
EditorConfig
You look forbuilder()if you wonder why this constructor is package visible.- Parameters:
adapters-root-version-sections-
-
-
Method Details
-
builder
- Returns:
- a new
EditorConfig.Builder
-
equals
-
getSections
-
getVersion
- Returns:
- The version of EditorConfig specification, the current
EditorConfigmodel is compliant with
-
hashCode
public int hashCode() -
hasRootProperty
public boolean hasRootProperty()- Returns:
trueif the underlying.editorconfigfile had therootproperty specified;falseotherwise. A shorthand forgetRoot() != null
-
isRoot
public boolean isRoot()- Returns:
trueif a search for.editorconfigfiles should stop at the present directory level.
-
toString
-