Tabnine Logo
Collections.lastIndexOfSubList
Code IndexAdd Tabnine to your IDE (free)

How to use
lastIndexOfSubList
method
in
java.util.Collections

Best Java code snippets using java.util.Collections.lastIndexOfSubList (Showing top 7 results out of 315)

origin: pmd/pmd

private void extractObjectAndFields(final List<Identifier> listIdentifiers, final String method,
    final String definingType) {
  final List<String> strings = listIdentifiers.stream().map(id -> id.getValue()).collect(Collectors.toList());
  int flsIndex = Collections.lastIndexOfSubList(strings, Arrays.asList(RESERVED_KEYS_FLS));
  if (flsIndex != -1) {
    String objectTypeName = strings.get(flsIndex + RESERVED_KEYS_FLS.length);
    if (!typeToDMLOperationMapping.get(definingType + ":" + objectTypeName).contains(method)) {
      typeToDMLOperationMapping.put(definingType + ":" + objectTypeName, method);
    }
  }
}
origin: backport-util-concurrent/backport-util-concurrent

public static int lastIndexOfSubList(List source, List target) {
  return java.util.Collections.lastIndexOfSubList(source, target);
}
origin: org.codehaus.swizzle/swizzle-jirareport

public int lastIndexOfSubList(List list, List list1) {
  return Collections.lastIndexOfSubList(list, list1);
}
origin: edu.emory.mathcs.backport/com.springsource.edu.emory.mathcs.backport

public static int lastIndexOfSubList(List source, List target) {
  return java.util.Collections.lastIndexOfSubList(source, target);
}
origin: net.sourceforge.pmd/pmd-apex

private void extractObjectAndFields(final List<Identifier> listIdentifiers, final String method,
    final String definingType) {
  final List<String> strings = listIdentifiers.stream().map(id -> id.getValue()).collect(Collectors.toList());
  int flsIndex = Collections.lastIndexOfSubList(strings, Arrays.asList(RESERVED_KEYS_FLS));
  if (flsIndex != -1) {
    String objectTypeName = strings.get(flsIndex + RESERVED_KEYS_FLS.length);
    if (!typeToDMLOperationMapping.get(definingType + ":" + objectTypeName).contains(method)) {
      typeToDMLOperationMapping.put(definingType + ":" + objectTypeName, method);
    }
  }
}
origin: stackoverflow.com

int firstIndex = Collections.indexOfSubList(source, target);
 if (firstIndex == -1 ){
   // the sublist doesn't exist
 }
 int lastIndex = Collections.lastIndexOfSubList(source, target);
origin: BruceEckel/OnJava8-Examples

 Collections.indexOfSubList(list, sublist));
System.out.println("lastIndexOfSubList: " +
 Collections.lastIndexOfSubList(list, sublist));
Collections.replaceAll(list, "one", "Yo");
System.out.println("replaceAll: " + list);
java.utilCollectionslastIndexOfSubList

Javadoc

Searches the list for sublist and returns the beginning index of the last occurrence.

-1 is returned if the sublist does not exist in list.

Popular methods of Collections

  • emptyList
    Returns the empty list (immutable). This list is serializable.This example illustrates the type-safe
  • sort
  • singletonList
    Returns an immutable list containing only the specified object. The returned list is serializable.
  • unmodifiableList
    Returns an unmodifiable view of the specified list. This method allows modules to provide users with
  • emptyMap
    Returns the empty map (immutable). This map is serializable.This example illustrates the type-safe w
  • emptySet
    Returns the empty set (immutable). This set is serializable. Unlike the like-named field, this metho
  • unmodifiableMap
    Returns an unmodifiable view of the specified map. This method allows modules to provide users with
  • singleton
    Returns an immutable set containing only the specified object. The returned set is serializable.
  • unmodifiableSet
    Returns an unmodifiable view of the specified set. This method allows modules to provide users with
  • singletonMap
    Returns an immutable map, mapping only the specified key to the specified value. The returned map is
  • addAll
    Adds all of the specified elements to the specified collection. Elements to be added may be specifie
  • reverse
    Reverses the order of the elements in the specified list. This method runs in linear time.
  • addAll,
  • reverse,
  • unmodifiableCollection,
  • shuffle,
  • enumeration,
  • list,
  • synchronizedMap,
  • synchronizedList,
  • reverseOrder,
  • emptyIterator

Popular in Java

  • Making http requests using okhttp
  • scheduleAtFixedRate (ScheduledExecutorService)
  • onCreateOptionsMenu (Activity)
  • getExternalFilesDir (Context)
  • EOFException (java.io)
    Thrown when a program encounters the end of a file or stream during an input operation.
  • FileOutputStream (java.io)
    An output stream that writes bytes to a file. If the output file exists, it can be replaced or appen
  • Runnable (java.lang)
    Represents a command that can be executed. Often used to run code in a different Thread.
  • UnknownHostException (java.net)
    Thrown when a hostname can not be resolved.
  • BitSet (java.util)
    The BitSet class implements abit array [http://en.wikipedia.org/wiki/Bit_array]. Each element is eit
  • CountDownLatch (java.util.concurrent)
    A synchronization aid that allows one or more threads to wait until a set of operations being perfor
  • Top plugins for WebStorm
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