/** * Returns a list of integer values for which select() would return that keyword, * or null if the keyword is not defined. The returned collection is unmodifiable. * The returned list is not complete, and there might be additional values that * would return the keyword. * * @param keyword the keyword to test * @return a list of values matching the keyword. * @stable ICU 4.8 */ public Collection<Double> getSamples(String keyword) { return getSamples(keyword, SampleType.INTEGER); }
/** * Returns all the values that trigger this keyword, or null if the number of such * values is unlimited. * * @param keyword the keyword * @param type the type of samples requested, INTEGER or DECIMAL * @return the values that trigger this keyword, or null. The returned collection * is immutable. It will be empty if the keyword is not defined. * * @internal * @deprecated This API is ICU internal only. */ @Deprecated public Collection<Double> getAllKeywordValues(String keyword, SampleType type) { if (!isLimited(keyword, type)) { return null; } Collection<Double> samples = getSamples(keyword, type); return samples == null ? null : Collections.unmodifiableCollection(samples); }
Collection<Double> values = getSamples(keyword, sampleType);