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

javax.validation.Path Maven / Gradle / Ivy

Go to download

Module repackaging of the Hibernate validator library and Validation API (JSR 303)

There is a newer version: 3.0-JBoss-4.0.2_03
Show newest version
package javax.validation;

/**
 * Represent a navigation path from an object to another.
 * Each path element is represented by a Node.
 *
 * The path corresponds to the succession of nodes
 * in the order they are returned by the Iterator
 *
 * @author Emmanuel Bernard
 */
public interface Path extends Iterable {

	/**
	 * Represents an element of a navigation path
	 */
	interface Node {
		/**
		 * @return Property name the node represents
		 * or null if the leaf node and representing an entity
		 * (in particular the node representing the root object
		 * has its name null)
		 */
		String getName();

		/**
		 * @return True if the node represents an object contained in an Iterable
		 * or in a Map.
		 */
		boolean isInIterable();

		/**
		 * @return The index the node is placed in if contained
		 * in an array or List. Null otherwise.
		 */
		Integer getIndex();

		/**
		 * @return The key the node is placed in if contained
		 * in a Map. Null otherwise.
		 */
		Object getKey();
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy