lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From paulir...@apache.org
Subject [29/53] [abbrv] git commit: Make dictionary value nullable to support logic
Date Thu, 07 Nov 2013 13:53:44 GMT
Make dictionary value nullable to support logic


Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/2332015f
Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/2332015f
Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/2332015f

Branch: refs/heads/branch_4x
Commit: 2332015f0789e0733e35e2a3fda31355d79a53c0
Parents: 5be6151
Author: Paul Irwin <paulirwin@gmail.com>
Authored: Sun Nov 3 19:02:36 2013 -0500
Committer: Paul Irwin <paulirwin@gmail.com>
Committed: Sun Nov 3 19:02:36 2013 -0500

----------------------------------------------------------------------
 src/contrib/Facet/Params/PerDimensionOrdinalPolicy.cs | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/2332015f/src/contrib/Facet/Params/PerDimensionOrdinalPolicy.cs
----------------------------------------------------------------------
diff --git a/src/contrib/Facet/Params/PerDimensionOrdinalPolicy.cs b/src/contrib/Facet/Params/PerDimensionOrdinalPolicy.cs
index 021ecd1..14461df 100644
--- a/src/contrib/Facet/Params/PerDimensionOrdinalPolicy.cs
+++ b/src/contrib/Facet/Params/PerDimensionOrdinalPolicy.cs
@@ -7,15 +7,15 @@ namespace Lucene.Net.Facet.Params
 {
     public class PerDimensionOrdinalPolicy : CategoryListParams
     {
-        private readonly IDictionary<String, OrdinalPolicy> policies;
+        private readonly IDictionary<String, OrdinalPolicy?> policies;
         private readonly OrdinalPolicy defaultOP;
 
-        public PerDimensionOrdinalPolicy(IDictionary<String, OrdinalPolicy> policies)
+        public PerDimensionOrdinalPolicy(IDictionary<String, OrdinalPolicy?> policies)
             : this(policies, DEFAULT_ORDINAL_POLICY)
         {
         }
 
-        public PerDimensionOrdinalPolicy(IDictionary<String, OrdinalPolicy> policies,
OrdinalPolicy defaultOP)
+        public PerDimensionOrdinalPolicy(IDictionary<String, OrdinalPolicy?> policies,
OrdinalPolicy defaultOP)
         {
             this.defaultOP = defaultOP;
             this.policies = policies;
@@ -23,8 +23,8 @@ namespace Lucene.Net.Facet.Params
 
         public override OrdinalPolicy GetOrdinalPolicy(string dimension)
         {
-            OrdinalPolicy op = policies[dimension];
-            return op == null ? defaultOP : op;
+            OrdinalPolicy? op = policies[dimension];
+            return op == null ? defaultOP : op.Value;
         }
 
         public override string ToString()


Mime
View raw message