Tabnine Logo
StringUtility.nullIfEmpty
Code IndexAdd Tabnine to your IDE (free)

How to use
nullIfEmpty
method
in
com.aoindustries.util.StringUtility

Best Java code snippets using com.aoindustries.util.StringUtility.nullIfEmpty (Showing top 17 results out of 315)

origin: com.semanticcms/semanticcms-core-taglib

public void setShortTitle(String shortTitle) {
  this.shortTitle = StringUtility.nullIfEmpty(shortTitle);
}
origin: com.semanticcms/semanticcms-core-taglib

public void setBook(String book) {
  this.book = nullIfEmpty(book);
}
origin: com.semanticcms/semanticcms-core-taglib

public void setPath(String path) {
  this.path = nullIfEmpty(path);
}
origin: com.aoindustries/aocode-public

/**
 * Removes the milliseconds from a time, rounds down every time.
 */
public static int negIntIfEmpty(String s) {
  s = StringUtility.nullIfEmpty(s);
  return (s==null?-1:Integer.parseInt(s));
}
origin: com.aoindustries/aocode-public

/**
 * @deprecated  Use {@link StringUtility#nullIfEmpty(java.lang.String)} instead
 */
@Deprecated
public static String nullIfEmpty(String value) {
  return StringUtility.nullIfEmpty(value);
}
origin: com.aoindustries/aocode-public

/**
 * Removes the milliseconds from a time, rounds down every time.
 */
public static long negLongIfEmpty(String s) {
  s = StringUtility.nullIfEmpty(s);
  return (s==null?-1l:Long.parseLong(s));
}
origin: com.semanticcms/semanticcms-news-model

public void setDescription(String description) {
  checkNotFrozen();
  this.description = nullIfEmpty(description);
}
origin: com.semanticcms/semanticcms-news-model

public void setBook(String book) {
  checkNotFrozen();
  this.book = nullIfEmpty(book);
}
origin: com.semanticcms/semanticcms-news-model

public void setTargetPage(String targetPage) {
  checkNotFrozen();
  this.targetPage = nullIfEmpty(targetPage);
}
origin: com.semanticcms/semanticcms-news-model

public void setElement(String element) {
  checkNotFrozen();
  this.element = nullIfEmpty(element);
}
origin: com.semanticcms/semanticcms-news-model

public void setView(String view) {
  checkNotFrozen();
  this.view = nullIfEmpty(view);
}
origin: com.semanticcms/semanticcms-news-model

public void setTitle(String title) {
  checkNotFrozen();
  this.title = nullIfEmpty(title);
}
origin: com.semanticcms/semanticcms-section-model

public void setLabel(String label) {
  checkNotFrozen();
  this.label = nullIfEmpty(label);
}
origin: com.semanticcms/semanticcms-core-taglib

/**
 * Resolves all attributes, setting into the created element as appropriate,
 * This is only called for captureLevel >= META.
 * Attributes are resolved before the element is added to any parent node.
 * Typically, deferred expressions will be evaluated here.
 * Overriding methods must call this implementation.
 */
protected void evaluateAttributes(E element, ELContext elContext) throws JspTagException, IOException {
  String idStr = nullIfEmpty(resolveValue(id, String.class, elContext));
  if(idStr != null) element.setId(idStr);
}
origin: com.semanticcms/semanticcms-core-servlet

public static interface LinkImplBody<E extends Throwable> {
  void doBody(boolean discard) throws E, IOException, SkipPageException;
}
origin: com.semanticcms/semanticcms-core-servlet

book = nullIfEmpty(book);
NullArgumentException.checkNotNull(path, "path");
if(path.isEmpty()) throw new IllegalArgumentException("path is empty");
origin: com.semanticcms/semanticcms-core-servlet

final Node currentNode = CurrentNode.getCurrentNode(request);
thisBook = nullIfEmpty(thisBook);
thisPage = nullIfEmpty(thisPage);
linksToBook = nullIfEmpty(linksToBook);
linksToPage = nullIfEmpty(linksToPage);
com.aoindustries.utilStringUtilitynullIfEmpty

Javadoc

Returns null if the string is null or empty.

Popular methods of StringUtility

  • join
    Joins the string representation of objects on the provided delimiter. The iteration will be performe
  • splitString
    Splits a String into a String[].
  • getApproximateSize
    Gets the approximate size (where k=1024) of a file in this format: x byte(s) xx bytes xxx bytes x.x
  • splitStringCommaSpace
    Splits a string into multiple words on either whitespace or commas
  • convertToHex
  • getDecimalTimeLengthString
  • replace
    Replaces all occurrences of a String with a String.
  • splitLines
    Splits a String into lines on any '\n' characters. Also removes any ending '\r' characters if presen
  • compareToDDMMYYYY0
  • compareToIgnoreCaseCarefulEquals
    Compares two strings in a case insensitive manner. However, if they are considered equals in the cas
  • convertStringDateToTime
  • countOccurrences
    Counts how many times a word appears in a line. Case insensitive matching.
  • convertStringDateToTime,
  • countOccurrences,
  • getDateString,
  • getHex,
  • getHexChar,
  • getTimeLengthString,
  • indexOf,
  • leapYear,
  • wordWrap

Popular in Java

  • Making http requests using okhttp
  • getSystemService (Context)
  • notifyDataSetChanged (ArrayAdapter)
  • getExternalFilesDir (Context)
  • FileReader (java.io)
    A specialized Reader that reads from a file in the file system. All read requests made by calling me
  • Locale (java.util)
    Locale represents a language/country/variant combination. Locales are used to alter the presentatio
  • SortedSet (java.util)
    SortedSet is a Set which iterates over its elements in a sorted order. The order is determined eithe
  • BlockingQueue (java.util.concurrent)
    A java.util.Queue that additionally supports operations that wait for the queue to become non-empty
  • DataSource (javax.sql)
    An interface for the creation of Connection objects which represent a connection to a database. This
  • LoggerFactory (org.slf4j)
    The LoggerFactory is a utility class producing Loggers for various logging APIs, most notably for lo
  • Top PhpStorm plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now