OSDN Git Service

update
[stigmata/stigmata.git] / src / main / java / jp / sourceforge / stigmata / Birthmark.java
1 package jp.sourceforge.stigmata;
2
3 /*
4  * $Id$
5  */
6
7 import java.util.Iterator;
8
9 /**
10  * This interface represents a birthmark.
11  * The birthmark is native characteristics of a program.
12  * 
13  * @author Haruaki TAMADA
14  * @version $Revision$ 
15  */
16 public interface Birthmark extends Iterable<BirthmarkElement>{
17     /**
18      * return all elements of this birthmark.
19      * 
20      * @return all elements.
21      */
22     public BirthmarkElement[] getElements();
23
24     /**
25      * returns the iterator for all elements of this birthmark.
26      * @return iterator for accessing to elements of this birthmark.
27      */
28     public Iterator<BirthmarkElement> iterator();
29
30     /**
31      * returns the number of elements of this birthmark.
32      * 
33      * @return element count
34      */
35     public int getElementCount();
36
37     /**
38      * add element to this birthmark.
39      * 
40      * @param element new element
41      */
42     public void addElement(BirthmarkElement element);
43
44     /**
45      * return the type of this birthmark.
46      * 
47      * @return birthmark type
48      */
49     public String getType();
50
51     /**
52      * This method check types of this birthmark and given birthmark are matched.
53      * 
54      * @param birthmark check target.
55      * @return true: same type, false: not same type.
56      */
57     public boolean isSameType(Birthmark birthmark);
58 }