001/* 002 * Copyright 2005,2009 Ivan SZKIBA 003 * 004 * Licensed under the Apache License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.apache.org/licenses/LICENSE-2.0 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 */ 016package org.ini4j; 017 018public interface OptionMap extends MultiMap<String, String>, CommentedMap<String, String> 019{ 020 <T> T getAll(Object key, Class<T> clazz); 021 022 void add(String key, Object value); 023 024 void add(String key, Object value, int index); 025 026 <T> T as(Class<T> clazz); 027 028 <T> T as(Class<T> clazz, String keyPrefix); 029 030 String fetch(Object key); 031 032 String fetch(Object key, int index); 033 034 <T> T fetch(Object key, Class<T> clazz); 035 036 <T> T fetch(Object key, int index, Class<T> clazz); 037 038 <T> T fetchAll(Object key, Class<T> clazz); 039 040 void from(Object bean); 041 042 void from(Object bean, String keyPrefix); 043 044 <T> T get(Object key, Class<T> clazz); 045 046 <T> T get(Object key, int index, Class<T> clazz); 047 048 String put(String key, Object value); 049 050 String put(String key, Object value, int index); 051 052 void putAll(String key, Object value); 053 054 void to(Object bean); 055 056 void to(Object bean, String keyPrefix); 057}