public static class ModelLocations.Location
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
private java.util.List<ModelLocations.Location> |
dependent |
private java.io.File |
location |
| Modifier | Constructor and Description |
|---|---|
private |
Location(java.io.File location)
Creates a new location.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addDependentLocation(ModelLocations.Location location)
Adds a dependent location.
|
private boolean |
contains(java.io.File file)
Returns whether this location contains the given
file (based
on name inclusion). |
private int |
countFilesInLocations(java.util.Set<java.io.File> excludedLocations,
java.util.Set<ModelLocations.Location> done)
Counts the files in this and dependent locations.
|
ModelLocations.Location |
getDependentLocation(int index)
The specified dependent locations.
|
int |
getDependentLocationCount()
Returns the number of dependent locations.
|
java.io.File |
getLocation()
Returns the file location represented by this instance.
|
private boolean |
isDependentLocation(ModelLocations.Location location,
java.util.Set<ModelLocations.Location> processed)
Returns whether
location is a dependent location. |
private void |
removeFromDependentLocations(ModelLocations.Location location,
java.util.Set<ModelLocations.Location> processed)
Removes
location from the dependent locations. |
java.lang.String |
toString() |
private java.io.File location
private java.util.List<ModelLocations.Location> dependent
private Location(java.io.File location)
ModelLocations acts as a factory
for instances of this class.location - the file location to be represented by this classpublic java.io.File getLocation()
public int getDependentLocationCount()
public ModelLocations.Location getDependentLocation(int index)
index - the index of the location to be returnedjava.lang.IndexOutOfBoundsException - in case that
index < 0 || index >=getDependentLocationCount()public void addDependentLocation(ModelLocations.Location location)
location - the location to be addedprivate int countFilesInLocations(java.util.Set<java.io.File> excludedLocations,
java.util.Set<ModelLocations.Location> done)
excludedLocations - locations not to be considereddone - already processed locations (required to excluded circles)private boolean contains(java.io.File file)
file (based
on name inclusion).file - the file to check fortrue if file is contained in this location,
false elseprivate void removeFromDependentLocations(ModelLocations.Location location, java.util.Set<ModelLocations.Location> processed)
location from the dependent locations.location - the location to be removedprocessed - the already processed locations (in order to avoid loops)private boolean isDependentLocation(ModelLocations.Location location, java.util.Set<ModelLocations.Location> processed)
location is a dependent location.location - the location to be searched forprocessed - the already processed locations (in order to avoid loops)true if locatoin is a dependent location, false elsepublic java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2009 - 2018 SSE. All Rights Reserved.