congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
Arrays2.isEmpty
Code IndexAdd Tabnine to your IDE (free)

How to use
isEmpty
method
in
leap.lang.Arrays2

Best Java code snippets using leap.lang.Arrays2.isEmpty (Showing top 16 results out of 315)

origin: org.leapframework/leap-lang

public static int indexOf(double[] array, double valueToFind, int startIndex) {
  if (isEmpty(array)) {
    return INDEX_NOT_FOUND;
  }
  if (startIndex < 0) {
    startIndex = 0;
  }
  for (int i = startIndex; i < array.length; i++) {
    if (valueToFind == array[i]) {
      return i;
    }
  }
  return INDEX_NOT_FOUND;
}
origin: org.leapframework/leap-lang

public static int lastIndexOf(float[] array, float valueToFind, int startIndex) {
  if (isEmpty(array)) {
    return INDEX_NOT_FOUND;
  }
  if (startIndex < 0) {
    return INDEX_NOT_FOUND;
  } else if (startIndex >= array.length) {
    startIndex = array.length - 1;
  }
  for (int i = startIndex; i >= 0; i--) {
    if (valueToFind == array[i]) {
      return i;
    }
  }
  return INDEX_NOT_FOUND;
}
origin: org.leapframework/leap-lang

public static int indexOf(boolean[] array, boolean valueToFind, int startIndex) {
  if (isEmpty(array)) {
    return INDEX_NOT_FOUND;
  }
  if (startIndex < 0) {
    startIndex = 0;
  }
  for (int i = startIndex; i < array.length; i++) {
    if (valueToFind == array[i]) {
      return i;
    }
  }
  return INDEX_NOT_FOUND;
}
origin: org.leapframework/leap-lang

public static int indexOf(float[] array, float valueToFind, int startIndex) {
  if (isEmpty(array)) {
    return INDEX_NOT_FOUND;
  }
  if (startIndex < 0) {
    startIndex = 0;
  }
  for (int i = startIndex; i < array.length; i++) {
    if (valueToFind == array[i]) {
      return i;
    }
  }
  return INDEX_NOT_FOUND;
}
origin: org.leapframework/leap-lang

public static int lastIndexOf(double[] array, double valueToFind, int startIndex) {
  if (isEmpty(array)) {
    return INDEX_NOT_FOUND;
  }
  if (startIndex < 0) {
    return INDEX_NOT_FOUND;
  } else if (startIndex >= array.length) {
    startIndex = array.length - 1;
  }
  for (int i = startIndex; i >= 0; i--) {
    if (valueToFind == array[i]) {
      return i;
    }
  }
  return INDEX_NOT_FOUND;
}
origin: org.leapframework/leap-lang

public static int lastIndexOf(boolean[] array, boolean valueToFind, int startIndex) {
  if (isEmpty(array)) {
    return INDEX_NOT_FOUND;
  }
  if (startIndex < 0) {
    return INDEX_NOT_FOUND;
  } else if (startIndex >= array.length) {
    startIndex = array.length - 1;
  }
  for (int i = startIndex; i >= 0; i--) {
    if (valueToFind == array[i]) {
      return i;
    }
  }
  return INDEX_NOT_FOUND;
}
origin: org.leapframework/leap-webunit

@Override
public String getHeader(String name){
  Header[] headers = httpResponse.getHeaders(name);
  return Arrays2.isEmpty(headers) ? null : headers[0].getValue();
}

origin: org.leapframework/leap-lang

@Override
public String getHeader(String name) {
  Header[] headers = response.getHeaders(name);
  return Arrays2.isEmpty(headers) ? null : headers[0].getValue();
}
origin: org.leapframework/jmms-engine

protected DbTable[] tables(MetaApi api, DbTable[] tables) {
  if (!Arrays2.isEmpty(api.getGenIncludeTables())) {
    List<DbTable> list = new ArrayList<>();
    for (DbTable table : tables) {
      if (contains(table, api.getGenIncludeTables())) {
        list.add(table);
      }
    }
    return list.toArray(new DbTable[0]);
  }
  if (!Arrays2.isEmpty(api.getGenExcludeTables())) {
    List<DbTable> list = new ArrayList<>();
    for (DbTable table : tables) {
      if (!contains(table, api.getGenExcludeTables())) {
        list.add(table);
      }
    }
    return list.toArray(new DbTable[0]);
  }
  return tables;
}
origin: org.leapframework/leap-db

public DbTable(String         catalog, 
        String         schema,
        String         name, 
        String         type,
        boolean        quoted,
        String         comment, 
        String          primaryKeyName,
        String[]       primaryKeyColumnNames, 
        DbColumn[]     columns,
        DbForeignKey[] foreignKeys,
        DbIndex[]      indexes) {
  
  super(catalog, schema, name, quoted);
  
  Args.notEmpty(type,"table type");
  Args.notEmpty(columns,"columns' of table '" + name + "");
  
  Args.assertFalse(!Arrays2.isEmpty(primaryKeyColumnNames) && Strings.isEmpty(primaryKeyName),
           "primaryKeyName must not be empty if primary key exists");
  
  this.type                  = type;
  this.comment               = comment;
  this.columns               = columns;
  this.foreignKeys           = null == foreignKeys ? new DbForeignKey[]{} : foreignKeys;
  this.indexes               = null == indexes     ? new DbIndex[]{}      : indexes;
  this.primaryKey			   = Arrays2.isEmpty(primaryKeyColumnNames) ? null : new DbPrimaryKey(primaryKeyName, primaryKeyColumnNames);
  this.primaryKeyColumns     = fromNames(primaryKeyColumnNames);
}
origin: org.leapframework/leap-lang

if (isIgnoreEmptyArray() && Arrays2.isEmpty((Object[]) val)) {
  continue;
origin: org.leapframework/leap-spring-boot

  Arrays2.isEmpty(((EnumerablePropertySource) propertySource).getPropertyNames())) {
return;
origin: org.leapframework/leap-core

  protected void register(EventListenerRegistration reg,BeanDefinition bd){
    String[] categories = reg.getCategories();
    String[] eventNames = reg.getEventNames();
    
    if(Arrays2.isEmpty(categories) && Arrays2.isEmpty(eventNames)){
      throw new EventRegistrationException("'categories' or 'eventNames' must be defined in listener registration, source : " + bd.getSource());
    }

    EventListener listener = reg.getListener();
    
    if(null != categories){
      for(String category : categories){
        if(!eventManager.isEventCategoryRegistered(category)){
          throw new EventRegistrationException("event category '" + category + "' not register, make sure you type the correct name, source : " + bd.getSource());
        }
        eventManager.addEventCategoryListener(category, listener);
      }    
    }
    
    if(null != eventNames){
      for(String eventName : eventNames){
        if(!eventManager.isEventNameRegistered(eventName)){
          throw new EventRegistrationException("event name '" + eventName + "' not register, make sure you type the correct name, source : " + bd.getSource());
        }
        eventManager.addEventNameListener(eventName, listener);
      }
    }
  }
}
origin: org.leapframework/leap-core

Context.InitialProfileResolver externalResolver = Context.get().getInitialProfileResolver();
String[] profiles = null == externalResolver ? null : externalResolver.getProfiles();
if(!Arrays2.isEmpty(profiles)) {
  return profiles;
origin: org.leapframework/leap-websecurity

if(!Arrays2.isEmpty(p1.getPermissions())) {
  spb.setPermissions(p1.getPermissions());
}else{
if(!Arrays2.isEmpty(p1.getRoles())) {
  spb.setRoles(p1.getRoles());
}else{
origin: org.leapframework/leap-webapi

if(!Arrays2.isEmpty(m.getSecurityDefs())) {
  if(isIncluded(sc, SECURITY_DEFINITIONS)) {
    w.property(SECURITY_DEFINITIONS, () -> writeSecurityDefs(context, m, w));
if(!Arrays2.isEmpty(m.getTags())) {
  if(isIncluded(sc, TAGS)) {
    w.property(TAGS, () -> writeTags(context, m, w));
leap.langArrays2isEmpty

Popular methods of Arrays2

  • contains
  • concat
  • equals
  • containsAny
  • containsInObjectArray
  • indexOf
  • isNotEmpty
  • copyOf
    Copies the specified array to an new array.
  • filter
    Returns the elements of unfiltered that satisfy a predicate.
  • firstOrNull
    Returns the first element in iterable that satisfies the given predicate. if such an element exists.
  • indexOfObjectArray
  • lastIndexOf
  • indexOfObjectArray,
  • lastIndexOf,
  • sort,
  • toIntArray

Popular in Java

  • Updating database using SQL prepared statement
  • getSupportFragmentManager (FragmentActivity)
  • requestLocationUpdates (LocationManager)
  • setRequestProperty (URLConnection)
  • File (java.io)
    An "abstract" representation of a file system entity identified by a pathname. The pathname may be a
  • URLEncoder (java.net)
    This class is used to encode a string using the format required by application/x-www-form-urlencoded
  • Hashtable (java.util)
    A plug-in replacement for JDK1.5 java.util.Hashtable. This version is based on org.cliffc.high_scale
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
  • HttpServlet (javax.servlet.http)
    Provides an abstract class to be subclassed to create an HTTP servlet suitable for a Web site. A sub
  • JLabel (javax.swing)
  • Best plugins for Eclipse
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