net.ranides.assira.io
Class PathHelper.FilePath
java.lang.Object
net.ranides.assira.collection.list.VirtualList<String>
net.ranides.assira.io.PathHelper.FilePath
- All Implemented Interfaces:
- Iterable<String>, Collection<String>, List<String>, RandomAccess
- Enclosing class:
- PathHelper
public static final class PathHelper.FilePath
- extends VirtualList<String>
Lista reprezentująca ścieżkę do pliku rozbitą na fragmenty (gdzie każdy
fragment to jeden poziom w systemie plików). Kolejność elementów w liście
odpowiada kolejności elementów w "standardowej" ścieżce - pierwszy element
to root, następny to podkatalog... i tak aż nazwy wskazywanego pliku,
która znajduje się na ostatniej pozycji.
Przykładowo ścieżka "/a/b/c/d.txt" jest reprezentowana jako
[ "a", "b", "c", "d.txt" ]
| Methods inherited from class net.ranides.assira.collection.list.VirtualList |
add, add, addAll, addAll, clear, contains, containsAll, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, retainAll, set, subList, subList, toArray, toArray |
get
public String get(int index)
- Specified by:
get in interface List<String>- Specified by:
get in class VirtualList<String>
size
public int size()
- Specified by:
size in interface Collection<String>- Specified by:
size in interface List<String>- Specified by:
size in class VirtualList<String>
toFile
public File toFile()
- Konwertuje ścieżkę na standardowy obiekt
File
- Returns:
Copyright © 2013. All Rights Reserved.