blob: f251fa67dc571bdc564325b840d5b30b1ff45967 [file] [log] [blame]
Mark Slee83c52a82006-06-07 06:51:18 +00001package com.facebook.thrift.protocol;
2
3import com.facebook.thrift.types.*;
4
5/**
6 * Helper class that encapsulates map metadata.
7 *
8 * @author Mark Slee <mcslee@facebook.com>
9 */
10public class TMap {
11 public TMap() {}
12
13 public TMap(TType k, TType v, int s) {
Mark Sleef3c322b2006-06-26 23:52:22 +000014 this(k, v, new Int32(s));
Mark Slee83c52a82006-06-07 06:51:18 +000015 }
16
Mark Sleef3c322b2006-06-26 23:52:22 +000017 public TMap(TType k, TType v, Int32 s) {
Mark Slee83c52a82006-06-07 06:51:18 +000018 keyType = k;
19 valueType = v;
20 size = s;
21 }
22
23 public TType keyType = TType.STOP;
24 public TType valueType = TType.STOP;
Mark Sleef3c322b2006-06-26 23:52:22 +000025 public Int32 size = new Int32();;
Mark Slee83c52a82006-06-07 06:51:18 +000026}