public abstract class

AbstractCommentManager

extends Object
java.lang.Object
   ↳ com.pnfsoftware.jeb.core.units.impl.AbstractCommentManager<C, U extends com.pnfsoftware.jeb.core.units.IInteractiveUnit>
Known Direct Subclasses
Known Indirect Subclasses

Class Overview

An comment manager to be used by IInteractiveUnit. It supports dual-addressing: regular string address (per the interactive unit specifications), and custom address (methods for custom addressing are suffixed by 2). The conversion methods are to be provided by the subclass.

Specialized subclasses exist.

Summary

Constants
int COMMENT_FLAG_FAVORITE
int INLINE Constant used to identify an item's primary comment inlined with the item (for rendering purposes).
int PRE Constant used to identify an item's primary comment located above/before the item (for rendering purposes).
Public Constructors
AbstractCommentManager(U unit)
Public Methods
boolean addMetaComment(String address, MetaComment c, boolean notify)
boolean addMetaComment2(C coord, MetaComment c, boolean notify)
abstract C addressToCoord(String address)
abstract String coordToAddress(C coord)
String formatComments(String address, boolean includePre, int flagsMustHave, int flagsCantHave)
String formatComments2(C coord, boolean includePre, int flagsMustHave, int flagsCantHave)
String formatMetaComment(MetaComment c)
String formatMetaFlags(int flags)
Comment getComment(String address)
Comment getComment2(C coord)
Map<String, Comment> getComments()
Map<C, Comment> getComments2()
String getInlineComment(String address)
String getInlineComment2(C coord)
Collection<String> getMetaCommentObjects(String address, int flagsMustHave, int flagsCantHave)
Collection<String> getMetaCommentObjects2(C coord, int flagsMustHave, int flagsCantHave)
Collection<MetaComment> getMetaComments(String address, int flagsMustHave, int flagsCantHave)
Collection<MetaComment> getMetaComments(String address)
Collection<MetaComment> getMetaComments2(C coord)
Collection<MetaComment> getMetaComments2(C coord, int flagsMustHave, int flagsCantHave)
String getPreComment(String address)
String getPreComment2(C coord)
String getPrimary(String address, int position)
String getPrimary2(C coord, int position)
Map<String, String> getPrimaryMap(int position)
Map<C, String> getPrimaryMap2(int position)
U getUnit()
void putAll(Map<C, Comment> map)
boolean removeMetaComment(String address, MetaComment c, boolean notify)
boolean removeMetaComment2(C coord, MetaComment c, boolean notify)
boolean setComment(String address, Comment comment, boolean notify)
boolean setComment2(C coord, Comment comment, boolean notify)
boolean setInlineComment(String address, String value)
boolean setInlineComment(String address, String value, boolean notify)
boolean setInlineComment2(C coord, String value, boolean notify)
boolean setInlineComment2(C coord, String value)
boolean setPreComment(String address, String value, boolean notify)
boolean setPreComment(String address, String value)
boolean setPreComment2(C coord, String value, boolean notify)
boolean setPreComment2(C coord, String value)
boolean setPrimary(String address, String value, int position, boolean notify)
boolean setPrimary2(C coord, String value, int position, boolean notify)
[Expand]
Inherited Methods
From class java.lang.Object

Constants

public static final int COMMENT_FLAG_FAVORITE

Constant Value: 4096 (0x00001000)

public static final int INLINE

Constant used to identify an item's primary comment inlined with the item (for rendering purposes).

Constant Value: 0 (0x00000000)

public static final int PRE

Constant used to identify an item's primary comment located above/before the item (for rendering purposes).

Constant Value: -1 (0xffffffff)

Public Constructors

public AbstractCommentManager (U unit)

Public Methods

public boolean addMetaComment (String address, MetaComment c, boolean notify)

public boolean addMetaComment2 (C coord, MetaComment c, boolean notify)

public abstract C addressToCoord (String address)

public abstract String coordToAddress (C coord)

public String formatComments (String address, boolean includePre, int flagsMustHave, int flagsCantHave)

public String formatComments2 (C coord, boolean includePre, int flagsMustHave, int flagsCantHave)

public String formatMetaComment (MetaComment c)

public String formatMetaFlags (int flags)

public Comment getComment (String address)

public Comment getComment2 (C coord)

public Map<String, Comment> getComments ()

public Map<C, Comment> getComments2 ()

public String getInlineComment (String address)

public String getInlineComment2 (C coord)

public Collection<String> getMetaCommentObjects (String address, int flagsMustHave, int flagsCantHave)

public Collection<String> getMetaCommentObjects2 (C coord, int flagsMustHave, int flagsCantHave)

public Collection<MetaComment> getMetaComments (String address, int flagsMustHave, int flagsCantHave)

public Collection<MetaComment> getMetaComments (String address)

public Collection<MetaComment> getMetaComments2 (C coord)

public Collection<MetaComment> getMetaComments2 (C coord, int flagsMustHave, int flagsCantHave)

public String getPreComment (String address)

public String getPreComment2 (C coord)

public String getPrimary (String address, int position)

Parameters
position one of INLINE or PRE

public String getPrimary2 (C coord, int position)

Parameters
position one of INLINE or PRE

public Map<String, String> getPrimaryMap (int position)

Parameters
position one of INLINE or PRE

public Map<C, String> getPrimaryMap2 (int position)

Parameters
position one of INLINE or PRE

public U getUnit ()

public void putAll (Map<C, Comment> map)

public boolean removeMetaComment (String address, MetaComment c, boolean notify)

public boolean removeMetaComment2 (C coord, MetaComment c, boolean notify)

public boolean setComment (String address, Comment comment, boolean notify)

public boolean setComment2 (C coord, Comment comment, boolean notify)

public boolean setInlineComment (String address, String value)

public boolean setInlineComment (String address, String value, boolean notify)

public boolean setInlineComment2 (C coord, String value, boolean notify)

public boolean setInlineComment2 (C coord, String value)

public boolean setPreComment (String address, String value, boolean notify)

public boolean setPreComment (String address, String value)

public boolean setPreComment2 (C coord, String value, boolean notify)

public boolean setPreComment2 (C coord, String value)

public boolean setPrimary (String address, String value, int position, boolean notify)

Parameters
position one of INLINE or PRE

public boolean setPrimary2 (C coord, String value, int position, boolean notify)

Parameters
position one of INLINE or PRE