/* * Moonlight|3D Copyright (C) 2005 The Moonlight|3D team * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 2.1 of the License, or (at your option) * any later version. * * This library 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 Lesser General Public License for more * details. * * You should have received a copy of the GNU Lesser General Public License * along with this library; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * Created on Jul 23, 2005 */ package ml.backend.selection; /** * This interface must be implemented by all classes that wish to appear * in selection paths. It is used for traversal and validity checks of * selection paths. * * @see Selection for mor information on selection paths * * @author gregor */ public interface PathElement { /** * Find a child element with the given name in this path element. * This function is used to traverse the backend graphs along * selection paths in order to retrieve the the referenced object. * * @param childName the name of the child element to be retrieved * @return the child element or null if it does not exist */ public PathElement findChildElement(String childName); /** * Checks if the provided appendix is valid for this path element * * @param appendix the appendix string in the selection path * @return true if it is valid, false otherwise */ public boolean isValidAppendixName(String appendix); /** * Return the object referenced by the appendix on the selection * path for this path element * * @param appendix the appendix to be returned * @return the referred object */ public Object getFromAppendix(String appendix); }