source: java/main/src/main/java/com/framsticks/params/AccessInterface.java @ 78

Last change on this file since 78 was 78, checked in by psniegowski, 11 years ago

Add f0 parsing and f0->Model transformation.

File size: 1.8 KB
Line 
1package com.framsticks.params;
2
3import java.util.Collection;
4import java.util.List;
5
6
7/**
8 * The Interface AccessInterface. It's the most general class for storing data in
9 * framsticks. In descriptions of methods names "property" and "parameter" are
10 * synonyms.
11 *
12 * @author Jarek Szymczak <name.surname@gmail.com> (please replace name and
13 *         surname with my personal data)
14 */
15public interface AccessInterface {
16
17        Param getParam(int i);
18
19        Param getParam(String id);
20
21        String getId();
22
23
24    /*
25        String getName();
26
27    * This method provides more verbose (but not strict) names of classes.
28     *
29     * e.g. for a list it will return l Type, and if name of FramsClass missing,
30     * it's id will be used
31     *
32    String getNiceName();
33    */
34
35        Param getGroupMember(int gi, int n);
36
37        int getParamCount();
38
39        // void call(int i, Object args, Object ret);
40        // TODO: as for now it's not necessary to implement this method
41
42        <T> T get(int i, Class<T> type);
43
44        <T> T get(String id, Class<T> type);
45
46        <T> T get(Param param, Class<T> type);
47
48        <T> int set(int i, T value);
49
50        <T> int set(String id, T value);
51
52        <T> int set(Param param, T value);
53
54        void setDefault(boolean numericOnly);
55
56        void setDefault(int i, boolean numericOnly);
57
58        void setMin();
59
60        void setMin(int i);
61
62        void setMax();
63
64        void setMax(int i);
65
66        void copyFrom(AccessInterface src);
67
68        void save(SinkInterface sink);
69
70        void load(SourceInterface stream) throws Exception;
71
72        /**
73         * Return as a single line String.
74         *
75         * @param omitDefaultValues
76         *            the omit default values
77         * @return the string
78         */
79        String save2(boolean omitDefaultValues);
80
81        /**
82         * Removes all the properties values.
83         */
84        void clearValues();
85
86        void select(Object object);
87
88        Object getSelected();
89
90        AccessInterface cloneAccess();
91
92    Object createAccessee();
93
94    Collection<Param> getParams();
95
96    FramsClass getFramsClass();
97
98
99}
Note: See TracBrowser for help on using the repository browser.