-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
toml: Remove TomlConfig, add TomlFormat
- Loading branch information
1 parent
c0013f8
commit f54fb3d
Showing
7 changed files
with
74 additions
and
96 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
76 changes: 0 additions & 76 deletions
76
toml/src/main/java/com/electronwill/nightconfig/toml/TomlConfig.java
This file was deleted.
Oops, something went wrong.
39 changes: 39 additions & 0 deletions
39
toml/src/main/java/com/electronwill/nightconfig/toml/TomlFormat.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
package com.electronwill.nightconfig.toml; | ||
|
||
import com.electronwill.nightconfig.core.CommentedConfig; | ||
import com.electronwill.nightconfig.core.Config; | ||
import com.electronwill.nightconfig.core.UnmodifiableConfig; | ||
import com.electronwill.nightconfig.core.ConfigFormat; | ||
|
||
/** | ||
* @author TheElectronWill | ||
*/ | ||
public final class TomlFormat implements ConfigFormat<CommentedConfig, Config, UnmodifiableConfig> { | ||
private static final TomlFormat INSTANCE = new TomlFormat(); | ||
|
||
public static TomlFormat instance() { | ||
return INSTANCE; | ||
} | ||
|
||
private TomlFormat() {} | ||
|
||
@Override | ||
public TomlWriter createWriter() { | ||
return new TomlWriter(); | ||
} | ||
|
||
@Override | ||
public TomlParser createParser() { | ||
return new TomlParser(); | ||
} | ||
|
||
@Override | ||
public CommentedConfig createConfig() { | ||
return CommentedConfig.of(this); | ||
} | ||
|
||
@Override | ||
public boolean supportsComments() { | ||
return true; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters