Class ConstantQueryHandler
java.lang.Object
com.winterhavenmc.library.messagebuilder.query.ConstantQueryHandler
- All Implemented Interfaces:
QueryHandler<ConstantRecord>
Query handler for the 'CONSTANTS' section of the language file.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
Query the constants section of the language file for anint
with the keyPathStub method until implementedQuery the constants section of the language file for a String with keyPathgetStringList
(RecordKey key) Query the constants section of the language file for a List of String with the keyPath
-
Constructor Details
-
ConstantQueryHandler
Class constructor- Throws:
ValidationException
- if theyamlConfigurationSupplier
parameter is null or invalid
-
-
Method Details
-
getString
Query the constants section of the language file for a String with keyPath- Parameters:
key
- the keyPath of the String to be retrieved- Returns:
- an
Optional
String containing the String retrieved with keyPath, or an empty Optional if no value was found for the keyPath
-
getStringList
Query the constants section of the language file for a List of String with the keyPath- Parameters:
key
- the keyPath of the List to be retrieved- Returns:
- a
List
of String containing the values retrieved using keyPath, or an empty List if no value was found for the keyPath
-
getInt
Query the constants section of the language file for anint
with the keyPath- Parameters:
key
- the keyPath of theint
to be retrieved- Returns:
int
containing the values retrieved using keyPath, or zero (0) if no value was found for the keyPath
-
getRecord
Stub method until implemented- Specified by:
getRecord
in interfaceQueryHandler<ConstantRecord>
- Parameters:
key
- the record key- Returns:
- a ConstantRecord
-