CMLister
public interface ListingLibrary extends CMLibrary
Modifier and Type | Interface | Description |
---|---|---|
static interface |
ListingLibrary.ListStringer |
An interface to provide a custom conversion from an arbitrary
object type to a string, which might include String to String
conversions.
|
idConverter
Modifier and Type | Method | Description |
---|---|---|
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.
|
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.
|
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.
|
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.
|
activate, getServiceClient, L, propertiesLoaded, shutdown
copyOf, ID, initializeClass, name, newInstance
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)
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 listjava.lang.String build3ColTable(MOB viewerM, java.util.Map<java.lang.String,Ability> these, int ofType)
viewerM
- the player mob to use for session settingsthese
- the objects whose IDs to showofType
- -1, or a domain/ability type filterbuild3ColTable(MOB, Enumeration, int)
,
build3ColTable(MOB, Vector, int)
java.lang.String build3ColTable(MOB viewerM, java.util.Vector<Ability> these, int ofType)
viewerM
- the player mob to use for session settingsthese
- the objects whose IDs to showofType
- -1, or a domain/ability type filterbuild3ColTable(MOB, Enumeration, int)
,
build3ColTable(MOB, Map, int)
java.lang.String build3ColTable(MOB viewerM, java.util.Enumeration<Ability> these, int ofType)
viewerM
- the player mob to use for session settingsthese
- the objects whose IDs to showofType
- -1, or a domain/ability type filterbuild3ColTable(MOB, Vector, int)
,
build3ColTable(MOB, Map, int)
java.lang.String build3ColTable(MOB viewerM, java.util.Map<java.lang.String,? extends java.lang.Object> these)
viewerM
- the player mob to use for session settingsthese
- the objects whose IDs to showbuild3ColTable(MOB, Enumeration)
,
build3ColTable(MOB, Vector)
java.lang.String build3ColTable(MOB viewerM, java.util.Vector<? extends java.lang.Object> these)
viewerM
- the player mob to use for session settingsthese
- the objects whose IDs to showbuild3ColTable(MOB, Enumeration)
,
build3ColTable(MOB, Map)
java.lang.String build3ColTable(MOB viewerM, java.util.Enumeration<? extends java.lang.Object> these)
viewerM
- the player mob to use for session settingsthese
- the objects whose IDs to showbuild3ColTable(MOB, Vector)
,
build3ColTable(MOB, Map)
java.lang.String build3ColTable(MOB viewerM, java.util.Map<java.lang.String,Room> these, Room likeRoom)
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 filterbuild3ColTable(MOB, Enumeration, Room)
,
build3ColTable(MOB, Vector, Room)
java.lang.String build3ColTable(MOB viewerM, java.util.Vector<Room> these, Room likeRoom)
viewerM
- the player mob to use for session settingsthese
- the list of room IDs to showlikeRoom
- the room whose area serves as a filterbuild3ColTable(MOB, Enumeration, Room)
,
build3ColTable(MOB, Map, Room)
java.lang.String build3ColTable(MOB viewerM, java.util.Enumeration<Room> these, Room likeRoom)
viewerM
- the player mob to use for session settingsthese
- the list of room IDs to showlikeRoom
- the room whose area serves as a filterbuild3ColTable(MOB, Vector, Room)
,
build3ColTable(MOB, Map, Room)
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)
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 converterbuild3ColTable(MOB, Enumeration, Filterer[], ListStringer)
,
build3ColTable(MOB, Vector, Filterer[], ListStringer)
java.lang.String build3ColTable(MOB viewerM, java.util.Vector<? extends java.lang.Object> these, Filterer<java.lang.Object>[] filters, ListingLibrary.ListStringer stringer)
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 converterbuild3ColTable(MOB, Enumeration, Filterer[], ListStringer)
,
build3ColTable(MOB, Map, Filterer[], ListStringer)
java.lang.String build3ColTable(MOB viewerM, java.util.Enumeration<? extends java.lang.Object> these, Filterer<java.lang.Object>[] filters, ListingLibrary.ListStringer stringer)
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 converterbuild3ColTable(MOB, Map, Filterer[], ListStringer)
,
build3ColTable(MOB, Vector, Filterer[], ListStringer)
java.lang.String build2ColTable(MOB viewerM, java.util.Enumeration<? extends java.lang.Object> these)
viewerM
- the player mob to use for session settingsthese
- the list of objects to showbuild2ColTable(MOB, Enumeration, Filterer[], ListStringer)
java.lang.String build2ColTable(MOB viewerM, java.util.Enumeration<? extends java.lang.Object> these, Filterer<java.lang.Object>[] filters, ListingLibrary.ListStringer stringer)
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 converterbuild2ColTable(MOB, Enumeration)
java.lang.String buildWikiList(java.util.Enumeration<? extends CMObject> these, Filterer<java.lang.Object>[] filters, boolean includeName)
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 IDbuildWikiList(Enumeration, int)
java.lang.String buildWikiList(java.util.Enumeration<? extends CMObject> these, int ofType)
these
- an enumeration of objects to make a table fromofType
- -1, or a domain/ability type filterbuildWikiList(Enumeration, int)
java.lang.String build4ColTable(MOB viewerM, java.util.List<java.lang.String> reverseList)
viewerM
- the player mob to use for session settingsreverseList
- the list of strings to make a columned list frombuild4ColTable(MOB, List)
,
build4ColTable(MOB, List, String)
,
build3ColTable(MOB, List)
,
build3ColTable(MOB, List, String)
,
buildNColTable(MOB, List, String, int)
java.lang.String build4ColTable(MOB viewerM, java.util.List<java.lang.String> reverseList, java.lang.String tag)
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 inbuild4ColTable(MOB, List)
,
build4ColTable(MOB, List, String)
,
build3ColTable(MOB, List)
,
build3ColTable(MOB, List, String)
,
buildNColTable(MOB, List, String, int)
java.lang.String build3ColTable(MOB viewerM, java.util.List<java.lang.String> reverseList)
viewerM
- the player mob to use for session settingsreverseList
- the list of strings to make a columned list frombuild4ColTable(MOB, List)
,
build4ColTable(MOB, List, String)
,
build3ColTable(MOB, List)
,
build3ColTable(MOB, List, String)
,
buildNColTable(MOB, List, String, int)
java.lang.String build3ColTable(MOB viewerM, java.util.List<java.lang.String> reverseList, java.lang.String tag)
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 inbuild4ColTable(MOB, List)
,
build4ColTable(MOB, List, String)
,
build3ColTable(MOB, List)
,
build3ColTable(MOB, List, String)
,
buildNColTable(MOB, List, String, int)
java.lang.String buildNColTable(MOB viewerM, java.util.List<java.lang.String> reverseList, java.lang.String tag, int numCols)
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 intobuild4ColTable(MOB, List)
,
build4ColTable(MOB, List, String)
,
build3ColTable(MOB, List)
,
build3ColTable(MOB, List, String)
,
buildNColTable(MOB, List, String, int)
ListingLibrary.ListStringer getListStringer()
ListingLibrary.ListStringer
int fixColWidth(double colWidth, MOB mob)
colWidth
- the column width of 78mob
- the mob to take the session wrap fromSession.getWrap()
,
fixColWidth(double, double)
,
fixColWidth(double, Session)
,
fixColWidths(int[], Session)
int fixColWidth(double colWidth, Session session)
colWidth
- the column width of 78session
- the session to get wrap length fromSession.getWrap()
,
fixColWidth(double, double)
,
fixColWidth(double, MOB)
,
fixColWidths(int[], Session)
int fixColWidth(double colWidth, double totalWidth)
colWidth
- the column width of 78totalWidth
- the new total width (not 78)Session.getWrap()
,
fixColWidth(double, MOB)
,
fixColWidth(double, Session)
,
fixColWidths(int[], Session)
void fixColWidths(int[] colWidths, Session session)
colWidths
- the column widthssession
- the session to get wrap length fromSession.getWrap()
,
fixColWidth(double, double)
,
fixColWidth(double, MOB)
,
fixColWidth(double, Session)