Class Note

    • Constructor Detail

      • Note

        public Note()
        Creates a new empty Note object.
      • Note

        public Note​(Note original)
        Copy constructor.
        Parameters:
        original - the original object to duplicate.
      • Note

        public Note​(String content)
        Creates a new Note object with a content with a scope set to Note.AppliesTo.UNDEFINED.
        Parameters:
        content - the content of the note.
      • Note

        public Note​(String content,
                    Note.AppliesTo appliesTo)
        Creates a new Note object with a content and a scope.
        Parameters:
        content - the content of this note.
        appliesTo - the scope of this note.
    • Method Detail

      • toString

        public String toString()
        Gets a representation for this note: its content.
        Overrides:
        toString in class Object
        Returns:
        the text content of this note.
      • getText

        public String getText()
        Gets the text content of this note.
        Returns:
        the text content of this note.
      • setText

        public void setText​(String content)
        Sets the content of this note.
        Parameters:
        content - the new content to set.
      • isEmpty

        public boolean isEmpty()
        Indicates if this note is empty, that is if the content is null or empty.
        Returns:
        true if the content is null or empty.
      • getAppliesTo

        public Note.AppliesTo getAppliesTo()
        Gets the type of object this note applies to.
        Returns:
        the type of object this note applies to.
      • setAppliesTo

        public void setAppliesTo​(Note.AppliesTo appliesTo)
        Sets the type of object this note applies to.
        Parameters:
        appliesTo - the type of object this note applies to.
      • getId

        public String getId()
        Gets the id for this note.
        Returns:
        the id of this note (can be null).
      • setId

        public void setId​(String id)
        Sets the id for this note.
        Parameters:
        id - the new id to set.
      • getCategory

        public String getCategory()
        Gets the category for this note.
        Returns:
        the category for this note (can be null).
      • setCategory

        public void setCategory​(String category)
        Sets the category for this note.
        Parameters:
        category - the new category to set (can be null).
      • getPriority

        public int getPriority()
        Gets the priority for this note.
        Returns:
        the priority for this note. 1 indicates the highest priority, 10 the lowest.
      • setPriority

        public void setPriority​(int priority)
        Sets the priority for this note.
        Parameters:
        priority - the new priority to set. The value must be between 1 (inclusive) and 10 (inclusive). 1 indicates the highest priority, 10 the lowest.
      • equals

        public boolean equals​(Object obj)
        Description copied from class: DataWithExtAttributes
        Indicates if this object is equals to a given one.
        Overrides:
        equals in class DataWithExtAttributes
        Parameters:
        obj - the other object to compare.
        Returns:
        true if the two objects are identical.