All Downloads are FREE. Search and download functionalities are using the official Maven repository.

de.larssh.utils.text.SplitLimit Maven / Gradle / Ivy

// Generated by delombok at Fri Dec 30 22:57:48 UTC 2022
package de.larssh.utils.text;

import static de.larssh.utils.Finals.constant;

/**
 * {@link String#split(String)} and
 * {@link java.util.regex.Pattern#split(CharSequence)} should not be used as
 * trailing empty strings are discarded. That might be confusing.
 *
 * 

* Use {@link java.util.regex.Pattern#split(CharSequence, int)} instead and * think about the {@code limit} parameter. Use {@link #NO_LIMIT} to not strip * empty trailing strings. */ @SuppressWarnings("PMD.ClassNamingConventions") public final class SplitLimit { /** * No limit. Empty trailing strings are kept. * *

* This value is meant to be used by either * {@link java.util.regex.Pattern#split(CharSequence, int)} or * {@link String#split(String, int)}. */ public static final int NO_LIMIT = constant(-1); /** * No limit and strip empty trailing strings. * *

* This value is meant to be used by either * {@link java.util.regex.Pattern#split(CharSequence, int)} or * {@link String#split(String, int)}. */ public static final int NO_LIMIT_AND_STRIP_EMPTY_TRAILING = constant(0); @java.lang.SuppressWarnings("all") @edu.umd.cs.findbugs.annotations.SuppressFBWarnings(justification = "generated code") @lombok.Generated private SplitLimit() { throw new java.lang.UnsupportedOperationException("This is a utility class and cannot be instantiated"); } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy