Class OrderedHashContainer

    • Field Detail

      • shouldClean

        protected boolean shouldClean
      • missPolicy

        protected transient SleepClosure missPolicy
        policy function for what to do when a miss occurs
      • removalPolicy

        protected transient SleepClosure removalPolicy
        policy function for what to do when a hit occurs
    • Constructor Detail

      • OrderedHashContainer

        public OrderedHashContainer​(int capacity,
                                    float loadfactor,
                                    boolean type)
        constructs an ordered hash container based on the specified items
    • Method Detail

      • setRemovalPolicy

        public void setRemovalPolicy​(SleepClosure policy)
        set the removal policy for this hash (decides if an entry should be removed or not
      • setMissPolicy

        public void setMissPolicy​(SleepClosure policy)
        set the miss policy for this hash (determines default value of missed value)
      • removeEldestEntryCheck

        protected boolean removeEldestEntryCheck​(java.util.Map.Entry eldest)
      • keys

        public ScalarArray keys()
        Description copied from interface: ScalarHash
        Returns all of the keys within the scalar hash. If a key has a $null (aka empty scalar) value the key should be removed from the scalar hash.
        Specified by:
        keys in interface ScalarHash
        Overrides:
        keys in class HashContainer
      • getAt

        public Scalar getAt​(Scalar key)
        Description copied from interface: ScalarHash
        Retrieves a scalar from the hashtable. If a scalar key does not exist then the key should be created with a value of $null. This $null or empty scalar value should be returned by the function. This is how values are added to Scalar hashes.
        Specified by:
        getAt in interface ScalarHash
        Overrides:
        getAt in class HashContainer