net.netheos.pcsapi.models
Class CFolderContent

java.lang.Object
  extended by net.netheos.pcsapi.models.CFolderContent
All Implemented Interfaces:
Iterable<CFile>

public class CFolderContent
extends Object
implements Iterable<CFile>

Contains the folder content.


Constructor Summary
CFolderContent(Map<CPath,CFile> content)
           
 
Method Summary
 boolean containsPath(CPath path)
          Indicates if the folder contains the given path
 boolean equals(Object obj)
           
 CFile getFile(CPath path)
          Get a file by its path
 Collection<CFile> getFiles()
          Get the files stored in the folder
 Collection<CPath> getPaths()
          Get the files paths stored in the folder
 int hashCode()
           
 boolean isEmpty()
          Indicates if the folder is empty
 Iterator<CFile> iterator()
           
 int size()
          Get the files count in the folder
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CFolderContent

public CFolderContent(Map<CPath,CFile> content)
Method Detail

containsPath

public boolean containsPath(CPath path)
Indicates if the folder contains the given path

Parameters:
path - The path to check
Returns:
true if the file path exists, fals otherwise

getFiles

public Collection<CFile> getFiles()
Get the files stored in the folder

Returns:
The files list

getPaths

public Collection<CPath> getPaths()
Get the files paths stored in the folder

Returns:
The paths list

getFile

public CFile getFile(CPath path)
Get a file by its path

Parameters:
path - The file path to search
Returns:
The file found or null if the path is not in the folder

isEmpty

public boolean isEmpty()
Indicates if the folder is empty

Returns:
true if the folder is empty, false otherwise

size

public int size()
Get the files count in the folder

Returns:
The files count

iterator

public Iterator<CFile> iterator()
Specified by:
iterator in interface Iterable<CFile>

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2014. All Rights Reserved.