CMObject
, Tickable
, CMLibrary
, ListingLibrary
, java.lang.Cloneable
, java.lang.Comparable<CMObject>
public class CMLister extends StdLibrary implements ListingLibrary
Modifier and Type | Class | Description |
---|---|---|
protected static class |
CMLister.AbilityTypeFilter |
|
protected static class |
CMLister.LikeRoomFilter |
ListingLibrary.ListStringer
Modifier and Type | Field | Description |
---|---|---|
protected static Filterer<java.lang.Object>[] |
NO_FILTER |
|
protected static ListingLibrary.ListStringer |
stringer |
idConverter
isDebugging, name, serviceClient, tickStatus
STATUS_AFFECT, STATUS_ALIVE, STATUS_BEHAVIOR, STATUS_CLASS, STATUS_DEAD, STATUS_END, STATUS_FIGHT, STATUS_MISC, STATUS_MISC2, STATUS_MISC3, STATUS_MISC4, STATUS_MISC5, STATUS_MISC6, STATUS_MISC7, STATUS_NOT, STATUS_OTHER, STATUS_RACE, STATUS_REBIRTH, STATUS_SCRIPT, STATUS_START, STATUS_WEATHER, TICKID_AREA, TICKID_BALLISTICK, TICKID_CLAN, TICKID_CLANITEM, TICKID_DEADBODY_DECAY, TICKID_ELECTRONICS, TICKID_EMAIL, TICKID_EVENT, TICKID_EXIT_BEHAVIOR, TICKID_EXIT_REOPEN, TICKID_ITEM_BEHAVIOR, TICKID_ITEM_BOUNCEBACK, TICKID_LIGHT_FLICKERS, TICKID_LIVEAUCTION, TICKID_LONGERMASK, TICKID_MISCELLANEOUS, TICKID_MOB, TICKID_PROPERTY_SPECIAL, TICKID_QUEST, TICKID_READYTOSTOP, TICKID_ROOM_BEHAVIOR, TICKID_ROOM_ITEM_REJUV, TICKID_SHORTERMASK, TICKID_SOLITARYMASK, TICKID_SPECIALCOMBAT, TICKID_SPECIALMANEUVER, TICKID_SPELL_AFFECT, TICKID_SUPPORT, TICKID_TIMEAUCTION, TICKID_TRAP_DESTRUCTION, TICKID_TRAP_RESET
Constructor | Description |
---|---|
CMLister() |
Modifier and Type | Method | Description |
---|---|---|
protected void |
appendReps(int reps,
java.lang.StringBuilder say,
boolean compress) |
|
java.lang.String |
build2ColTable(MOB viewerM,
java.util.Enumeration<? extends java.lang.Object> these) |
Given a viewer player mob from whose sessions the line wrap column will be used,
and an enumeration of objects to show in a two-column table, this will convert
the objects to ID (or class IDs) in a two column table.
|
java.lang.String |
build2ColTable(MOB viewerM,
java.util.Enumeration<? extends java.lang.Object> these,
Filterer<java.lang.Object>[] filters,
ListingLibrary.ListStringer stringer) |
Given a viewer player mob from whose sessions the line wrap column will be used,
an enumeration of objects to show in a two-column table, some optional filters
to choose which objects and shown, and a ListStringer to convert the objects
to strings, this will build the two-column table of strings.
|
java.lang.String |
build3ColTable(MOB viewerM,
java.util.Enumeration<? extends java.lang.Object> these) |
Given a viewer player mob from whose sessions the line wrap column will be used,
and an enumeration of objects whose IDs/class IDs will be the values, this will
create a three-column table.
|
java.lang.String |
build3ColTable(MOB viewerM,
java.util.Enumeration<? extends java.lang.Object> these,
Filterer<java.lang.Object>[] filters,
ListingLibrary.ListStringer stringer) |
Given a viewer player mob from whose sessions the line wrap column will be used,
an enumeration of objects to show in a three-column table, some optional filters
to choose which objects and shown, and a ListStringer to convert the objects
to strings, this will build the three-column table of strings.
|
java.lang.String |
build3ColTable(MOB viewerM,
java.util.Enumeration<Ability> these,
int ofType) |
Given a viewer player mob from whose sessions the line wrap column will be used,
and an enumeration of objects whose IDs/class IDs will be the values, this will
create a three-column table.
|
java.lang.String |
build3ColTable(MOB viewerM,
java.util.Enumeration<Room> these,
Room likeRoom) |
Given a viewer player mob from whose sessions the line wrap column will be used,
an enumeration of Room ID()s to show in a three-column table, and a room to
use as a filter, showing only the objects whose area has the same name as the filter
room, this will create a three-column table
|
java.lang.String |
build3ColTable(MOB viewerM,
java.util.List<java.lang.String> reverseList) |
Given a viewer player mob from whose sessions the line wrap column will be used,
and a list of identically classed strings, this will produce a table with the
three columns.
|
java.lang.String |
build3ColTable(MOB viewerM,
java.util.List<java.lang.String> reverseList,
java.lang.String tag) |
Given a viewer player mob from whose sessions the line wrap column will be used,
and a list of identically classed strings, this will produce a table with the
three columns.
|
java.lang.String |
build3ColTable(MOB viewerM,
java.util.Map<java.lang.String,? extends java.lang.Object> these) |
Given a viewer player mob from whose sessions the line wrap column will be used,
and an map of object values whose IDs/class IDs will be the values, this will
create a three-column table.
|
java.lang.String |
build3ColTable(MOB viewerM,
java.util.Map<java.lang.String,? extends java.lang.Object> these,
Filterer<java.lang.Object>[] filters,
ListingLibrary.ListStringer stringer) |
Given a viewer player mob from whose sessions the line wrap column will be used,
a map of Values to show in a three-column table, some optional filters
to choose which objects and shown, and a ListStringer to convert the objects
to strings, this will build the three-column table of strings taken only
from the values of the map.
|
java.lang.String |
build3ColTable(MOB viewerM,
java.util.Map<java.lang.String,Ability> these,
int ofType) |
Given a viewer player mob from whose sessions the line wrap column will be used,
and an map of Ability values whose IDs/class IDs will be the values, this will
create a three-column table.
|
java.lang.String |
build3ColTable(MOB viewerM,
java.util.Map<java.lang.String,Room> these,
Room likeRoom) |
Given a viewer player mob from whose sessions the line wrap column will be used,
a map of mapped room values whose ID()s show in a three-column table, and a room to
use as a filter, showing only the objects whose area has the same name as the filter
room, this will create a three-column table
|
java.lang.String |
build3ColTable(MOB viewerM,
java.util.Vector<? extends java.lang.Object> these) |
Given a viewer player mob from whose sessions the line wrap column will be used,
and a vector of objects whose IDs/class IDs will be the values, this will
create a three-column table.
|
java.lang.String |
build3ColTable(MOB viewerM,
java.util.Vector<? extends java.lang.Object> these,
Filterer<java.lang.Object>[] filters,
ListingLibrary.ListStringer stringer) |
Given a viewer player mob from whose sessions the line wrap column will be used,
a vector of objects to show in a three-column table, some optional filters
to choose which objects and shown, and a ListStringer to convert the objects
to strings, this will build the three-column table of strings.
|
java.lang.String |
build3ColTable(MOB viewerM,
java.util.Vector<Ability> these,
int ofType) |
Given a viewer player mob from whose sessions the line wrap column will be used,
and a vector of objects whose IDs/class IDs will be the values, this will
create a three-column table.
|
java.lang.String |
build3ColTable(MOB viewerM,
java.util.Vector<Room> these,
Room likeRoom) |
Given a viewer player mob from whose sessions the line wrap column will be used,
a vector of Room ID()s to show in a three-column table, and a room to
use as a filter, showing only the objects whose area has the same name as the filter
room, this will create a three-column table
|
java.lang.String |
build4ColTable(MOB viewerM,
java.util.List<java.lang.String> reverseList) |
Given a viewer player mob from whose sessions the line wrap column will be used,
and a list of identically classed strings, this will produce a table with the
four columns.
|
java.lang.String |
build4ColTable(MOB viewerM,
java.util.List<java.lang.String> reverseList,
java.lang.String tag) |
Given a viewer player mob from whose sessions the line wrap column will be used,
and a list of identically classed strings, this will produce a table with the
four columns.
|
protected Filterer<java.lang.Object>[] |
buildLikeRoomFilter(Room R) |
|
java.lang.String |
buildNColTable(MOB viewerM,
java.util.List<java.lang.String> reverseList,
java.lang.String tag,
int numCols) |
Given a viewer player mob from whose sessions the line wrap column will be used,
and a list of identically classed strings, this will produce a table with the
given number of columns.
|
protected Filterer<java.lang.Object>[] |
buildOfTypeFilter(int ofType) |
|
java.lang.String |
buildWikiList(java.util.Enumeration<? extends CMObject> these,
int ofType) |
To support publishing CoffeeMud engine data to wiki's, this method exists to produce tables
that conform to open-wiki type formats.
|
java.lang.String |
buildWikiList(java.util.Enumeration<? extends CMObject> these,
Filterer<java.lang.Object>[] filters,
boolean includeName) |
To support publishing CoffeeMud engine data to wiki's, this method exists to produce tables
that conform to open-wiki type formats.
|
int |
fixColWidth(double colWidth,
double totalWidth) |
Given a column width, which is expect to be a percent of 78,
this method will scale the value according to the given
user-preferred total wrap width.
|
int |
fixColWidth(double colWidth,
Session session) |
Given a column width, which is expect to be a percent of 78,
this method will scale the value according to the given
session's user-preferred total wrap width.
|
int |
fixColWidth(double colWidth,
MOB mob) |
Given a column width, which is expect to be a percent of 78,
this method will scale the value according to the given
mob's session's user-preferred total wrap width.
|
void |
fixColWidths(int[] colWidths,
Session session) |
Given a set of column widths, which are expected to add up to 78,
this method will scale the values of those widths according to the
given sessions line width preferences.
|
ListingLibrary.ListStringer |
getListStringer() |
Returns a default ListStringer object-to-string converter that
will return the class ID of the given object, unless it is
an Ability, Class, or Race, in which case it returns the ID
with an asterisk if it is generic.
|
protected int |
getReps(MOB viewerM,
Environmental item,
java.util.List<? extends Environmental> theRest,
boolean useName,
boolean longLook) |
|
java.lang.String |
ID() |
The CoffeeMud Java Class ID shared by all instances of
this object.
|
protected java.lang.String |
itemSeenString(MOB viewerM,
Environmental item,
boolean useName,
boolean longLook,
boolean sysmsgs,
boolean compress) |
|
java.lang.String |
lister(MOB viewerM,
java.util.List<? extends Environmental> items,
boolean useName,
java.lang.String tag,
java.lang.String tagParm,
boolean longLook,
boolean compress) |
Given a viewer player mob from whose sessions the line wrap column will be used,
a list of items, mobs, or exits (usually), optional xml/html tags, and various
flags to affect what property of the objects is shown, this will generate
a single column list of the given things.
|
java.lang.String |
summarizeTheRest(MOB viewerM,
java.util.List<? extends Environmental> things,
boolean compress) |
activate, getServiceClient, L, propertiesLoaded, shutdown
copyOf, initializeClass, name, newInstance
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
activate, checkDatabase, compareTo, copyOf, getServiceClient, getTickStatus, initializeClass, L, name, newInstance, propertiesLoaded, setThreadStatus, shutdown, tick
protected static final Filterer<java.lang.Object>[] NO_FILTER
protected static final ListingLibrary.ListStringer stringer
public java.lang.String ID()
CMObject
ID
in interface CMObject
ID
in class StdLibrary
public ListingLibrary.ListStringer getListStringer()
ListingLibrary
getListStringer
in interface ListingLibrary
ListingLibrary.ListStringer
protected java.lang.String itemSeenString(MOB viewerM, Environmental item, boolean useName, boolean longLook, boolean sysmsgs, boolean compress)
protected int getReps(MOB viewerM, Environmental item, java.util.List<? extends Environmental> theRest, boolean useName, boolean longLook)
protected void appendReps(int reps, java.lang.StringBuilder say, boolean compress)
public java.lang.String summarizeTheRest(MOB viewerM, java.util.List<? extends Environmental> things, boolean compress)
public java.lang.String lister(MOB viewerM, java.util.List<? extends Environmental> items, boolean useName, java.lang.String tag, java.lang.String tagParm, boolean longLook, boolean compress)
ListingLibrary
lister
in interface ListingLibrary
viewerM
- the player mob to use for session settingsitems
- the items, exits, mobs, whateveruseName
- true to use names, false for display texttag
- null, or an optional tag to includetagParm
- null, * for item name, or thing to append to taglongLook
- true to bypass max, and shows container contentscompress
- true to return paragraph, false is the normal listprotected Filterer<java.lang.Object>[] buildOfTypeFilter(int ofType)
public java.lang.String build3ColTable(MOB viewerM, java.util.Map<java.lang.String,Ability> these, int ofType)
ListingLibrary
build3ColTable
in interface ListingLibrary
viewerM
- the player mob to use for session settingsthese
- the objects whose IDs to showofType
- -1, or a domain/ability type filterListingLibrary.build3ColTable(MOB, Enumeration, int)
,
ListingLibrary.build3ColTable(MOB, Vector, int)
public java.lang.String build3ColTable(MOB viewerM, java.util.Map<java.lang.String,? extends java.lang.Object> these)
ListingLibrary
build3ColTable
in interface ListingLibrary
viewerM
- the player mob to use for session settingsthese
- the objects whose IDs to showListingLibrary.build3ColTable(MOB, Enumeration)
,
ListingLibrary.build3ColTable(MOB, Vector)
public java.lang.String build3ColTable(MOB viewerM, java.util.Map<java.lang.String,Room> these, Room likeRoom)
ListingLibrary
build3ColTable
in interface ListingLibrary
viewerM
- the player mob to use for session settingsthese
- the map of room objects whose IDs to showlikeRoom
- the room whose area serves as a filterListingLibrary.build3ColTable(MOB, Enumeration, Room)
,
ListingLibrary.build3ColTable(MOB, Vector, Room)
public java.lang.String build3ColTable(MOB viewerM, java.util.Vector<Ability> these, int ofType)
ListingLibrary
build3ColTable
in interface ListingLibrary
viewerM
- the player mob to use for session settingsthese
- the objects whose IDs to showofType
- -1, or a domain/ability type filterListingLibrary.build3ColTable(MOB, Enumeration, int)
,
ListingLibrary.build3ColTable(MOB, Map, int)
public java.lang.String build3ColTable(MOB viewerM, java.util.Enumeration<Ability> these, int ofType)
ListingLibrary
build3ColTable
in interface ListingLibrary
viewerM
- the player mob to use for session settingsthese
- the objects whose IDs to showofType
- -1, or a domain/ability type filterListingLibrary.build3ColTable(MOB, Vector, int)
,
ListingLibrary.build3ColTable(MOB, Map, int)
public java.lang.String build3ColTable(MOB viewerM, java.util.Vector<? extends java.lang.Object> these)
ListingLibrary
build3ColTable
in interface ListingLibrary
viewerM
- the player mob to use for session settingsthese
- the objects whose IDs to showListingLibrary.build3ColTable(MOB, Enumeration)
,
ListingLibrary.build3ColTable(MOB, Map)
public java.lang.String build3ColTable(MOB viewerM, java.util.Enumeration<? extends java.lang.Object> these)
ListingLibrary
build3ColTable
in interface ListingLibrary
viewerM
- the player mob to use for session settingsthese
- the objects whose IDs to showListingLibrary.build3ColTable(MOB, Vector)
,
ListingLibrary.build3ColTable(MOB, Map)
public java.lang.String build3ColTable(MOB viewerM, java.util.Vector<Room> these, Room likeRoom)
ListingLibrary
build3ColTable
in interface ListingLibrary
viewerM
- the player mob to use for session settingsthese
- the list of room IDs to showlikeRoom
- the room whose area serves as a filterListingLibrary.build3ColTable(MOB, Enumeration, Room)
,
ListingLibrary.build3ColTable(MOB, Map, Room)
public java.lang.String build3ColTable(MOB viewerM, java.util.Map<java.lang.String,? extends java.lang.Object> these, Filterer<java.lang.Object>[] filters, ListingLibrary.ListStringer stringer)
ListingLibrary
build3ColTable
in interface ListingLibrary
viewerM
- the player mob to use for session settingsthese
- the map of objects to show -- values onlyfilters
- null, or filters to choose which objects to showstringer
- required object to string converterListingLibrary.build3ColTable(MOB, Enumeration, Filterer[], ListStringer)
,
ListingLibrary.build3ColTable(MOB, Vector, Filterer[], ListStringer)
public java.lang.String build3ColTable(MOB viewerM, java.util.Vector<? extends java.lang.Object> these, Filterer<java.lang.Object>[] filters, ListingLibrary.ListStringer stringer)
ListingLibrary
build3ColTable
in interface ListingLibrary
viewerM
- the player mob to use for session settingsthese
- the list of objects to showfilters
- null, or filters to choose which objects to showstringer
- required object to string converterListingLibrary.build3ColTable(MOB, Enumeration, Filterer[], ListStringer)
,
ListingLibrary.build3ColTable(MOB, Map, Filterer[], ListStringer)
public java.lang.String build3ColTable(MOB viewerM, java.util.Enumeration<Room> these, Room likeRoom)
ListingLibrary
build3ColTable
in interface ListingLibrary
viewerM
- the player mob to use for session settingsthese
- the list of room IDs to showlikeRoom
- the room whose area serves as a filterListingLibrary.build3ColTable(MOB, Vector, Room)
,
ListingLibrary.build3ColTable(MOB, Map, Room)
public java.lang.String build3ColTable(MOB viewerM, java.util.Enumeration<? extends java.lang.Object> these, Filterer<java.lang.Object>[] filters, ListingLibrary.ListStringer stringer)
ListingLibrary
build3ColTable
in interface ListingLibrary
viewerM
- the player mob to use for session settingsthese
- the list of objects to showfilters
- null, or filters to choose which objects to showstringer
- required object to string converterListingLibrary.build3ColTable(MOB, Map, Filterer[], ListStringer)
,
ListingLibrary.build3ColTable(MOB, Vector, Filterer[], ListStringer)
public java.lang.String buildWikiList(java.util.Enumeration<? extends CMObject> these, int ofType)
ListingLibrary
buildWikiList
in interface ListingLibrary
these
- an enumeration of objects to make a table fromofType
- -1, or a domain/ability type filterListingLibrary.buildWikiList(Enumeration, int)
public java.lang.String buildWikiList(java.util.Enumeration<? extends CMObject> these, Filterer<java.lang.Object>[] filters, boolean includeName)
ListingLibrary
buildWikiList
in interface ListingLibrary
these
- an enumeration of objects to make a table fromfilters
- filters to choose which objects can be shownincludeName
- true to show the name, false to use the IDListingLibrary.buildWikiList(Enumeration, int)
public java.lang.String build2ColTable(MOB viewerM, java.util.Enumeration<? extends java.lang.Object> these)
ListingLibrary
build2ColTable
in interface ListingLibrary
viewerM
- the player mob to use for session settingsthese
- the list of objects to showListingLibrary.build2ColTable(MOB, Enumeration, Filterer[], ListStringer)
public java.lang.String build2ColTable(MOB viewerM, java.util.Enumeration<? extends java.lang.Object> these, Filterer<java.lang.Object>[] filters, ListingLibrary.ListStringer stringer)
ListingLibrary
build2ColTable
in interface ListingLibrary
viewerM
- the player mob to use for session settingsthese
- the list of objects to showfilters
- null, or filters to choose which objects to showstringer
- required object to string converterListingLibrary.build2ColTable(MOB, Enumeration)
public java.lang.String build4ColTable(MOB viewerM, java.util.List<java.lang.String> reverseList)
ListingLibrary
build4ColTable
in interface ListingLibrary
viewerM
- the player mob to use for session settingsreverseList
- the list of strings to make a columned list fromListingLibrary.build4ColTable(MOB, List)
,
ListingLibrary.build4ColTable(MOB, List, String)
,
ListingLibrary.build3ColTable(MOB, List)
,
ListingLibrary.build3ColTable(MOB, List, String)
,
ListingLibrary.buildNColTable(MOB, List, String, int)
public java.lang.String build4ColTable(MOB viewerM, java.util.List<java.lang.String> reverseList, java.lang.String tag)
ListingLibrary
build4ColTable
in interface ListingLibrary
viewerM
- the player mob to use for session settingsreverseList
- the list of strings to make a columned list fromtag
- null, or a tag to wrap the string inListingLibrary.build4ColTable(MOB, List)
,
ListingLibrary.build4ColTable(MOB, List, String)
,
ListingLibrary.build3ColTable(MOB, List)
,
ListingLibrary.build3ColTable(MOB, List, String)
,
ListingLibrary.buildNColTable(MOB, List, String, int)
public java.lang.String build3ColTable(MOB viewerM, java.util.List<java.lang.String> reverseList)
ListingLibrary
build3ColTable
in interface ListingLibrary
viewerM
- the player mob to use for session settingsreverseList
- the list of strings to make a columned list fromListingLibrary.build4ColTable(MOB, List)
,
ListingLibrary.build4ColTable(MOB, List, String)
,
ListingLibrary.build3ColTable(MOB, List)
,
ListingLibrary.build3ColTable(MOB, List, String)
,
ListingLibrary.buildNColTable(MOB, List, String, int)
public java.lang.String build3ColTable(MOB viewerM, java.util.List<java.lang.String> reverseList, java.lang.String tag)
ListingLibrary
build3ColTable
in interface ListingLibrary
viewerM
- the player mob to use for session settingsreverseList
- the list of strings to make a columned list fromtag
- null, or a tag to wrap the string inListingLibrary.build4ColTable(MOB, List)
,
ListingLibrary.build4ColTable(MOB, List, String)
,
ListingLibrary.build3ColTable(MOB, List)
,
ListingLibrary.build3ColTable(MOB, List, String)
,
ListingLibrary.buildNColTable(MOB, List, String, int)
public int fixColWidth(double colWidth, MOB mob)
ListingLibrary
fixColWidth
in interface ListingLibrary
colWidth
- the column width of 78mob
- the mob to take the session wrap fromSession.getWrap()
,
ListingLibrary.fixColWidth(double, double)
,
ListingLibrary.fixColWidth(double, Session)
,
ListingLibrary.fixColWidths(int[], Session)
public int fixColWidth(double colWidth, Session session)
ListingLibrary
fixColWidth
in interface ListingLibrary
colWidth
- the column width of 78session
- the session to get wrap length fromSession.getWrap()
,
ListingLibrary.fixColWidth(double, double)
,
ListingLibrary.fixColWidth(double, MOB)
,
ListingLibrary.fixColWidths(int[], Session)
public void fixColWidths(int[] colWidths, Session session)
ListingLibrary
fixColWidths
in interface ListingLibrary
colWidths
- the column widthssession
- the session to get wrap length fromSession.getWrap()
,
ListingLibrary.fixColWidth(double, double)
,
ListingLibrary.fixColWidth(double, MOB)
,
ListingLibrary.fixColWidth(double, Session)
public int fixColWidth(double colWidth, double totalWidth)
ListingLibrary
fixColWidth
in interface ListingLibrary
colWidth
- the column width of 78totalWidth
- the new total width (not 78)Session.getWrap()
,
ListingLibrary.fixColWidth(double, MOB)
,
ListingLibrary.fixColWidth(double, Session)
,
ListingLibrary.fixColWidths(int[], Session)
public java.lang.String buildNColTable(MOB viewerM, java.util.List<java.lang.String> reverseList, java.lang.String tag, int numCols)
ListingLibrary
buildNColTable
in interface ListingLibrary
viewerM
- the player mob to use for session settingsreverseList
- the list of strings to make a columned list fromtag
- null, or a tag to wrap the string innumCols
- the number of columns to put the data intoListingLibrary.build4ColTable(MOB, List)
,
ListingLibrary.build4ColTable(MOB, List, String)
,
ListingLibrary.build3ColTable(MOB, List)
,
ListingLibrary.build3ColTable(MOB, List, String)
,
ListingLibrary.buildNColTable(MOB, List, String, int)