Java-Gaming.org Hi !
Featured games (91)
games approved by the League of Dukes
Games in Showcase (800)
Games in Android Showcase (237)
games submitted by our members
Games in WIP (867)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
  JavaGaming.org - Pastebin



Author: ClaasJG (posted 2015-03-10 11:36:42, viewed 522 times)

1   2   3   4   5   6   7   8   9   10   11   12   13   14   15   16   17   18   19   20   21   22   23   24   25   26   27   28   29   30   31   32   33   34   35   36   37  
package foo.bar;

import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class ProjectFolder {

   private static final Logger LOGGER = LoggerFactory
         .getLogger(ProjectFolder.class);
   private final Path folder;

   private final List<ProjectFolder> subFolder, subFolderShadow;

   ProjectFolder(final Path folder) {
      this.folder = folder;
      this.subFolder = new ArrayList<>();
      this.subFolderShadow = Collections.unmodifiableList(subFolder);

      try {
         Files.newDirectoryStream(folder).forEach(
               path -> subFolder.add(new ProjectFolder(path)));
      } catch (final IOException e) {
         LOGGER.error("Error loading subfolders.", e);
      }
   }

   public List<ProjectFolder> getSubFolder() {
      return subFolderShadow;
   }
}





Dump your java code here :



Special syntax:
  • To highlight a line (yellow background), prefix it with '@@'
  • To indicate that a line should be removed (red background), prefix it with '-'
  • To indicate that a line should be added (green background), prefix it with '+'
  • To post multiple snippets, seperate them by '~~~~'
  EOF
 
Riven (349 views)
2019-09-04 15:33:17

hadezbladez (5133 views)
2018-11-16 13:46:03

hadezbladez (2017 views)
2018-11-16 13:41:33

hadezbladez (5401 views)
2018-11-16 13:35:35

hadezbladez (1123 views)
2018-11-16 13:32:03

EgonOlsen (4542 views)
2018-06-10 19:43:48

EgonOlsen (5399 views)
2018-06-10 19:43:44

EgonOlsen (3086 views)
2018-06-10 19:43:20

DesertCoockie (3980 views)
2018-05-13 18:23:11

nelsongames (4530 views)
2018-04-24 18:15:36
A NON-ideal modular configuration for Eclipse with JavaFX
by philfrei
2019-12-19 19:35:12

Java Gaming Resources
by philfrei
2019-05-14 16:15:13

Deployment and Packaging
by philfrei
2019-05-08 15:15:36

Deployment and Packaging
by philfrei
2019-05-08 15:13:34

Deployment and Packaging
by philfrei
2019-02-17 20:25:53

Deployment and Packaging
by mudlee
2018-08-22 18:09:50

Java Gaming Resources
by gouessej
2018-08-22 08:19:41

Deployment and Packaging
by gouessej
2018-08-22 08:04:08
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!