-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Format + Documentation + Minor improvements
- Loading branch information
1 parent
9271aeb
commit fea589f
Showing
19 changed files
with
503 additions
and
142 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
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
30 changes: 29 additions & 1 deletion
30
core/src/main/java/com/electronwill/nightconfig/core/serialization/CharacterOutput.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 |
---|---|---|
@@ -1,12 +1,40 @@ | ||
package com.electronwill.nightconfig.core.serialization; | ||
|
||
/** | ||
* Interface for outputs of characters. | ||
* | ||
* @author TheElectronWill | ||
*/ | ||
public interface CharacterOutput { | ||
/** | ||
* Writes a character. | ||
* | ||
* @param c the character to write | ||
*/ | ||
void write(char c); | ||
|
||
void write(char[] chars); | ||
/** | ||
* Writes an array of characters. | ||
* | ||
* @param chars the characters to write | ||
*/ | ||
default void write(char[] chars) { | ||
write(chars, 0, chars.length); | ||
} | ||
|
||
/** | ||
* Writes a portion of an array of characters. | ||
* | ||
* @param chars the characters to write | ||
* @param offset the index to start at | ||
* @param length the number of characters to write | ||
*/ | ||
void write(char[] chars, int offset, int length); | ||
|
||
/** | ||
* Writes all the characters in the given String. | ||
* | ||
* @param s the string to write | ||
*/ | ||
void write(String s); | ||
} |
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
Oops, something went wrong.