From af60852d7edb10054621bbfb67134d93cf4dfb1b Mon Sep 17 00:00:00 2001 From: Travis Reitter Date: Thu, 14 Jul 2011 16:57:01 -0700 Subject: [PATCH] Centralize parameters to AbstractFieldDetails. This cuts some lines of code from the derived classes. Helps: bgo#653679 - Change PostalAddressDetails.postal_addresses to support vCard-like arbitrary parameters --- folks/abstract-field-details.vala | 4 +++- folks/field-details.vala | 14 -------------- 2 files changed, 3 insertions(+), 15 deletions(-) diff --git a/folks/abstract-field-details.vala b/folks/abstract-field-details.vala index 15ee926..123da61 100644 --- a/folks/abstract-field-details.vala +++ b/folks/abstract-field-details.vala @@ -61,10 +61,12 @@ public abstract class Folks.AbstractFieldDetails : Object set { this._value = value; } } + private MultiMap _parameters = + new HashMultiMap (); /** * The parameters associated with the value. * - * A hash table of the parameters associated with + * A multi-map of the parameters associated with * {@link Folks.AbstractFieldDetails.value}. The keys are the names of * the parameters, while the values are a list of strings. * diff --git a/folks/field-details.vala b/folks/field-details.vala index 71cb3c8..8a62969 100644 --- a/folks/field-details.vala +++ b/folks/field-details.vala @@ -37,19 +37,6 @@ using Gee; */ public class Folks.FieldDetails : AbstractFieldDetails { - private MultiMap _parameters; - /** - * The parameters of this FieldDetails. - * - * See {@link Folks.AbstractFieldDetails.parameters}. - * @since 0.5.1 - */ - public override MultiMap parameters - { - get { return this._parameters; } - set { this._parameters = value; } - } - /** * Create a new FieldDetails. * @@ -61,6 +48,5 @@ public class Folks.FieldDetails : AbstractFieldDetails public FieldDetails (string value) { this.value = value; - this._parameters = new HashMultiMap (); } } -- 2.7.4