net.ranides.assira.io
Class PathHelper.FilePath

java.lang.Object
  extended by net.ranides.assira.collection.list.VirtualList<String>
      extended by 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" ]


Method Summary
 String get(int index)
           
 int size()
           
 File toFile()
          Konwertuje ścieżkę na standardowy obiekt File
 
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
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.List
equals, hashCode
 

Method Detail

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.