Io

Framework Components [com.onepg.util]

← Back to Class List

Class Information

Package: com.onepg.util

Class Name: Io

Extends: AbstractIoTypeMap

Description

Input/output map class.
  • A map class that provides value retrieval methods and value storage methods for each type.
  • Internally stores values as strings.
  • Preserves the storage order of values.
  • Provides versatility by extending Map<String, String>.
  • Can be made read-only by specifying a constructor argument.
  • Basic rules and restrictions:
    • Characters that can be used as keys are limited to lowercase letters, numbers, underscores, hyphens, and dots only.
      (Only characters that can be used in JSON, and letters are unified to lowercase to eliminate DBMS differences)
    • In principle, value retrieval methods do not return null.
    • If you want to retrieve null, use an explicit method such as #getStringNullable(String).
    • In principle, value retrieval with a non-existent key results in a runtime error.
    • When retrieving a value with a key that may not exist, check existence in advance using #containsKey(Object), or retrieve using an explicit method such as #getStringOrDefault(String, String) that specifies a return value for non-existent keys.
    • Storing with an already existing key results in a runtime error.
    • When storing a value with a key that may already exist, use an explicit method such as #putForce(String, String).
    • When explicitly storing null, use an explicit method such as #putNull(String).
    • Unlike normal maps, the results of #keySet(), #entrySet(), and #values() are read-only.
      (Keys are managed separately internally, and removal from the results would break consistency)
    • Timestamps are stored with up to 6 decimal places.

  • Can store string lists.
  • Can store nested variable type maps.
  • Can store multiple rows of variable type maps in a list.
  • Can store string arrays (lists) in a list.
  • The above data structures are deep copied at both storage and retrieval time.
  • Can hold session data shared between the server and web pages.
  • Can hold messages for display on web pages.
  • Can input and output JSON.
  • Can input and output URL parameters.
  • The basic rules and restrictions conform to AbstractIoTypeMap.
  • About string lists
    • Handled through **List methods such as #getList(String), #putList(String, List), #containsKeyList(String), #removeList(String).
    • String lists are not included in the results of #size(), #containsKey(Object), #keySet(), etc., which the map class has.
      However, #clear() also clears the storage of string lists.
    • Adding elements to the list retrieved from #getList(String) does not affect the list held by this class.
    • Adding elements to the original list stored with #putList(String, List) does not affect the list held by this class.
    • String lists are not targets for CSV output.
    • Be careful of string length for URL parameters that include string lists.
    • Performance may degrade in processing that repeatedly stores and retrieves lists or handles large-sized lists because deep copying is performed.
  • About nested maps
    • Handled through **Nest methods such as #getNest(String), #putNest(String, Map), #containsKeyNest(String), #removeNest(String).
    • Nested maps are not included in the results of #size(), #containsKey(Object), #keySet(), etc., which the map class has.
      However, #clear() also clears the storage of nested maps.
    • Adding elements to the map retrieved from #getNest(String) does not affect the map held by this class.
    • Adding elements to the original map stored with #putNest(String, List) does not affect the map held by this class.
    • Nested maps are not targets for CSV output or URL parameter output.
    • Performance may degrade in processing that repeatedly stores and retrieves lists or handles large-sized lists because deep copying is performed.
  • About multiple rows lists
    • Handled through **Rows methods such as #getRows(String), #putRows(String, Collection), #containsKeyRows(String), #removeRows(List).
    • Multiple rows lists are not included in the results of #size(), #containsKey(Object), #keySet(), etc., which the map class has.
      However, #clear() also clears the storage of multiple rows lists.
    • Adding elements to the list retrieved from #getRows(String) does not affect the list held by this class.
    • Adding elements to the original list stored with #putRows(String, Collection) does not affect the list held by this class.
    • Multiple rows lists are not targets for CSV output or URL parameter output.
    • Performance may degrade in processing that repeatedly stores and retrieves lists or handles large-sized lists because deep copying is performed.
  • About array lists
    • Handled through **Arys methods such as #getArys(String), #putArys(String, Collection), #containsKeyArys(String), #removeArys(List).
    • Array lists are not included in the results of #size(), #containsKey(Object), #keySet(), etc., which the map class has.
      However, #clear() also clears the storage of array lists.
    • Adding elements to the list retrieved from #getArys(String) does not affect the list held by this class.
    • Adding elements to the original list stored with #putArys(String, Collection) does not affect the list held by this class.
    • Array lists are not targets for CSV output or URL parameter output.
    • Performance may degrade in processing that repeatedly stores and retrieves lists or handles large-sized lists because deep copying is performed.
  • Arrays of 4 or more layers (dimensions) in JSON are not supported.
    • { [ [ ] ] } is supported. → array list
    • { [ { } ] } is supported. → multiple rows list
    • { [ [ [ ] ] ] } is not supported.
    • { [ [ { } ] ] } is not supported.
  • About session data
    • Operations on session data directly affect the data held by this instance.
    • Session data is also stored when loading JSON.
    • Session data is also output when creating JSON.
    • The key for JSON input/output is fixed to _session.
  • About messages
    • Can hold message IDs and target item names, and messages are also output when creating JSON.
    • The key for JSON creation is fixed to _msg. The error flag is fixed to _has_err.
    • When creating JSON, by passing the message text (message definitions) as an argument, the text corresponding to the held message IDs is also output.
    • {0}, {1}, ... in the message text are replaced with strings passed as arguments when adding messages.

Enumeration List

MsgType

public enum MsgType
Message type.

Constants

  • ERROR
  • WARN
  • INFO

Method List

getString (Inherited Method)

public String getString(String key)
Retrieves a string.
  • Retrieving a value with a non-existent key results in a runtime error.
  • When retrieving a value with a key that may not exist, check existence in advance using #containsKey(Object).
  • If the stored value is null, returns an empty string. (Does not return null)
  • If you want to retrieve null, retrieve using #getStringNullable(String).

Parameters

Name Type Description
key String the key (lowercase letters, numbers, underscores, hyphens, and dots only)

Return Value

String - the string

getStringOrDefault (Inherited Method)

public String getStringOrDefault(String key, String notExistsValue)
Retrieves a string.
  • If the key does not exist, the non-existent return value from the argument is returned.
  • If the stored value is null, returns an empty string. (Does not return null)
  • If you want to retrieve null, retrieve using #getStringNullableOrDefault(String, String).

Parameters

Name Type Description
key String the key (lowercase letters, numbers, underscores, hyphens, and dots only)
notExistsValue String the return value when the key does not exist

Return Value

String - the string

getStringNullable (Inherited Method)

public String getStringNullable(String key)
Retrieves a string (nullable).
  • Retrieving a value with a non-existent key results in a runtime error.
  • When retrieving a value with a key that may not exist, check existence in advance using #containsKey(Object).

Parameters

Name Type Description
key String the key (lowercase letters, numbers, underscores, hyphens, and dots only)

Return Value

String - the string (nullable)

getStringNullableOrDefault (Inherited Method)

public String getStringNullableOrDefault(String key, String notExistsValue)
Retrieves a string (nullable).
  • If the key does not exist, the non-existent return value from the argument is returned.

Parameters

Name Type Description
key String the key
notExistsValue String the return value when the key does not exist

Return Value

String - the string (nullable)

getBigDecimal (Inherited Method)

public BigDecimal getBigDecimal(String key)
Retrieves a numeric value.
  • Retrieving a value with a non-existent key results in a runtime error.
  • When retrieving a value with a key that may not exist, check existence in advance using #containsKey(Object).
  • If the stored value is null, returns zero. (Does not return null)
  • If you want to retrieve null, retrieve using #getBigDecimalNullable(String).

Parameters

Name Type Description
key String the key (lowercase letters, numbers, underscores, hyphens, and dots only)

Return Value

BigDecimal - the numeric value

getBigDecimalOrDefault (Inherited Method)

public BigDecimal getBigDecimalOrDefault(String key, BigDecimal notExistsValue)
Retrieves a numeric value.
  • If the key does not exist, the non-existent return value from the argument is returned.
  • If the stored value is null, returns zero. (Does not return null)
  • If you want to retrieve null, retrieve using #getBigDecimalNullableOrDefault(String).

Parameters

Name Type Description
key String the key (lowercase letters, numbers, underscores, hyphens, and dots only)
notExistsValue BigDecimal the return value when the key does not exist

Return Value

BigDecimal - the numeric value

getBigDecimalNullable (Inherited Method)

public BigDecimal getBigDecimalNullable(String key)
Retrieves a numeric value (nullable).
  • Retrieving a value with a non-existent key results in a runtime error.
  • When retrieving a value with a key that may not exist, check existence in advance using #containsKey(Object).

Parameters

Name Type Description
key String the key (lowercase letters, numbers, underscores, hyphens, and dots only)

Return Value

BigDecimal - the numeric value (nullable)

getBigDecimalNullableOrDefault (Inherited Method)

public BigDecimal getBigDecimalNullableOrDefault(String key, BigDecimal notExistsValue)
Retrieves a numeric value (nullable).
  • If the key does not exist, the non-existent return value from the argument is returned.

Parameters

Name Type Description
key String the key
notExistsValue BigDecimal the return value when the key does not exist

Return Value

BigDecimal - the numeric value (nullable)

getInt (Inherited Method)

public int getInt(String key)
Retrieves an int value.
  • Retrieving a value with a non-existent key results in a runtime error.
  • When retrieving a value with a key that may not exist, check existence in advance using #containsKey(Object).
  • If the stored value is null, returns zero.
  • If the value is outside the int range, throws an exception error.

Parameters

Name Type Description
key String the key (lowercase letters, numbers, underscores, hyphens, and dots only)

Return Value

int - the int value

getIntOrDefault (Inherited Method)

public int getIntOrDefault(String key, int notExistsValue)
Retrieves an int value.
  • If the key does not exist, the non-existent return value from the argument is returned.
  • If the stored value is null, returns zero.
  • If the value is outside the int range, throws an exception error.

Parameters

Name Type Description
key String the key (lowercase letters, numbers, underscores, hyphens, and dots only)
notExistsValue int the return value when the key does not exist

Return Value

int - the int value

getLong (Inherited Method)

public long getLong(String key)
Retrieves a long value.
  • Retrieving a value with a non-existent key results in a runtime error.
  • When retrieving a value with a key that may not exist, check existence in advance using #containsKey(Object).
  • If the stored value is null, returns zero.
  • If the value is outside the long range, throws an exception error.

Parameters

Name Type Description
key String the key (lowercase letters, numbers, underscores, hyphens, and dots only)

Return Value

long - the long value

getLongOrDefault (Inherited Method)

public long getLongOrDefault(String key, long notExistsValue)
Retrieves a long value.
  • If the key does not exist, the non-existent return value from the argument is returned.
  • If the stored value is null, returns zero.
  • If the value is outside the long range, throws an exception error.

Parameters

Name Type Description
key String the key (lowercase letters, numbers, underscores, hyphens, and dots only)
notExistsValue long the return value when the key does not exist

Return Value

long - the long value

getDateNullable (Inherited Method)

public LocalDate getDateNullable(String key)
Retrieves a date (nullable).
  • Retrieving a value with a non-existent key results in a runtime error.
  • When retrieving a value with a key that may not exist, check existence in advance using #containsKey(Object).
  • If date conversion fails, throws an exception error.

Parameters

Name Type Description
key String the key (lowercase letters, numbers, underscores, hyphens, and dots only)

Return Value

LocalDate - the date (nullable)

getDateNullableOrDefault (Inherited Method)

public LocalDate getDateNullableOrDefault(String key, LocalDate notExistsValue)
Retrieves a date (nullable).
  • If the key does not exist, the non-existent return value from the argument is returned.
  • If date conversion fails, throws an exception error.

Parameters

Name Type Description
key String the key
notExistsValue LocalDate the return value when the key does not exist

Return Value

LocalDate - the date (nullable)

getDateTimeNullable (Inherited Method)

public LocalDateTime getDateTimeNullable(String key)
Retrieves a date-time (nullable).
  • Retrieving a value with a non-existent key results in a runtime error.
  • When retrieving a value with a key that may not exist, check existence in advance using #containsKey(Object).
  • If date-time conversion fails, throws an exception error.

Parameters

Name Type Description
key String the key (lowercase letters, numbers, underscores, hyphens, and dots only)

Return Value

LocalDateTime - the date-time (nullable)

getDateTimeNullableOrDefault (Inherited Method)

public LocalDateTime getDateTimeNullableOrDefault(String key, LocalDateTime notExistsValue)
Retrieves a date-time (nullable).
  • If the key does not exist, the non-existent return value from the argument is returned.
  • If date-time conversion fails, throws an exception error.

Parameters

Name Type Description
key String the key
notExistsValue LocalDateTime the return value when the key does not exist

Return Value

LocalDateTime - the date-time (nullable)

getBoolean (Inherited Method)

public boolean getBoolean(String key)
Retrieves a boolean value.
  • Retrieving a value with a non-existent key results in a runtime error.
  • When retrieving a value with a key that may not exist, check existence in advance using #containsKey(Object).
  • Boolean value evaluation conforms to ValUtil.isTrue(String).

Parameters

Name Type Description
key String the key (lowercase letters, numbers, underscores, hyphens, and dots only)

Return Value

boolean - the boolean value

getBooleanOrDefault (Inherited Method)

public boolean getBooleanOrDefault(String key, boolean notExistsValue)
Retrieves a boolean value.
  • If the key does not exist, the non-existent return value from the argument is returned.
  • Value evaluation conforms to ValUtil.isTrue(String).

Parameters

Name Type Description
key String the key
notExistsValue boolean the return value when the key does not exist

Return Value

boolean - the boolean value

putNull (Inherited Method)

public String putNull(String key)
Stores null.

Parameters

Name Type Description
key String the key (lowercase letters, numbers, underscores, hyphens, and dots only)

Return Value

String - the previously stored string

putNullForce (Inherited Method)

public String putNullForce(String key)
Stores null (allows overwriting).

Parameters

Name Type Description
key String the key (lowercase letters, numbers, underscores, hyphens, and dots only)

Return Value

String - the previously stored string

put (Inherited Method)

public String put(String key, String value)
Stores a string.
  • Storing with an already existing key results in a runtime error.
  • When storing a value with a key that may already exist, store using #putForce(String, String).

Parameters

Name Type Description
key String the key (lowercase letters, numbers, underscores, hyphens, and dots only)
value String the value

Return Value

String - the previously stored string

put (Inherited Method)

public String put(String key, BigDecimal value)
Stores a numeric value.
  • Storing with an already existing key results in a runtime error.
  • When storing a value with a key that may already exist, store using #putForce(String, BigDecimal).

Parameters

Name Type Description
key String the key (lowercase letters, numbers, underscores, hyphens, and dots only)
value BigDecimal the numeric value

Return Value

String - the previously stored string

put (Inherited Method)

public String put(String key, int value)
Stores an int value.
  • Storing with an already existing key results in a runtime error.
  • When storing a value with a key that may already exist, store using #putForce(String, int).

Parameters

Name Type Description
key String the key (lowercase letters, numbers, underscores, hyphens, and dots only)
value int the int value

Return Value

String - the previously stored string

put (Inherited Method)

public String put(String key, long value)
Stores a long value.
  • Storing with an already existing key results in a runtime error.
  • When storing a value with a key that may already exist, store using #putForce(String, long).

Parameters

Name Type Description
key String the key (lowercase letters, numbers, underscores, hyphens, and dots only)
value long the long value

Return Value

String - the previously stored string

put (Inherited Method)

public String put(String key, LocalDate value)
Stores a date.
  • Storing with an already existing key results in a runtime error.
  • When storing a value with a key that may already exist, store using #putForce(String, LocalDate).

Parameters

Name Type Description
key String the key (lowercase letters, numbers, underscores, hyphens, and dots only)
value LocalDate the date

Return Value

String - the previously stored string

put (Inherited Method)

public String put(String key, LocalDateTime value)
Stores a date-time.
  • Storing with an already existing key results in a runtime error.
  • When storing a value with a key that may already exist, store using #putForce(String, LocalDateTime).

Parameters

Name Type Description
key String the key (lowercase letters, numbers, underscores, hyphens, and dots only)
value LocalDateTime the date-time

Return Value

String - the previously stored string

put (Inherited Method)

public String put(String key, java.util.Date value)
Stores a UTIL date.
  • Storing with an already existing key results in a runtime error.
  • When storing a value with a key that may already exist, store using #putForce(String, java.util.Date).

Parameters

Name Type Description
key String the key (lowercase letters, numbers, underscores, hyphens, and dots only)
value java.util.Date the date (including java.sql.Date)

Return Value

String - the previously stored string

put (Inherited Method)

public String put(String key, java.sql.Timestamp value)
Stores an SQL timestamp.
  • Storing with an already existing key results in a runtime error.
  • When storing a value with a key that may already exist, store using #putForce(String, java.sql.Timestamp).

Parameters

Name Type Description
key String the key (lowercase letters, numbers, underscores, hyphens, and dots only)
value java.sql.Timestamp the timestamp

Return Value

String - the previously stored string

put (Inherited Method)

public String put(String key, boolean value)
Stores a boolean value.
  • Storing with an already existing key results in a runtime error.
  • When storing a value with a key that may already exist, store using #putForce(String, boolean).

Parameters

Name Type Description
key String the key (lowercase letters, numbers, underscores, hyphens, and dots only)
value boolean the boolean value

Return Value

String - the previously stored string

putForce (Inherited Method)

public String putForce(String key, String value)
Stores a string (allows overwriting).

Parameters

Name Type Description
key String the key (lowercase letters, numbers, underscores, hyphens, and dots only)
value String the value

Return Value

String - the previously stored string

putForce (Inherited Method)

public String putForce(String key, BigDecimal value)
Stores a numeric value (allows overwriting).

Parameters

Name Type Description
key String the key (lowercase letters, numbers, underscores, hyphens, and dots only)
value BigDecimal the numeric value

Return Value

String - the previously stored string

putForce (Inherited Method)

public String putForce(String key, int value)
Stores an int value (allows overwriting).

Parameters

Name Type Description
key String the key (lowercase letters, numbers, underscores, hyphens, and dots only)
value int the int value

Return Value

String - the previously stored string

putForce (Inherited Method)

public String putForce(String key, long value)
Stores a long value (allows overwriting).

Parameters

Name Type Description
key String the key (lowercase letters, numbers, underscores, hyphens, and dots only)
value long the long value

Return Value

String - the previously stored string

putForce (Inherited Method)

public String putForce(String key, LocalDate value)
Stores a date (allows overwriting).

Parameters

Name Type Description
key String the key (lowercase letters, numbers, underscores, hyphens, and dots only)
value LocalDate the date

Return Value

String - the previously stored string

putForce (Inherited Method)

public String putForce(String key, LocalDateTime value)
Stores a date-time (allows overwriting).

Parameters

Name Type Description
key String the key (lowercase letters, numbers, underscores, hyphens, and dots only)
value LocalDateTime the date-time

Return Value

String - the previously stored string

putForce (Inherited Method)

public String putForce(String key, java.util.Date value)
Stores a UTIL date (allows overwriting).

Parameters

Name Type Description
key String the key (lowercase letters, numbers, underscores, hyphens, and dots only)
value java.util.Date the date (including java.sql.Date)

Return Value

String - the previously stored string

putForce (Inherited Method)

public String putForce(String key, java.sql.Timestamp value)
Stores an SQL timestamp (allows overwriting).

Parameters

Name Type Description
key String the key (lowercase letters, numbers, underscores, hyphens, and dots only)
value java.sql.Timestamp the timestamp

Return Value

String - the previously stored string

putForce (Inherited Method)

public String putForce(String key, boolean value)
Stores a boolean value (allows overwriting).

Parameters

Name Type Description
key String the key (lowercase letters, numbers, underscores, hyphens, and dots only)
value boolean the boolean value

Return Value

String - the previously stored string

putAll (Inherited Method)

public void putAll(Map<? extends String, ? extends String> map)
Stores all values.
  • Storing with an already existing key results in a runtime error.
  • If keys that may already exist are included, use #putAllForce(Map).

Parameters

Name Type Description
map Map<? extends String, ? extends String> the map

putAllForce (Inherited Method)

public void putAllForce(Map<? extends String, ? extends String> map)
Stores all values (allows overwriting).

Parameters

Name Type Description
map Map<? extends String, ? extends String> the map

size (Inherited Method)

public int size()
Retrieves the map size.

Return Value

int - the map size

isEmpty (Inherited Method)

public boolean isEmpty()
Determines if the map is empty.

Return Value

boolean - true if the map is empty

containsKey (Inherited Method)

public boolean containsKey(Object key)
Checks if a map key exists.

Parameters

Name Type Description
key Object the key (lowercase letters, numbers, underscores, hyphens, and dots only)

Return Value

boolean - true if the key exists

containsValue (Inherited Method)

public boolean containsValue(Object value)
Checks if the map contains a value.

Parameters

Name Type Description
value Object the value

Return Value

boolean - true if the value exists

remove (Inherited Method)

public String remove(Object key)
Removes a map value.

Parameters

Name Type Description
key Object the key (lowercase letters, numbers, underscores, hyphens, and dots only)

Return Value

String - the removed value

clear (Inherited Method)

public void clear()
Clears the map.
  • The clear method is prohibited to prevent easy reuse of instances.
  • Please create a new instance instead of clearing.

keySet (Inherited Method)

public Set<String> keySet()
Retrieves the key set.
  • Made read-only because removal would break internal consistency.

Return Value

Set<String> - the key set

values (Inherited Method)

public Collection<String> values()
Retrieves the value collection.
  • Made read-only because removal would break internal consistency.

Return Value

Collection<String> - the value collection

entrySet (Inherited Method)

public Set<Entry<String, String>> entrySet()
Retrieves the entry set.
  • Made read-only because removal would break internal consistency.

Return Value

Set<Entry<String, String>> - the entry set

equals (Inherited Method)

public boolean equals(Object obj)
Compares for equality.
  • Determines equality if the contents are identical.

Parameters

Name Type Description
obj Object the object to compare

Return Value

boolean - true if the contents are identical

hashCode (Inherited Method)

public int hashCode()
Retrieves the hash code.

Return Value

int - the hash code

session

public AbstractIoTypeMap session()
References session data.
  • Since this method returns a reference without performing a deep copy, operations on the return value directly affect the session data held by this instance.

Return Value

AbstractIoTypeMap - the session data (reference)

getList

public List<String> getList(String key)
Retrieves the string list.
  • Retrieving a value with a non-existent key results in a runtime error.
  • If retrieving a value with a key that may not exist, check its existence in advance with #containsKeyList(String).
  • If the stored value is null, returns a size-zero list. (Does not return null)
  • Adding elements to the retrieved list does not affect the list held by this class. (Deep copy occurs)
  • Performance may degrade when handling large-sized lists or repeatedly storing and retrieving lists.

Parameters

Name Type Description
key String key (lowercase letters, numbers, underscores, hyphens, and dots only)

Return Value

List<String> - string list

putList

public List<String> putList(String key, List<String> list)
Stores the string list.
  • Storage with an already existing key results in a runtime error.
  • If storing a value with a key that may already exist, use #putListForce(String, List) for storage.
  • Adding elements to the original list after storage does not affect the list held by this class. (Deep copy occurs)
  • Performance may degrade when handling large-sized lists or repeatedly storing and retrieving lists.

Parameters

Name Type Description
key String key (lowercase letters, numbers, underscores, hyphens, and dots only)
list List<String> string list

Return Value

List<String> - the previously stored string list

putListForce

public List<String> putListForce(String key, List<String> list)
Stores the string list (overwrite allowed).
  • Adding elements to the original list after storage does not affect the list held by this class. (Deep copy occurs)
  • Performance may degrade when handling large-sized lists or repeatedly storing and retrieving lists.

Parameters

Name Type Description
key String key (lowercase letters, numbers, underscores, hyphens, and dots only)
list List<String> string list

Return Value

List<String> - the previously stored string list

getNest

public Io getNest(String key)
Retrieves the nested map.
  • Retrieving a value with a non-existent key results in a runtime error.
  • If retrieving a value with a key that may not exist, check its existence in advance with #containsKeyNest(String).
  • If the stored value is null, returns a size-zero map. (Does not return null)
  • Adding elements to the retrieved map does not affect the map held by this class. (Deep copy occurs)
  • Performance may degrade when handling large-sized maps or repeatedly storing and retrieving maps.

Parameters

Name Type Description
key String key (lowercase letters, numbers, underscores, hyphens, and dots only)

Return Value

Io - nested map

putNest

public Io putNest(String key, Io nest)
Stores the nested map.
  • Storage with an already existing key results in a runtime error.
  • If storing a value with a key that may already exist, use #putNestForce(String, Nest) for storage.
  • Adding elements to the original map after storage does not affect the map held by this class. (Deep copy occurs)
  • Performance may degrade when handling large-sized maps or repeatedly storing and retrieving maps.

Parameters

Name Type Description
key String key (lowercase letters, numbers, underscores, hyphens, and dots only)
nest Io nested map

Return Value

Io - the previously stored nested map

putNestForce

public Io putNestForce(String key, Io nest)
Stores the nested map (overwrite allowed).
  • Adding elements to the original map after storage does not affect the map held by this class. (Deep copy occurs)
  • Performance may degrade when handling large-sized maps or repeatedly storing and retrieving maps.

Parameters

Name Type Description
key String key (lowercase letters, numbers, underscores, hyphens, and dots only)
nest Io nested map

Return Value

Io - the previously stored nested map

getRows

public IoRows getRows(String key)
Retrieves the multiple rows list.
  • Retrieving a value with a non-existent key results in a runtime error.
  • If retrieving a value with a key that may not exist, check its existence in advance with #containsKeyRows(String).
  • If the stored value is null, returns a size-zero list. (Does not return null)
  • Adding elements to the retrieved list does not affect the list held by this class. (Deep copy occurs)
  • Performance may degrade when handling large-sized lists or repeatedly storing and retrieving lists.

Parameters

Name Type Description
key String key (lowercase letters, numbers, underscores, hyphens, and dots only)

Return Value

IoRows - multiple rows list

putRows

public IoRows putRows(String key, Collection<? extends Map<? extends String, ? extends String>> rows)
Stores the multiple rows list.
  • Storage with an already existing key results in a runtime error.
  • If storing a value with a key that may already exist, use #putRowsForce(String, List) for storage.
  • Adding elements to the original list after storage does not affect the list held by this class. (Deep copy occurs)
  • Performance may degrade when handling large-sized lists or repeatedly storing and retrieving lists.

Parameters

Name Type Description
key String key (lowercase letters, numbers, underscores, hyphens, and dots only)
rows Collection<? extends Map<? extends String, ? extends String>> multiple rows list

Return Value

IoRows - the previously stored multiple rows list

putRowsForce

public IoRows putRowsForce(String key, Collection<? extends IoItems> rows)
Stores the multiple rows list (overwrite allowed).
  • Adding elements to the original list after storage does not affect the list held by this class. (Deep copy occurs)
  • Performance may degrade when handling large-sized lists or repeatedly storing and retrieving lists.

Parameters

Name Type Description
key String key (lowercase letters, numbers, underscores, hyphens, and dots only)
rows Collection<? extends IoItems> multiple rows list

Return Value

IoRows - the previously stored multiple rows list

getArys

public IoArrays getArys(String key)
Retrieves the array list.
  • Retrieving a value with a non-existent key results in a runtime error.
  • If retrieving a value with a key that may not exist, check its existence in advance with #containsKeyArys(String).
  • If the stored value is null, returns a size-zero list. (Does not return null)
  • Adding elements to the retrieved list does not affect the list held by this class. (Deep copy occurs)
  • Performance may degrade when handling large-sized lists or repeatedly storing and retrieving lists.

Parameters

Name Type Description
key String key (lowercase letters, numbers, underscores, hyphens, and dots only)

Return Value

IoArrays - array list

putArys

public IoArrays putArys(String key, Collection<? extends List<String>> arys)
Stores the array list.
  • Storage with an already existing key results in a runtime error.
  • If storing a value with a key that may already exist, use #putArysForce(String, List) for storage.
  • Adding elements to the original list after storage does not affect the list held by this class. (Deep copy occurs)
  • Performance may degrade when handling large-sized lists or repeatedly storing and retrieving lists.

Parameters

Name Type Description
key String key (lowercase letters, numbers, underscores, hyphens, and dots only)
arys Collection<? extends List<String>> array list

Return Value

IoArrays - the previously stored array list

putArysForce

public IoArrays putArysForce(String key, Collection<? extends List<String>> arys)
Stores the array list (overwrite allowed).
  • Adding elements to the original list after storage does not affect the list held by this class. (Deep copy occurs)
  • Performance may degrade when handling large-sized lists or repeatedly storing and retrieving lists.

Parameters

Name Type Description
key String key (lowercase letters, numbers, underscores, hyphens, and dots only)
arys Collection<? extends List<String>> array list

Return Value

IoArrays - the previously stored array list

createJson

public String createJson()
Creates JSON.

Return Value

String - JSON string

createJsonWithMsg

public String createJsonWithMsg(Map<String, String> msgTextMap)
Creates JSON with message.

Parameters

Name Type Description
msgTextMap Map<String, String> message text map<message ID, message text>

Return Value

String - JSON string

putAll

public void putAll(Io map)
Stores all values.
  • Storage with already existing keys results in a runtime error.
  • If keys that may already exist are included, use #putAllForce(Map) for storage.
  • Messages are also copied.

Parameters

Name Type Description
map Io input/output map

putAllForce

public void putAllForce(Io map)
Stores all values (overwrite allowed).

Parameters

Name Type Description
map Io input/output map

See Also

putAllByUrlParam

public int putAllByUrlParam(String url)
Stores URL parameter (the part after ? in the URL) values.
  • Storage with already existing keys results in a runtime error.

Parameters

Name Type Description
url String entire URL or URL parameters

Return Value

int - the number of stored parameters

putAllByJson

public int putAllByJson(String json)
Stores JSON.

Parameters

Name Type Description
json String JSON string

Return Value

int - the number of stored items

containsKeyList

public boolean containsKeyList(String key)
Checks if the string list key exists.

Parameters

Name Type Description
key String key (lowercase letters, numbers, underscores, hyphens, and dots only)

Return Value

boolean - true if exists

removeList

public List<String> removeList(String key)
Removes the string list.

Parameters

Name Type Description
key String key (lowercase letters, numbers, underscores, hyphens, and dots only)

Return Value

List<String> - the removed list

containsKeyNest

public boolean containsKeyNest(String key)
Checks if the nested map key exists.

Parameters

Name Type Description
key String key (lowercase letters, numbers, underscores, hyphens, and dots only)

Return Value

boolean - true if exists

removeNest

public Io removeNest(String key)
Removes the nested map.

Parameters

Name Type Description
key String key (lowercase letters, numbers, underscores, hyphens, and dots only)

Return Value

Io - the removed nested map

containsKeyRows

public boolean containsKeyRows(String key)
Checks if the multiple rows list key exists.

Parameters

Name Type Description
key String key (lowercase letters, numbers, underscores, hyphens, and dots only)

Return Value

boolean - true if exists

removeRows

public IoRows removeRows(String key)
Removes the multiple rows list.

Parameters

Name Type Description
key String key (lowercase letters, numbers, underscores, hyphens, and dots only)

Return Value

IoRows - the removed multiple rows list

containsKeyArys

public boolean containsKeyArys(String key)
Checks if the array list key exists.

Parameters

Name Type Description
key String key (lowercase letters, numbers, underscores, hyphens, and dots only)

Return Value

boolean - true if exists

removeArys

public IoArrays removeArys(String key)
Removes the array list.

Parameters

Name Type Description
key String key (lowercase letters, numbers, underscores, hyphens, and dots only)

Return Value

IoArrays - the removed array list

putMsg

public void putMsg(MsgType type, String msgId)
Adds a message.

Parameters

Name Type Description
type MsgType message type
msgId String message ID

putMsg

public void putMsg(MsgType type, String msgId, String[] replaceVals)
Adds a message.

Parameters

Name Type Description
type MsgType message type
msgId String message ID
replaceVals String[] replacement strings within message (optional)

putMsg

public void putMsg(MsgType type, String msgId, String itemId)
Adds a message.

Parameters

Name Type Description
type MsgType message type
msgId String message ID
itemId String target item ID (optional)

putMsg

public void putMsg(MsgType type, String msgId, String[] replaceVals, String itemId)
Adds a message.

Parameters

Name Type Description
type MsgType message type
msgId String message ID
replaceVals String[] replacement strings within message (optional)
itemId String target item ID (optional)

putMsg

public void putMsg(MsgType type, String msgId, String itemId, String rowListId, int rowIndex)
Adds a message.

Parameters

Name Type Description
type MsgType message type
msgId String message ID
itemId String target item ID (optional)
rowListId String row list ID (optional)
rowIndex int row index (optional)

putMsg

public void putMsg(MsgType type, String msgId, String[] replaceVals, String itemId, String rowListId, int rowIndex)
Adds a message.

Parameters

Name Type Description
type MsgType message type
msgId String message ID
replaceVals String[] replacement strings within message (optional)
itemId String target item ID (optional)
rowListId String row list ID (optional)
rowIndex int row index (optional)

hasMsg

public boolean hasMsg()
Checks if messages are stored.

Return Value

boolean - true if messages are stored

hasErrorMsg

public boolean hasErrorMsg()
Checks if error messages exist.

Return Value

boolean - true if error messages exist

clearMsg

public void clearMsg()
Clears messages.