// Path: api/src/main/java/com/torchmind/candle/api/IArrayPropertyNode.java
// public interface IArrayPropertyNode extends IPropertyNode {
// 
//         /**
//          * Ensures the array consists of a certain type of element.
//          *
//          * @param valueType The expected value type.
//          * @return The node.
//          *
//          * @throws java.lang.IllegalStateException when the expected value type differs.
//          */
//         @Nonnull
//         IArrayPropertyNode ensureItemType (@Nonnull NodeValueType valueType) throws IllegalStateException;
// 
//         /**
//          * Retrieves the array item type.
//          *
//          * @return The type.
//          */
//         @Nonnull
//         NodeValueType itemType ();
// 
//         /**
//          * Retrieves the array length.
//          *
//          * @return The length.
//          */
//         @Nonnegative
//         int length ();
// 
//         /**
//          * {@inheritDoc}
//          */
//         @Nonnull
//         @Override
//         default NodeValueType valueType () {
//                 return NodeValueType.ARRAY;
//         }
// }
// 
// Path: api/src/main/java/com/torchmind/candle/api/IDocumentNode.java
// public interface IDocumentNode extends IObjectNode {
//         String NAME = "###ROOT###";
// 
//         /**
//          * {@inheritDoc}
//          */
//         @Nonnull
//         @Override
//         default IDocumentNode document () {
//                 return this;
//         }
// 
//         /**
//          * {@inheritDoc}
//          */
//         @Override
//         default boolean isDocumentRoot () {
//                 return true;
//         }
// 
//         /**
//          * {@inheritDoc}
//          */
//         @Nonnull
//         @Override
//         default INamedNode name (@Nullable String name) {
//                 throw new UnsupportedOperationException ("Cannot alter node name of root document node");
//         }
// 
//         /**
//          * {@inheritDoc}
//          */
//         @Nonnull
//         @Override
//         default String name () {
//                 return NAME;
//         }
// 
//         /**
//          * {@inheritDoc}
//          */
//         @Nonnull
//         @Override
//         default NodeType type () {
//                 return NodeType.DOCUMENT;
//         }
// }
// 
// Path: api/src/main/java/com/torchmind/candle/api/NodeValueType.java
// public enum NodeValueType {
//         /**
//          * Represents an array of a certain type of element.
//          */
//         ARRAY,
// 
//         /**
//          * Represents a binary value (0 = false, 1 = true).
//          */
//         BOOLEAN,
// 
//         /**
//          * Represents a default value.
//          */
//         DEFAULT,
// 
//         /**
//          * Represents a value within a list of possible values.
//          */
//         ENUM,
// 
//         /**
//          * Represents a floating point number.
//          */
//         FLOAT,
// 
//         /**
//          * Represents an integer.
//          */
//         INTEGER,
// 
//         /**
//          * Represents a null (empty) value.
//          */
//         NULL,
// 
//         /**
//          * Represents a character sequence.
//          */
//         STRING
// }
// 
// Path: core/src/main/java/com/torchmind/candle/node/property/AbstractPropertyNode.java
// public abstract class AbstractPropertyNode extends AbstractNamedNode implements IPropertyNode {
// 
//         public AbstractPropertyNode (@Nonnull IDocumentNode documentNode, @Nonnull String name) {
//                 super (documentNode, name);
//         }
// 
//         /**
//          * {@inheritDoc}
//          */
//         @Nonnull
//         @Override
//         public IPropertyNode ensureValueType (@Nonnull NodeValueType valueType) throws IllegalStateException {
//                 if (this.valueType () != valueType) {
//                         throw new IllegalStateException ("Expected value node representing type " + valueType + " but found " + this.valueType ());
//                 }
//                 return this;
//         }
// }


import com.torchmind.candle.api.IArrayPropertyNode;
import com.torchmind.candle.api.IDocumentNode;
import com.torchmind.candle.api.NodeValueType;
import com.torchmind.candle.node.property.AbstractPropertyNode;
import javax.annotation.Nonnull;
/*
 * Copyright 2015 Johannes Donath <johannesd@torchmind.com>
 * and other copyright owners as documented in the project's IP log.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * 	http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.torchmind.candle.node.property.array;



/**
 * Provides an abstract implementation of {@link com.torchmind.candle.api.IArrayPropertyNode}.
 *
 * @author Johannes Donath
 */
public abstract class AbstractArrayPropertyNode extends AbstractPropertyNode implements IArrayPropertyNode {

        public AbstractArrayPropertyNode (@Nonnull IDocumentNode documentNode, @Nonnull String name) {
                super (documentNode, name);
        }

        /**
         * {@inheritDoc}
         */
        @Nonnull
// Path: api/src/main/java/com/torchmind/candle/api/IArrayPropertyNode.java
// public interface IArrayPropertyNode extends IPropertyNode {
// 
//         /**
//          * Ensures the array consists of a certain type of element.
//          *
//          * @param valueType The expected value type.
//          * @return The node.
//          *
//          * @throws java.lang.IllegalStateException when the expected value type differs.
//          */
//         @Nonnull
//         IArrayPropertyNode ensureItemType (@Nonnull NodeValueType valueType) throws IllegalStateException;
// 
//         /**
//          * Retrieves the array item type.
//          *
//          * @return The type.
//          */
//         @Nonnull
//         NodeValueType itemType ();
// 
//         /**
//          * Retrieves the array length.
//          *
//          * @return The length.
//          */
//         @Nonnegative
//         int length ();
// 
//         /**
//          * {@inheritDoc}
//          */
//         @Nonnull
//         @Override
//         default NodeValueType valueType () {
//                 return NodeValueType.ARRAY;
//         }
// }
// 
// Path: api/src/main/java/com/torchmind/candle/api/IDocumentNode.java
// public interface IDocumentNode extends IObjectNode {
//         String NAME = "###ROOT###";
// 
//         /**
//          * {@inheritDoc}
//          */
//         @Nonnull
//         @Override
//         default IDocumentNode document () {
//                 return this;
//         }
// 
//         /**
//          * {@inheritDoc}
//          */
//         @Override
//         default boolean isDocumentRoot () {
//                 return true;
//         }
// 
//         /**
//          * {@inheritDoc}
//          */
//         @Nonnull
//         @Override
//         default INamedNode name (@Nullable String name) {
//                 throw new UnsupportedOperationException ("Cannot alter node name of root document node");
//         }
// 
//         /**
//          * {@inheritDoc}
//          */
//         @Nonnull
//         @Override
//         default String name () {
//                 return NAME;
//         }
// 
//         /**
//          * {@inheritDoc}
//          */
//         @Nonnull
//         @Override
//         default NodeType type () {
//                 return NodeType.DOCUMENT;
//         }
// }
// 
// Path: api/src/main/java/com/torchmind/candle/api/NodeValueType.java
// public enum NodeValueType {
//         /**
//          * Represents an array of a certain type of element.
//          */
//         ARRAY,
// 
//         /**
//          * Represents a binary value (0 = false, 1 = true).
//          */
//         BOOLEAN,
// 
//         /**
//          * Represents a default value.
//          */
//         DEFAULT,
// 
//         /**
//          * Represents a value within a list of possible values.
//          */
//         ENUM,
// 
//         /**
//          * Represents a floating point number.
//          */
//         FLOAT,
// 
//         /**
//          * Represents an integer.
//          */
//         INTEGER,
// 
//         /**
//          * Represents a null (empty) value.
//          */
//         NULL,
// 
//         /**
//          * Represents a character sequence.
//          */
//         STRING
// }
// 
// Path: core/src/main/java/com/torchmind/candle/node/property/AbstractPropertyNode.java
// public abstract class AbstractPropertyNode extends AbstractNamedNode implements IPropertyNode {
// 
//         public AbstractPropertyNode (@Nonnull IDocumentNode documentNode, @Nonnull String name) {
//                 super (documentNode, name);
//         }
// 
//         /**
//          * {@inheritDoc}
//          */
//         @Nonnull
//         @Override
//         public IPropertyNode ensureValueType (@Nonnull NodeValueType valueType) throws IllegalStateException {
//                 if (this.valueType () != valueType) {
//                         throw new IllegalStateException ("Expected value node representing type " + valueType + " but found " + this.valueType ());
//                 }
//                 return this;
//         }
// }


// Path: core/src/main/java/com/torchmind/candle/node/property/array/AbstractArrayPropertyNode.java
import com.torchmind.candle.api.IArrayPropertyNode;
import com.torchmind.candle.api.IDocumentNode;
import com.torchmind.candle.api.NodeValueType;
import com.torchmind.candle.node.property.AbstractPropertyNode;
import javax.annotation.Nonnull;

/*
 * Copyright 2015 Johannes Donath <johannesd@torchmind.com>
 * and other copyright owners as documented in the project's IP log.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * 	http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.torchmind.candle.node.property.array;



/**
 * Provides an abstract implementation of {@link com.torchmind.candle.api.IArrayPropertyNode}.
 *
 * @author Johannes Donath
 */
public abstract class AbstractArrayPropertyNode extends AbstractPropertyNode implements IArrayPropertyNode {

        public AbstractArrayPropertyNode (@Nonnull IDocumentNode documentNode, @Nonnull String name) {
                super (documentNode, name);
        }

        /**
         * {@inheritDoc}
         */
        @Nonnull
        @Override