Java 8 ArrayList - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Java 8 ArrayList class.

This code example shows how to use the following methods:
/** 
 * 
 */ 
public class ActionRequestValidationException extends ElasticSearchException { 
 
    private final List<String> validationErrors = new ArrayList<String>();
 
    public ActionRequestValidationException() { 
        super(null); 
    } 
 
    public void addValidationError(String error) {
        validationErrors.add(error);
    } 
 
    public void addValidationErrors(Iterable<String> errors) {
        for (String error : errors) {
            validationErrors.add(error);
        } 
    } 
Full Snippet Info
10
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
This code example shows how to use the following methods:
 
    private final String cause;
 
    private final Map<String, Object> context;
 
    private final ArrayList<File> files = new ArrayList<File>();
 
    protected AbstractDump(long timestamp, String cause, @Nullable Map<String, Object> context) {
        this.timestamp = timestamp;
        this.cause = cause;
        if (context == null) {
            context = ImmutableMap.of();
        } 
        this.context = context;
    } 
 
    @Override 
    public long timestamp() { 
        return timestamp;
    } 
Full Snippet Info
10
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
This code example shows how to use the following methods: add, get, isEmpty, size
	 * the call to {@code afterTestClass()} throws an exception, it will also be tracked. 
	 * Multiple exceptions will be combined into a {@link MultipleFailureException}. 
	 */ 
	@Override 
	public void evaluate() throws Throwable {
		List<Throwable> errors = new ArrayList<Throwable>();
		try { 
			this.next.evaluate();
		} 
		catch (Throwable e) {
			errors.add(e);
		} 
 
		try { 
			this.testContextManager.afterTestClass();
		} 
		catch (Exception e) {
			errors.add(e);
		} 
 

9
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
This code example shows how to use the following methods:
    List<MultiTermVectorsResponse.Failure> failures; 
 
    MultiTermVectorsShardResponse() { 
        locations = new IntArrayList(); 
        responses = new ArrayList<TermVectorResponse>(); 
        failures = new ArrayList<MultiTermVectorsResponse.Failure>(); 
    } 
 
    public void add(int location, TermVectorResponse response) { 
        locations.add(location); 
        responses.add(response); 
        failures.add(null); 
    } 
 
    public void add(int location, MultiTermVectorsResponse.Failure failure) { 
        locations.add(location); 
        responses.add(null); 
        failures.add(failure); 
    } 
 
Full Snippet Info
10
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
This code example shows how to use the following methods: add
  } 
   
  @Test 
  public void testCreateJob() throws IOException { 
    JobConf job;
    ArrayList<String> dummyArgs = new ArrayList<String>();
    dummyArgs.add("-input"); dummyArgs.add("dummy");
    dummyArgs.add("-output"); dummyArgs.add("dummy");
    dummyArgs.add("-mapper"); dummyArgs.add("dummy");
    dummyArgs.add("-reducer"); dummyArgs.add("dummy");
    ArrayList<String> args;
     
    args = new ArrayList<String>(dummyArgs);
    args.add("-inputformat");
    args.add("org.apache.hadoop.mapred.KeyValueTextInputFormat");
    job = StreamJob.createJob(args.toArray(new String[] {}));
    assertEquals(KeyValueTextInputFormat.class, job.getInputFormat().getClass());
     
    args = new ArrayList<String>(dummyArgs);
    args.add("-inputformat");
Full Snippet Info
9
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE

Related Java 8 ArrayList Questions & Answers:

Other Java 8 ArrayList Examples

21:	
22:		// Reading file paths from SDCard
23:		public ArrayList<String> getFilePaths() {
24:			ArrayList<String> filePaths = new ArrayList<String>();
25:	
-
22:		// Reading file paths from SDCard
23:		public ArrayList<String> getFilePaths() {
24:			ArrayList<String> filePaths = new ArrayList<String>();
25:	
26:			File directory = new File(
-
22:		// Reading file paths from SDCard
23:		public ArrayList<String> getFilePaths() {
24:			ArrayList filePaths = new ArrayList<String>();
25:	
26:			File directory = new File(

Read More

41:		 */
42:		private void prepareListData() {
43:			listDataHeader = new ArrayList<String>();
44:			listDataChild = new HashMap<String, List<String>>();
45:	
-
50:	
51:			// Adding child data
52:			List top250 = new ArrayList<String>();
53:			top250.add("The Shawshank Redemption");
54:			top250.add("The Godfather");
-
59:			top250.add("12 Angry Men");
60:	
61:			List nowShowing = new ArrayList<String>();
62:			nowShowing.add("The Conjuring");
63:			nowShowing.add("Despicable Me 2");
-
67:			nowShowing.add("The Wolverine");
68:	
69:			List comingSoon = new ArrayList<String>();
70:			comingSoon.add("2 Guns");
71:			comingSoon.add("The Smurfs 2");

Read More

11:	public class AddItemizedOverlay extends ItemizedOverlay<OverlayItem> {
12:		   
13:		   private ArrayList<OverlayItem> mapOverlays = new ArrayList<OverlayItem>();
14:		   
15:		   private Context context;
-
11:	public class AddItemizedOverlay extends ItemizedOverlay<OverlayItem> {
12:		   
13:		   private ArrayList mapOverlays = new ArrayList<OverlayItem>();
14:		   
15:		   private Context context;

Read More

See Code Examples for Java 8 ArrayList Methods: