UNPKG

turbocommons-ts

Version:

General purpose library that implements frequently used and generic software development tasks

53 lines (52 loc) 2.66 kB
/** * TurboCommons is a general purpose and cross-language library that implements frequently used and generic software development tasks. * * Website : -> https://turboframework.org/en/libs/turbocommons * License : -> Licensed under the Apache License, Version 2.0. You may not use this file except in compliance with the License. * License Url : -> http://www.apache.org/licenses/LICENSE-2.0 * CopyRight : -> Copyright 2015 Edertone Advanded Solutions (08211 Castellar del Vallès, Barcelona). http://www.edertone.com */ import { HashMapObject } from "./HashMapObject"; /** * Object that stores java properties file format data */ export declare class JavaPropertiesObject extends HashMapObject { /** * Create a JavaPropertiesObject instance. Java properties is a text file format that stores data * into text files with information that is arranged as key/value pairs. * For example: tag1=value1 * * @param string String containing the contents of a .properties Java file. * Note that string must be encoded with ISO-8859-1 and strictly follow the Java * properties file format (Otherwise results won't be correct). * * @see HashMapObject * @return The java properties object with data accessible as key/value pairs. */ constructor(string?: string); /** * Tells if the given value contains valid Java Properties data information or not * * @param value A value to check (a string or a JavaPropertiesObject instance) * * @return true if the given value contains valid Java Properties data, false otherwise */ static isJavaProperties(value: any): boolean; /** * Check if the provided java properties is identical to this instance * Only data is compared: Any comment that is found on both provided properties will be ignored. * * @param properties java properties value to compare (a string or a JavaPropertiesObject instance) * @param strictOrder If set to true, both properties elements must have the same keys with the same order. Otherwise differences in key sorting will be accepted * * @return true if both java properties data is exactly the same, false if not */ isEqualTo(properties: any, strictOrder?: boolean): boolean; /** * Generate the textual representation for the java properties data stored on this object. * The output of this method is ready to be stored on a physical .properties file. * * @return A valid Java .properties string ready to be stored on a .properties file */ toString(): string; }