All Downloads are FREE. Search and download functionalities are using the official Maven repository.

uk.co.spudsoft.dircache.FileTree Maven / Gradle / Ivy

There is a newer version: 0.0.25
Show newest version
/*
 * Copyright (C) 2023 njt
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see .
 */
package uk.co.spudsoft.dircache;

import jakarta.validation.constraints.NotNull;
import java.util.List;

/**
 *
 * @author njt
 */
public interface FileTree {
  
  interface FileTreeNode> {

    /**
     * Get the name of the directory entry.
     * @return the name of the directory entry.
     */
    @NotNull
    String getName();

    /**
     * Get the children of this internal node.
     * @return the children of this internal node.
     */
    List getChildren();
    
    /**
     * Return true if the node is a leaf node (has no children).
     * 
     * Note that the rather clunky name is to avoid serializers considering this to be a property.
     * 
     * @return true if the node is a leaf node (has no children). 
     */
    boolean leaf();
    
  }
  
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy