1 /* 2 * Copyright (C) 2011 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 package com.android.loganalysis.item; 17 18 import org.json.JSONObject; 19 20 import java.util.HashMap; 21 22 /** 23 * An IItem that just represents a simple key/value map 24 */ 25 @SuppressWarnings("serial") 26 public class GenericMapItem<V> extends HashMap<String, V> implements IItem { 27 28 /** 29 * {@inheritDoc} 30 */ 31 @Override merge(IItem other)32 public IItem merge(IItem other) { 33 // FIXME 34 return this; 35 } 36 37 /** 38 * {@inheritDoc} 39 */ 40 @Override isConsistent(IItem other)41 public boolean isConsistent(IItem other) { 42 // FIXME 43 return true; 44 } 45 46 /** 47 * {@inheritDoc} 48 */ 49 @Override toJson()50 public JSONObject toJson() { 51 return new JSONObject(this); 52 } 53 } 54