litesoft
Diff Revisions
313
vs
317
for /trunk/Java/ScarPlus/src/com/esotericsoftware/filesystem/RootedPaths.java
|
@@ -19,7 +19,7 @@ |
19 |
19 |
|
public void addCanonicalRelativePath( String pPath ) |
20 |
20 |
|
{ |
21 |
21 |
|
mGreatestLastModified = Math.max( mGreatestLastModified, new File( mCanonicalRootDirectory, pPath = Utils.assertNotEmpty( "Path", pPath ) ).lastModified() ); |
22 |
|
- |
addPathWithDupCheck( pPath ); |
|
22 |
+ |
mCanonicalRelativePaths.add( pPath ); |
23 |
23 |
|
} |
24 |
24 |
|
|
25 |
25 |
|
public long getGreatestLastModified() |
|
@@ -32,11 +32,6 @@ |
32 |
32 |
|
return mCanonicalRootDirectory; |
33 |
33 |
|
} |
34 |
34 |
|
|
35 |
|
- |
public String[] getCanonicalRelativePaths() |
36 |
|
- |
{ |
37 |
|
- |
return mCanonicalRelativePaths.toArray( new String[mCanonicalRelativePaths.size()] ); |
38 |
|
- |
} |
39 |
|
- |
|
40 |
35 |
|
public int count() |
41 |
36 |
|
{ |
42 |
37 |
|
return mCanonicalRelativePaths.size(); |
|
@@ -71,17 +66,6 @@ |
71 |
66 |
|
void mergeIn( RootedPaths them ) // Assume only called by the RootedPathsCollection when the mCanonicalRootDirectory(s) are equal! |
72 |
67 |
|
{ |
73 |
68 |
|
this.mGreatestLastModified = Math.max( this.mGreatestLastModified, them.mGreatestLastModified ); |
74 |
|
- |
for ( String zPath : them.getCanonicalRelativePaths() ) |
75 |
|
- |
{ |
76 |
|
- |
addPathWithDupCheck( zPath ); |
77 |
|
- |
} |
78 |
|
- |
} |
79 |
|
- |
|
80 |
|
- |
private void addPathWithDupCheck( String zPath ) |
81 |
|
- |
{ |
82 |
|
- |
if ( !mCanonicalRelativePaths.add( zPath ) ) |
83 |
|
- |
{ |
84 |
|
- |
throw new IllegalArgumentException( "Duplicate Entry in (" + mCanonicalRootDirectory.getPath() + "): " + zPath ); |
85 |
|
- |
} |
|
69 |
+ |
this.mCanonicalRelativePaths.addAll( them.mCanonicalRelativePaths ); |
86 |
70 |
|
} |
87 |
71 |
|
} |