Package squidpony

Utilities that don't fit elsewhere in SquidLib; mostly text manipulation, compression, and helper code.
  • Interface Summary 
    Interface Description
    IColorCenter<T>
    How to manage colors, making sure that a color is allocated at most once.
    IFilter<T>
    A filter is a function on colors.
  • Class Summary 
    Class Description
    ArrayTools
    Static methods for various frequently-used operations on 1D and 2D arrays.
    ByteStringEncoding
    An experimental variant on LZSEncoding to encode byte arrays to compressed Strings, and decode them back.
    ColoredStringList<T>
    An helper class for code that deals with lists of IColoredStrings.
    Converters
    Ways to produce concrete implementations of StringConvert for various data structures.
    DamerauLevenshteinAlgorithm
    The Damerau-Levenshtein Algorithm is an extension to the Levenshtein Algorithm which solves the edit distance problem between a source string and a target string with the following operations: Character Insertion Character Deletion Character Replacement Adjacent Character Swap Note that the adjacent character swap operation is an edit that may be applied when two adjacent characters in the source string match two adjacent characters in the target string, but in reverse order, rather than a general allowance for adjacent character swaps.
    FakeLanguageGen
    A text generator for producing sentences and/or words in nonsense languages that fit a theme.
    FakeLanguageGen.Alteration  
    FakeLanguageGen.Modifier  
    FakeLanguageGen.SentenceForm
    A simple way to bundle a FakeLanguageGen with the arguments that would be passed to it when calling FakeLanguageGen.sentence(IRNG, int, int, String[], String[], double, int) or one of its overloads.
    Garbler
    Tools for garbling Strings (making them appear to be gibberish) and degarbling earlier outputs to get the original inputs.
    GridCompression
    Very early way of additional compression that can be applied to 2D double and byte arrays.
    IColorCenter.Skeleton<T>
    A skeletal implementation of IColorCenter.
    LZSEncoding
    LZ-String compression; wrapped by LZSPlus for convenience, but extended functionality is available here.
    LZSPlus
    LZ-String compression, taking Strings and compressing them to other Strings, optionally with some encryption.
    Maker
    Utility methods for more easily constructing data structures, particularly those in Java's standard library.
    MarkovChar
    A simple Markov chain text generator; call MarkovChar.analyze(CharSequence) once on a large sample text, then you can call MarkovChar.chain(long) many times to get odd-sounding "remixes" of the sample text.
    MarkovObject<T>
    A simple Markov chain generator that works with Lists of some type instead of text like MarkovTextLimited.
    MarkovText
    A simple Markov chain text generator; call MarkovText.analyze(CharSequence) once on a large sample text, then you can call MarkovText.chain(long) many times to get odd-sounding "remixes" of the sample text.
    MarkovTextLimited
    A simple Markov chain text generator; it is called "Limited" because it only can be used as an order-1 Markov chain, meaning only one prior word is looked at.
    Messaging
    Helps handle formation of messages from a template, using correct pronouns and helping handle various idiosyncrasies in English-language text.
    Messaging.BeingSubstitution  
    Messaging.Group  
    Mnemonic
    A utility class to print (typically very large) numbers in a way that players can more-meaningfully tell them apart.
    MonsterGen
    A class for generating random monster descriptions; can be subclassed to generate stats for a specific game.
    MonsterGen.Chimera
    A creature that can be mixed with other Chimeras or given additional descriptors, then printed in a usable format for game text.
    NaturalLanguageCipher
    Class that builds up a dictionary of words in an English-language source text to words generated by a FakeLanguageGen, and can translate a source text to a similarly-punctuated, similarly-capitalized fake text; it will try to use variants on the translation of the same root word when it encounters conjugations of that root word or that root word with common English prefixes/suffixes.
    ObText
    A simple format parser for String-based configuration or data files where JSON is overkill.
    ObText.ContentMatcher  
    ObText.ObTextEntry  
    ProceduralMessaging
    Combines Messaging with Thesaurus and optionally NaturalLanguageCipher to make variations on a sentence structure.
    ProceduralMessaging.AssociatedName
    Data class that stores a name String and one or more Strings that may be used as part of a title with that name, typically using categories from Thesaurus to add variety.
    SquidTags
    Tags used by SquidLib when calling libgdx's logging system.
    StringConvert<T>
    Used to standardize conversion for a given type, T, to and from a serialized String format.
    StringKit
    Various utility functions for dealing with Strings, CharSequences, and char[]s; this has lots of methods to convert to and from Strings and numbers, but also has tools to wrap long CharSequences to fit in a maximum width, join arrays of various items into long Strings, split/search/count occurrences of literal char arrays or CharSequences without using any regex, and generally tidy up generated text.
    Thesaurus
    A text processing class that can swap out occurrences of words and replace them with their synonyms.
    WeightedLetterNamegen
    Based on work by Nolithius available at the following two sites https://github.com/Nolithius/weighted-letter-namegen http://code.google.com/p/weighted-letter-namegen/
  • Enum Summary 
    Enum Description
    Messaging.NounTrait
    Properties of nouns needed to correctly conjugate those nouns and refer to them with pronouns, such as genders.