Class Section

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, java.util.Map<java.lang.String,​SectionEntry>

    public class Section
    extends java.util.LinkedHashMap<java.lang.String,​SectionEntry>
    See Also:
    Serialized Form
    • Nested Class Summary

      • Nested classes/interfaces inherited from class java.util.AbstractMap

        java.util.AbstractMap.SimpleEntry<K extends java.lang.Object,​V extends java.lang.Object>, java.util.AbstractMap.SimpleImmutableEntry<K extends java.lang.Object,​V extends java.lang.Object>
    • Constructor Summary

      Constructors 
      Constructor Description
      Section​(DataSheet parent, java.lang.String key)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void generate​(java.io.PrintWriter pw)  
      java.util.Map<java.lang.Long,​SectionEntry> getEntriesForKey​(java.lang.String key)  
      SectionEntry getEntryForKeyAndIndex​(java.lang.String key, long index)  
      java.lang.String getKey()  
      DataSheet getParent()  
      SectionEntry put​(java.lang.String key, SectionEntry value)  
      void putAll​(java.util.Map<? extends java.lang.String,​? extends SectionEntry> m)  
      SectionEntry putIfAbsent​(java.lang.String key, SectionEntry value)  
      protected void registerEntry​(java.lang.String key, long index, SectionEntry entry)  
      java.lang.String toString()  
      • Methods inherited from class java.util.LinkedHashMap

        clear, containsValue, entrySet, forEach, get, getOrDefault, keySet, removeEldestEntry, replaceAll, values
      • Methods inherited from class java.util.HashMap

        clone, compute, computeIfAbsent, computeIfPresent, containsKey, isEmpty, merge, remove, remove, replace, replace, size
      • Methods inherited from class java.util.AbstractMap

        equals, hashCode
      • Methods inherited from class java.lang.Object

        finalize, getClass, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface java.util.Map

        compute, computeIfAbsent, computeIfPresent, containsKey, equals, hashCode, isEmpty, merge, remove, remove, replace, replace, size
    • Field Detail

      • sectionName

        public static final java.util.regex.Pattern sectionName
      • entryName

        public static final java.util.regex.Pattern entryName
      • numberedEntry

        public static final java.util.regex.Pattern numberedEntry
      • key

        protected final java.lang.String key
      • entryMap

        protected final java.util.Map<java.lang.String,​java.util.Map<java.lang.Long,​SectionEntry>> entryMap
    • Constructor Detail

      • Section

        public Section​(DataSheet parent,
                       java.lang.String key)
    • Method Detail

      • getKey

        public java.lang.String getKey()
      • putAll

        public void putAll​(java.util.Map<? extends java.lang.String,​? extends SectionEntry> m)
        Specified by:
        putAll in interface java.util.Map<java.lang.String,​SectionEntry>
        Overrides:
        putAll in class java.util.HashMap<java.lang.String,​SectionEntry>
      • putIfAbsent

        public SectionEntry putIfAbsent​(java.lang.String key,
                                        SectionEntry value)
        Specified by:
        putIfAbsent in interface java.util.Map<java.lang.String,​SectionEntry>
        Overrides:
        putIfAbsent in class java.util.HashMap<java.lang.String,​SectionEntry>
      • generate

        public void generate​(java.io.PrintWriter pw)
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.util.AbstractMap<java.lang.String,​SectionEntry>
      • getEntriesForKey

        public java.util.Map<java.lang.Long,​SectionEntry> getEntriesForKey​(java.lang.String key)
      • getEntryForKeyAndIndex

        public SectionEntry getEntryForKeyAndIndex​(java.lang.String key,
                                                   long index)
      • registerEntry

        protected void registerEntry​(java.lang.String key,
                                     long index,
                                     SectionEntry entry)