Class BitSet

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, SCO<java.util.BitSet>

    public class BitSet
    extends java.util.BitSet
    implements SCO<java.util.BitSet>
    A mutable second-class BitSet object.
    See Also:
    Serialized Form
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void and​(java.util.BitSet set)  
      void andNot​(java.util.BitSet set)  
      void attachCopy​(java.util.BitSet value)
      Method to attached the passed value.
      void clear()  
      void clear​(int bitIndex)  
      void clear​(int fromIndex, int toIndex)  
      java.lang.Object clone()
      Creates and returns a copy of this object.
      java.util.BitSet detachCopy​(FetchPlanState state)
      Method to detach a copy.
      void flip​(int bitIndex)  
      void flip​(int fromIndex, int toIndex)  
      java.lang.String getFieldName()
      Accessor for the field name
      java.lang.Object getOwner()
      Accessor for the owner.
      java.util.BitSet getValue()
      Accessor for the unwrapped value that we are wrapping.
      void initialise()
      Method to initialise the SCO for use, and allowing the SCO to be loaded from the datastore (when we have a backing store).
      void initialise​(java.util.BitSet set)
      Method to initialise the SCO for use with the provided initial value.
      void initialise​(java.util.BitSet newValue, java.lang.Object oldValue)
      Method to initialise the SCO for use, where replacing an old value with a new value such as when calling a setter field passing in a new value.
      void makeDirty()
      Utility to mark the object as dirty
      void or​(java.util.BitSet set)  
      void set​(int bitIndex)  
      void set​(int bitIndex, boolean value)  
      void set​(int fromIndex, int toIndex)  
      void set​(int fromIndex, int toIndex, boolean value)  
      void unsetOwner()
      Utility to unset the owner.
      protected java.lang.Object writeReplace()
      The writeReplace method is called when ObjectOutputStream is preparing to write the object to the stream.
      void xor​(java.util.BitSet set)  
      • Methods inherited from class java.util.BitSet

        cardinality, equals, get, get, hashCode, intersects, isEmpty, length, nextClearBit, nextSetBit, previousClearBit, previousSetBit, size, stream, toByteArray, toLongArray, toString, valueOf, valueOf, valueOf, valueOf
      • Methods inherited from class java.lang.Object

        finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • BitSet

        public BitSet​(DNStateManager sm,
                      AbstractMemberMetaData mmd)
        Creates a BitSet object. Assigns owning object and field name.
        Parameters:
        sm - StateManager for the owning object
        mmd - Metadata for the member
    • Method Detail

      • initialise

        public void initialise()
        Description copied from interface: SCO
        Method to initialise the SCO for use, and allowing the SCO to be loaded from the datastore (when we have a backing store). This can be utilised to perform any eager loading of information from the datastore.
        Specified by:
        initialise in interface SCO<java.util.BitSet>
      • initialise

        public void initialise​(java.util.BitSet newValue,
                               java.lang.Object oldValue)
        Description copied from interface: SCO
        Method to initialise the SCO for use, where replacing an old value with a new value such as when calling a setter field passing in a new value. Note that oldValue is marked as Object since for cases where the member type is Collection the newValue could be, for example, ArrayList, and the oldValue of type Collection (representing null).
        Specified by:
        initialise in interface SCO<java.util.BitSet>
        Parameters:
        newValue - New value (to wrap)
        oldValue - Old value (to use in deciding what needs deleting etc)
      • initialise

        public void initialise​(java.util.BitSet set)
        Description copied from interface: SCO
        Method to initialise the SCO for use with the provided initial value. This is used, for example, when retrieving the field from the datastore and setting it in the persistable object.
        Specified by:
        initialise in interface SCO<java.util.BitSet>
        Parameters:
        set - the object from which to copy the value.
      • getValue

        public java.util.BitSet getValue()
        Accessor for the unwrapped value that we are wrapping.
        Specified by:
        getValue in interface SCO<java.util.BitSet>
        Returns:
        The unwrapped value
      • unsetOwner

        public void unsetOwner()
        Utility to unset the owner.
        Specified by:
        unsetOwner in interface SCO<java.util.BitSet>
      • getOwner

        public java.lang.Object getOwner()
        Accessor for the owner.
        Specified by:
        getOwner in interface SCO<java.util.BitSet>
        Returns:
        The owner
      • getFieldName

        public java.lang.String getFieldName()
        Accessor for the field name
        Specified by:
        getFieldName in interface SCO<java.util.BitSet>
        Returns:
        The field name
      • makeDirty

        public void makeDirty()
        Utility to mark the object as dirty
      • detachCopy

        public java.util.BitSet detachCopy​(FetchPlanState state)
        Method to detach a copy.
        Specified by:
        detachCopy in interface SCO<java.util.BitSet>
        Parameters:
        state - State for detachment process
        Returns:
        A copy of the object
      • attachCopy

        public void attachCopy​(java.util.BitSet value)
        Method to attached the passed value.
        Specified by:
        attachCopy in interface SCO<java.util.BitSet>
        Parameters:
        value - The new value
      • clone

        public java.lang.Object clone()
        Creates and returns a copy of this object.

        Mutable second-class Objects are required to provide a public clone method in order to allow for copying persistable objects. In contrast to Object.clone(), this method must not throw a CloneNotSupportedException.

        Specified by:
        clone in interface SCO<java.util.BitSet>
        Overrides:
        clone in class java.util.BitSet
        Returns:
        A clone of the object
      • writeReplace

        protected java.lang.Object writeReplace()
                                         throws java.io.ObjectStreamException
        The writeReplace method is called when ObjectOutputStream is preparing to write the object to the stream. The ObjectOutputStream checks whether the class defines the writeReplace method. If the method is defined, the writeReplace method is called to allow the object to designate its replacement in the stream. The object returned should be either of the same type as the object passed in or an object that when read and resolved will result in an object of a type that is compatible with all references to the object.
        Returns:
        the replaced object
        Throws:
        java.io.ObjectStreamException - if an error occurs
      • and

        public void and​(java.util.BitSet set)
        Overrides:
        and in class java.util.BitSet
      • andNot

        public void andNot​(java.util.BitSet set)
        Overrides:
        andNot in class java.util.BitSet
      • clear

        public void clear​(int bitIndex)
        Overrides:
        clear in class java.util.BitSet
      • or

        public void or​(java.util.BitSet set)
        Overrides:
        or in class java.util.BitSet
      • set

        public void set​(int bitIndex)
        Overrides:
        set in class java.util.BitSet
      • xor

        public void xor​(java.util.BitSet set)
        Overrides:
        xor in class java.util.BitSet
      • clear

        public void clear()
        Overrides:
        clear in class java.util.BitSet
      • clear

        public void clear​(int fromIndex,
                          int toIndex)
        Overrides:
        clear in class java.util.BitSet
      • flip

        public void flip​(int fromIndex,
                         int toIndex)
        Overrides:
        flip in class java.util.BitSet
      • flip

        public void flip​(int bitIndex)
        Overrides:
        flip in class java.util.BitSet
      • set

        public void set​(int bitIndex,
                        boolean value)
        Overrides:
        set in class java.util.BitSet
      • set

        public void set​(int fromIndex,
                        int toIndex,
                        boolean value)
        Overrides:
        set in class java.util.BitSet
      • set

        public void set​(int fromIndex,
                        int toIndex)
        Overrides:
        set in class java.util.BitSet