Mark Slee | 83c52a8 | 2006-06-07 06:51:18 +0000 | [diff] [blame] | 1 | package com.facebook.thrift.protocol; |
| 2 | |
| 3 | import com.facebook.thrift.types.*; |
| 4 | |
| 5 | /** |
| 6 | * Helper class that encapsulates map metadata. |
| 7 | * |
| 8 | * @author Mark Slee <mcslee@facebook.com> |
| 9 | */ |
| 10 | public class TMap { |
| 11 | public TMap() {} |
| 12 | |
| 13 | public TMap(TType k, TType v, int s) { |
Mark Slee | f3c322b | 2006-06-26 23:52:22 +0000 | [diff] [blame] | 14 | this(k, v, new Int32(s)); |
Mark Slee | 83c52a8 | 2006-06-07 06:51:18 +0000 | [diff] [blame] | 15 | } |
| 16 | |
Mark Slee | f3c322b | 2006-06-26 23:52:22 +0000 | [diff] [blame] | 17 | public TMap(TType k, TType v, Int32 s) { |
Mark Slee | 83c52a8 | 2006-06-07 06:51:18 +0000 | [diff] [blame] | 18 | keyType = k; |
| 19 | valueType = v; |
| 20 | size = s; |
| 21 | } |
| 22 | |
| 23 | public TType keyType = TType.STOP; |
| 24 | public TType valueType = TType.STOP; |
Mark Slee | f3c322b | 2006-06-26 23:52:22 +0000 | [diff] [blame] | 25 | public Int32 size = new Int32();; |
Mark Slee | 83c52a8 | 2006-06-07 06:51:18 +0000 | [diff] [blame] | 26 | } |