sdblib

asLength(str)) {
      return str;
    }
    char[] chs = str.toCharArray();
    int i = chs.length - 1;
    for (int j = chs.length; j > 0; j--)
    {
      if (trailingCharacter != chs[i]) {
        return new String(chs, 0, j);
      }
      i--;
    }
    return "";
  }
  
  public static String trimCharacter(String str, char character)
  {
    return trimTrailingCharacter(trimLeadingCharacter(str, character), character);
  }
  
  public static String getWord(String doc, int index)
  {
    StringBuilder buffer = new StringBuilder();
    
    int position = index;
    if (doc.length() < index) {
      return "";
    }
    for (int i = position - 1; i >= 0; i--)
    {
      int ch = doc.charAt(i);
      if (Character.isWhitespace(ch)) {
        break;
      }
      buffer.append((char)ch);
    }
    buffer.reverse();
    
    int i = position;
    for (int n = doc.length(); i < n; i++)
    {
      int ch = doc.charAt(i);
      if (Character.isWhitespace(ch)) {
        break;
      }
      buffer.append((char)ch);
    }
    return buffer.toString();
  }
  
  public static <T extends Enum<T>> String[] enumNameToStringArray(T[] values)
  {
    int i = 0;
    String[] result = new String[values.length];
    Enum[] arrayOfEnum = values;int j = values.length;
    for (int i = 0; i < j; i++)
    {
      T value = arrayOfEnum[i];
      result[(i++)] = value.name();
    }
    return result;
  }
  
  public static boolean isInteger(String str)
  {
    try
    {
      Integer.parseInt(str);
      return true;
    }
    catch (NumberFormatException localNumberFormatException) {}
    return false;
  }
  
  public static String convertFirstLetterUpperCase(String str)
  {
    if (isEmpty(str)) {
      return null;
    }
    char[] str_array = str.toCharArray();
    str_array[0] = Character.toUpperCase(str_array[0]);
    str = new String(str_array);
    return str;
  }
  
  public static String getLastStringAfter(String input, String lastIndexStr)
  {
    if (input == null) {
      return null;
    }
    if (lastIndexStr == null) {
      return null;
    }
    int k = input.lastIndexOf(lastIndexStr);
    
    return k != -1 ? input.substring(k + lastIndexStr.length(), input.length()) : null;
  }
}

/* Location:
 * Qualified Name:     org.tizen.sdblib.util.StringUtil
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.sdblib.util;

public class ThreadUtil
{
  public static void trySleep(long milliseconds)
  {
    if (milliseconds <= 0L) {
      return;
    }
    try
    {
      Thread.sleep(milliseconds);
    }
    catch (InterruptedException localInterruptedException) {}
  }
}

/* Location:
 * Qualified Name:     org.tizen.sdblib.util.ThreadUtil
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
1 2 3 4 5 6 7

Further reading...

For more information on Java 1.5 Tiger, you may find Java 1.5 Tiger, A developer's Notebook by D. Flanagan and B. McLaughlin from O'Reilly of interest.

New!JAR listings


Copyright 2006-2019. Infinite Loop Ltd