File tree Expand file tree Collapse file tree
src/main/java/org/codejive/properties Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -168,12 +168,25 @@ public int prevCount(Predicate<PropertiesParser.Token> accept) {
168168 return cnt ;
169169 }
170170
171+ /**
172+ * Inserts a token at the current position, shifting the current token (if any) and any subsequent tokens to the right (adds one to their indices).
173+ * <br/>
174+ * This method advances the cursor by one, such that the cursor state remains unchanged (pointing to the same token as before).
175+ * @param token the token to insert.
176+ * @return {@code this}
177+ */
171178 public Cursor add (PropertiesParser .Token token ) {
172179 index = Math .max (index , 0 );
173180 addToken (index ++, token );
174181 return this ;
175182 }
176183
184+ /**
185+ * Inserts an EOL Token at the current position.
186+ * @see #add(PropertiesParser.Token)
187+ * @param eolType the line separator used for the token. Typically {@link Properties#getEolType()}
188+ * @return {@code this}
189+ */
177190 public Cursor addEol (EolType eolType ) {
178191 return add (eolType .token );
179192 }
You can’t perform that action at this time.
0 commit comments