Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## jgGlyphs
Class GlyphSet

    java.lang.Object
      jgGlyphs.GlyphSet

public class GlyphSet
extends java.lang.Object

A GlyphSet is a collection of Characters and string fragments

Field Summary
`protected java.util.Vector` | `glyphs` The vector of glyphs.

Constructor Summary
`GlyphSet()` Constructor.
`GlyphSet(GlyphSet gs)` Constructor that effectively "clones" the passed GlyphSet

Method Summary
`void` | `addGlyph(java.lang.String g)` Adds a glyph to the list.
`void` | `addGlyphChars(java.lang.String g)` Adds new glyphs to the set.
`void` | `addGlyphs(GlyphSet gs)` Adds each glyph in the passed GlyphSet to this GlyphSet
`void` | `addGlyphs(java.lang.String[] ga)` Adds each String in the array via the addGlyph method
`boolean` | `contains(java.lang.String g)` Returns true if the glyph set contains the specified glyph
`GlyphSet` | `keepOnly(GlyphSet gs)` Prunes this glyph set to contain only elements in the passed glyph set
`void` | `removeGlyph(java.lang.String g)` Removes a glyph from the list
`GlyphSet` | `removeGlyphs(GlyphSet gs)` Removes all glyphs in the passed set from this GlyphSet
`int` | `size()` Returns the number of glyphs in the set
`java.lang.String[]` | `toArray()` Returns all the glyphs in order
`java.lang.String` | `toString()` Returns the string representation of this class

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### glyphs

    protected java.util.Vector glyphs

  The vector of glyphs. Each glyph is a string, lowercase if applicable. This includes both string and Character glyphs.

Constructor Detail

### GlyphSet

    public GlyphSet()

  Constructor.

### GlyphSet

    public GlyphSet(GlyphSet gs)

  Constructor that effectively "clones" the passed GlyphSet

Method Detail

### toString

    public java.lang.String toString()

  Returns the string representation of this class

### addGlyphChars

    public void addGlyphChars(java.lang.String g)

  Adds new glyphs to the set. Each Character in the string is a separate glyph to add.

  Parameters:
    `g` - the glyphs to add.

### addGlyph

    public void addGlyph(java.lang.String g)

  Adds a glyph to the list. The entire (lowercased) string is added as one glyph.

  Parameters:
    `g` - the glyph to add

### addGlyphs

    public void addGlyphs(java.lang.String[] ga)

  Adds each String in the array via the addGlyph method

  Parameters:
    `ga` - the array of Strings to add

### addGlyphs

    public void addGlyphs(GlyphSet gs)

  Adds each glyph in the passed GlyphSet to this GlyphSet

  Parameters:
    `gs` - the GlyphSet to add

### removeGlyph

    public void removeGlyph(java.lang.String g)

  Removes a glyph from the list

### size

    public int size()

  Returns the number of glyphs in the set

### contains

    public boolean contains(java.lang.String g)

  Returns true if the glyph set contains the specified glyph

### toArray

    public java.lang.String[] toArray()

  Returns all the glyphs in order

### keepOnly

    public GlyphSet keepOnly(GlyphSet gs)

  Prunes this glyph set to contain only elements in the passed glyph set

  Returns:
    itself with the offending entries removed.

### removeGlyphs

    public GlyphSet removeGlyphs(GlyphSet gs)

  Removes all glyphs in the passed set from this GlyphSet

  Parameters:
    `gs` - the glyphs to remove, as a GlyphSet
  Returns:
    itself without the glyphs passed in gs

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD