IPrimitiveMap.cs 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. /*
  2. * Licensed to the Apache Software Foundation (ASF) under one or more
  3. * contributor license agreements. See the NOTICE file distributed with
  4. * this work for additional information regarding copyright ownership.
  5. * The ASF licenses this file to You under the Apache License, Version 2.0
  6. * (the "License"); you may not use this file except in compliance with
  7. * the License. You may obtain a copy of the License at
  8. *
  9. * http://www.apache.org/licenses/LICENSE-2.0
  10. *
  11. * Unless required by applicable law or agreed to in writing, software
  12. * distributed under the License is distributed on an "AS IS" BASIS,
  13. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14. * See the License for the specific language governing permissions and
  15. * limitations under the License.
  16. */
  17. using System.Collections;
  18. namespace Apache.NMS
  19. {
  20. /// <summary>
  21. /// Represents a Map of primitive types where the keys are all string instances
  22. /// and the values are strings or numbers.
  23. /// </summary>
  24. public interface IPrimitiveMap
  25. {
  26. void Clear();
  27. bool Contains(object key);
  28. void Remove(object key);
  29. int Count { get; }
  30. ICollection Keys { get; }
  31. ICollection Values { get; }
  32. object this[string key] { get; set; }
  33. string GetString(string key);
  34. void SetString(string key, string value);
  35. bool GetBool(string key);
  36. void SetBool(string key, bool value);
  37. byte GetByte(string key);
  38. void SetByte(string key, byte value);
  39. char GetChar(string key);
  40. void SetChar(string key, char value);
  41. short GetShort(string key);
  42. void SetShort(string key, short value);
  43. int GetInt(string key);
  44. void SetInt(string key, int value);
  45. long GetLong(string key);
  46. void SetLong(string key, long value);
  47. float GetFloat(string key);
  48. void SetFloat(string key, float value);
  49. double GetDouble(string key);
  50. void SetDouble(string key, double value);
  51. IList GetList(string key);
  52. void SetList(string key, IList list);
  53. void SetBytes(string key, byte[] value);
  54. void SetBytes(string key, byte[] value, int offset, int length);
  55. byte[] GetBytes(string key);
  56. IDictionary GetDictionary(string key);
  57. void SetDictionary(string key, IDictionary dictionary);
  58. }
  59. }