/*
 * Copyright 2016 PantherCode
 *
 * 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 org.panthercode.arctic.core.repository;

import org.panthercode.arctic.core.helper.identity.Identifiable;

import java.util.Collection;
import java.util.Map;

/**
 * Created by architect on 21.09.16.
 */
public interface Repository<T extends Identifiable> extends Identifiable {

    /**
     * @param element
     */
    void store(T element);

    /**
     * @param key
     */
    void delete(String key);

    /**
     * @param key
     * @return
     */
    boolean contains(String key);

    /**
     * @param key
     * @return
     */
    T get(String key);

    /**
     *
     */
    void clear();

    /**
     * @return
     */
    Collection<T> elements();

    /**
     * @return
     */
    Map<String, T> asMap();
}

@@ -769,40 +769,78 @@
 %0A * 
-Created by architect on 21.09.16
+Repositories are used to store classes identified by its identify name
 .%0A *
@@ -936,247 +936,711 @@
   * 
-@param element%0A     */%0A    void store(T element);%0A%0A    /**%0A     * @param key%0A     */%0A    void delete(String key);%0A%0A    /**%0A     * @param key%0A     * @return%0A     */%0A    boolean contains(String key);%0A%0A    /**%0A     * @param key%0A     * @return
+Adds a new element to repository.%0A     *%0A     * @param element element to add%0A     */%0A    void store(T element);%0A%0A    /**%0A     * Removes an element from repository.%0A     *%0A     * @param key element to remove%0A     */%0A    void delete(String key);%0A%0A    /**%0A     * Checks whether the repository contains an element with given name or not.%0A     *%0A     * @param key name of module%0A     * @return Returns %3Ctt%3Etrue%3C/tt%3E if repository contains the element; Otherwise %3Ctt%3Efalse%3C/tt%3E.%0A     */%0A    boolean contains(String key);%0A%0A    /**%0A     * Returns an element from repository.%0A     *%0A     * @param key name of element%0A     * @return Returns the element if repository contains the object; Otherwise %3Ctt%3Enull%3C/tt%3E.
 %0A   
@@ -1678,24 +1678,62 @@
   /**%0A     *
+ Removes all elements from repository.
 %0A     */%0A   
@@ -1767,77 +1767,346 @@
   * 
-@return%0A     */%0A    Collection%3CT%3E elements();%0A%0A    /**%0A     * @return
+Returns a collection with all elements stored in this object.%0A     *%0A     * @return Returns a collection with all elements stored in this object.%0A     */%0A    Collection%3CT%3E elements();%0A%0A    /**%0A     * Returns a map with all elements stored in this object.%0A     *%0A     * @return Returns a collection with all elements stored in this object.
 %0A   

add documentation to Repository interface