source: java/main/src/main/java/com/framsticks/parsers/AccessStash.java @ 193

Last change on this file since 193 was 193, checked in by Maciej Komosinski, 10 years ago

Set svn:eol-style native for all textual files

  • Property svn:eol-style set to native
File size: 559 bytes
Line 
1package com.framsticks.parsers;
2
3import java.util.HashMap;
4import java.util.Map;
5
6import com.framsticks.params.Access;
7import com.framsticks.params.AccessProvider;
8
9public class AccessStash implements AccessProvider {
10
11        protected final Map<String, Access> accesses = new HashMap<>();
12
13        @Override
14        public Access getAccess(String name) {
15                return accesses.get(name);
16        }
17
18        public AccessStash add(Access access) {
19                /**TODO: by id or by name? rather by id, because from file is always lowercase*/
20                accesses.put(access.getTypeId(), access);
21                return this;
22        }
23
24
25}
Note: See TracBrowser for help on using the repository browser.