congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
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

  • Creating JSON documents from java classes using gson
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • requestLocationUpdates (LocationManager)
  • getSystemService (Context)
  • HttpServer (com.sun.net.httpserver)
    This class implements a simple HTTP server. A HttpServer is bound to an IP address and port number a
  • KeyStore (java.security)
    KeyStore is responsible for maintaining cryptographic keys and their owners. The type of the syste
  • Date (java.sql)
    A class which can consume and produce dates in SQL Date format. Dates are represented in SQL as yyyy
  • BoxLayout (javax.swing)
  • Table (org.hibernate.mapping)
    A relational table
  • SAXParseException (org.xml.sax)
    Encapsulate an XML parse error or warning.> This module, both source code and documentation, is in t
  • Top 17 Free Sublime Text Plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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