@Override public boolean equals(Object o) { return o instanceof ProtoMember && type.equals(((ProtoMember) o).type) && member.equals(((ProtoMember) o).member); }
/** Creates a map type. */ ProtoType(ProtoType keyType, ProtoType valueType, String string) { checkNotNull(keyType, "keyType == null"); checkNotNull(valueType, "valueType == null"); checkNotNull(string, "string == null"); checkArgument( keyType.isScalar() && !keyType.equals(BYTES) && !keyType.equals(DOUBLE) && !keyType.equals( FLOAT), "map key must be non-byte, non-floating point scalar: %s", keyType); this.isScalar = false; this.string = string; this.isMap = true; this.keyType = keyType; // TODO restrict what's allowed here this.valueType = valueType; }
@Override public boolean equals(Object o) { return o instanceof ProtoMember && type.equals(((ProtoMember) o).type) && member.equals(((ProtoMember) o).member); }
@Override public boolean equals(Object o) { return o instanceof ProtoMember && type.equals(((ProtoMember) o).type) && member.equals(((ProtoMember) o).member); }
/** Creates a map type. */ ProtoType(ProtoType keyType, ProtoType valueType, String string) { checkNotNull(keyType, "keyType == null"); checkNotNull(valueType, "valueType == null"); checkNotNull(string, "string == null"); checkArgument( keyType.isScalar() && !keyType.equals(BYTES) && !keyType.equals(DOUBLE) && !keyType.equals( FLOAT), "map key must be non-byte, non-floating point scalar: %s", keyType); this.isScalar = false; this.string = string; this.isMap = true; this.keyType = keyType; // TODO restrict what's allowed here this.valueType = valueType; }
/** Creates a map type. */ ProtoType(ProtoType keyType, ProtoType valueType, String string) { checkNotNull(keyType, "keyType == null"); checkNotNull(valueType, "valueType == null"); checkNotNull(string, "string == null"); checkArgument( keyType.isScalar() && !keyType.equals(BYTES) && !keyType.equals(DOUBLE) && !keyType.equals( FLOAT), "map key must be non-byte, non-floating point scalar: %s", keyType); this.isScalar = false; this.string = string; this.isMap = true; this.keyType = keyType; // TODO restrict what's allowed here this.valueType = valueType; }