Package org.codelibs.fess.dict.kuromoji
Class KuromojiFile.KuromojiUpdater
java.lang.Object
org.codelibs.fess.dict.kuromoji.KuromojiFile.KuromojiUpdater
- All Implemented Interfaces:
Closeable,AutoCloseable
- Enclosing class:
KuromojiFile
An updater for Kuromoji files.
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedKuromojiUpdater(KuromojiItem newItem) Constructs a new Kuromoji updater. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()commit()Commits the changes.voidWrites a line to the new file.write(KuromojiItem oldItem) Writes the old item to the new file.
-
Field Details
-
isCommit
protected boolean isCommitTrue if the changes have been committed. -
newFile
The new file. -
writer
The writer for the new file. -
item
The item to be added or updated.
-
-
Constructor Details
-
KuromojiUpdater
Constructs a new Kuromoji updater.- Parameters:
newItem- The new item to be added or updated.
-
-
Method Details
-
write
Writes the old item to the new file.- Parameters:
oldItem- The old item.- Returns:
- The new item if it was updated, otherwise the old item.
-
write
Writes a line to the new file.- Parameters:
line- The line to write.
-
commit
Commits the changes.- Returns:
- The new item if it was committed, otherwise null.
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-