コード例 #1
0
        protected internal override NavigableMap <String, ZoneRules> ProvideVersions(String zoneId)
        {
            SortedDictionary <String, ZoneRules> map = new SortedDictionary <String, ZoneRules>();
            ZoneRules rules = GetRules(zoneId, false);

            if (rules != null)
            {
                map[VersionId] = rules;
            }
            return(map);
        }
コード例 #2
0
ファイル: ZoneRules.cs プロジェクト: ranganathsb/JavaSharp
 /// <summary>
 /// Checks if this set of rules equals another.
 /// <para>
 /// Two rule sets are equal if they will always result in the same output
 /// for any given input instant or local date-time.
 /// Rules from two different groups may return false even if they are in fact the same.
 /// </para>
 /// <para>
 /// This definition should result in implementations comparing their entire state.
 ///
 /// </para>
 /// </summary>
 /// <param name="otherRules">  the other rules, null returns false </param>
 /// <returns> true if this rules is the same as that specified </returns>
 public override bool Equals(Object otherRules)
 {
     if (this == otherRules)
     {
         return(true);
     }
     if (otherRules is ZoneRules)
     {
         ZoneRules other = (ZoneRules)otherRules;
         return(Arrays.Equals(StandardTransitions, other.StandardTransitions) && Arrays.Equals(StandardOffsets, other.StandardOffsets) && Arrays.Equals(SavingsInstantTransitions, other.SavingsInstantTransitions) && Arrays.Equals(WallOffsets, other.WallOffsets) && Arrays.Equals(LastRules, other.LastRules));
     }
     return(false);
 }
コード例 #3
0
ファイル: Ser.cs プロジェクト: erherhh4herh/JavaSharp
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
//ORIGINAL LINE: private static Object readInternal(byte type, java.io.DataInput in) throws java.io.IOException, ClassNotFoundException
        private static Object ReadInternal(sbyte type, DataInput @in)
        {
            switch (type)
            {
            case ZRULES:
                return(ZoneRules.ReadExternal(@in));

            case ZOT:
                return(ZoneOffsetTransition.ReadExternal(@in));

            case ZOTRULE:
                return(ZoneOffsetTransitionRule.ReadExternal(@in));

            default:
                throw new StreamCorruptedException("Unknown serialized type");
            }
        }