Commit 178128e1 authored by Mathieu Gicquel's avatar Mathieu Gicquel
Browse files

Documentation - Fix #26

parent 8f121df6
......@@ -2,23 +2,64 @@ package fr.alma.gtd.server.core;
import java.util.List;
/**
* Associations interface to many
* @param <T>
*/
public interface MultipleReference<T> {
/**
* Add a new association
* @param value instance
* @return true if the association has been added, otherwise false
*/
boolean add (T value);
/**
* Remove an association
* @param value instance
*/
void remove(T value);
/**
* Check if the association contains a value
* @param value instance
* @return true if the association contains value, otherwise false
*/
boolean contains(T value);
/**
* Get the
* @return number of instance related to this reference
*/
int size();
/**
* auxiliary methods
* @param value instance
*/
void basicAdd(T value);
/**
* auxiliary methods
* @param value instance
*/
void basicRemove(T value);
/**
* auxiliary methods
*/
void removeAll();
/**
* get all instance involved in the association
* @return all instance involved in the association
*/
List<T> get();
/**
* set all instance involved in the association
* @param value all instance involved in the association
*/
void set(List<T> value);
}
package fr.alma.gtd.server.core;
/**
* Associations interface to one
* @param <T>
*/
public interface SingleReference<T> {
/**
* Set a new association to instance
* @param newValue instance
*/
void set(T newValue);
/**
* Get the instance
* @return instance
*/
T get();
/**
* unset association
*/
void unset();
/**
*
* @return true if the association is set, otherwise false
*/
boolean isSet();
/**
* auxiliary methods
* @param newValue instance
*/
void basicSet(T newValue);
/**
* auxiliary methods
*/
void basicUnSet();
}
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment