Package org.aoju.bus.setting.magic
Class IniPropertyImpl
java.lang.Object
org.aoju.bus.setting.magic.AbstractElement
org.aoju.bus.setting.magic.IniPropertyImpl
- All Implemented Interfaces:
Serializable,CharSequence,Map.Entry<String,,String> IniElement,IniProperty
Ini file's parameters, like
property1=value1 - Since:
- Java 17+
- Author:
- Kimi Liu
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionIniPropertyImpl(String key, String value, int lineNumber) IniPropertyImpl(String key, String value, String originalValue, int lineNumber) IniPropertyImpl(IniSection section, String key, String value, int lineNumber) IniProperty constructorIniPropertyImpl(IniSection section, String key, String value, String originalValue, int lineNumber) IniProperty constructor -
Method Summary
Modifier and TypeMethodDescriptionvoidchange key value.default ini property's comment is null.getKey()get keysection getter.key()get key valueprotected StringkeyChanged(String newKey) when key changed, get the new originalValue.set a new Key.voidsetSection(IniSection section) section setter.protected StringvalueChanged(String newValue) when value changed, update originalValue.Methods inherited from class org.aoju.bus.setting.magic.AbstractElement
changeValue, charAt, clearComment, getOriginalValue, length, line, setOriginalValue, setValue, subSequence, toCompleteString, toNoCommentString, toString, trim, valueMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.CharSequence
charAt, chars, codePoints, isEmpty, length, subSequenceMethods inherited from interface org.aoju.bus.setting.magic.IniElement
clearComment, getCommentOptional, getOriginalValue, isComment, isProperty, isSection, line, setValue, setValue, toCompleteString, toNoCommentString, toString, valueMethods inherited from interface org.aoju.bus.setting.magic.IniProperty
getValue
-
Constructor Details
-
IniPropertyImpl
public IniPropertyImpl(IniSection section, String key, String value, String originalValue, int lineNumber) IniProperty constructor- Parameters:
section- property sectionkey- the property's key, not nullvalue- the property's value, null ableoriginalValue- the original value of this property linelineNumber- line number
-
IniPropertyImpl
-
IniPropertyImpl
IniProperty constructor- Parameters:
section- property sectionkey- the property's key, not nullvalue- the property's value, null ablelineNumber- line number
-
IniPropertyImpl
-
-
Method Details
-
getSection
Description copied from interface:IniPropertysection getter.- Specified by:
getSectionin interfaceIniProperty- Returns:
- from section
-
setSection
Description copied from interface:IniPropertysection setter.- Specified by:
setSectionin interfaceIniProperty- Parameters:
section- from section
-
key
Description copied from interface:IniPropertyget key value- Specified by:
keyin interfaceIniProperty- Returns:
- String field: key
-
changeKey
Description copied from interface:IniPropertychange key value.- Specified by:
changeKeyin interfaceIniProperty- Parameters:
newKey- new key.
-
setKey
Description copied from interface:IniPropertyset a new Key.- Specified by:
setKeyin interfaceIniProperty- Parameters:
newKey- new Key- Returns:
- old value.
-
keyChanged
-
valueChanged
when value changed, update originalValue.- Specified by:
valueChangedin classAbstractElement- Parameters:
newValue- whenvaluechanges, likeAbstractElement.setValue(String)orIniElement.setValue(Function)- Returns:
- new originalValue
-
getComment
default ini property's comment is null. there may be comments at the end of each element. or null. if this element is comment, return itself. so, nullable, or seeIniElement.getCommentOptional().- Specified by:
getCommentin interfaceIniElement- Overrides:
getCommentin classAbstractElement- Returns:
- comment end of the element or null. if element, return itself.
- See Also:
-
getKey
Description copied from interface:IniPropertyget key
-