Class PhonoTable


  • public class PhonoTable
    extends java.lang.Object
    Like an IPA table, but readable in Java
    Author:
    alex
    • Constructor Summary

      Constructors 
      Constructor Description
      PhonoTable​(java.lang.String name, java.util.ArrayList<java.lang.String> columnNames, java.util.ArrayList<PhonoCategory> rows, int soundsPerCell)
      Creates a PhonoTable
      PhonoTable​(PhonoTable pt)
      Copy constructor
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int dataPerCell()
      Gets the amount of data per cell
      boolean equals​(java.lang.Object obj)  
      java.util.ArrayList<java.lang.String> getColumnNames()
      Gets a list of all the column names
      java.lang.String getName()
      Gets the name of the PhonoTable
      PhonoCategory getRow​(int i)
      Gets the row in a PhonoTable at index i
      java.util.ArrayList<java.lang.String> getSoundList()  
      static PhonoTable parse​(Multitag tag)
      Parses a PhonoTable from a Multitag.
      int size()
      Gets the amount of rows in a PhonoTable
      java.lang.String toString()
      Converts a PhonoTable to a string
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • PhonoTable

        public PhonoTable​(java.lang.String name,
                          java.util.ArrayList<java.lang.String> columnNames,
                          java.util.ArrayList<PhonoCategory> rows,
                          int soundsPerCell)
        Creates a PhonoTable
        Parameters:
        name - The name of the PhonoTable (Consonants, Vowels, etc.)
        columnNames - The names of the columns
        rows - An ArrayList of all the rows to be added
        soundsPerCell - How many sounds should be in a cell
      • PhonoTable

        public PhonoTable​(PhonoTable pt)
        Copy constructor
        Parameters:
        pt - The PhonoTable to be copied
    • Method Detail

      • parse

        public static PhonoTable parse​(Multitag tag)
                                throws java.lang.Exception
        Parses a PhonoTable from a Multitag. Previously this function was a part of PhonoSystem.parse(), however this allows the program to be maintained more easily.
        Parameters:
        tag - The tag to parse the PhonoTable from
        Returns:
        The PhonoTable stored in the multitag
        Throws:
        java.lang.Exception - Thrown when any data inside the PhonoTable is invalid, for example if soundsPerCell is a non-integer.
      • toString

        public java.lang.String toString()
        Converts a PhonoTable to a string
        Overrides:
        toString in class java.lang.Object
      • getName

        public java.lang.String getName()
        Gets the name of the PhonoTable
        Returns:
        the name of the PhonoTable
      • size

        public int size()
        Gets the amount of rows in a PhonoTable
        Returns:
        The amount of rows in a PhonoTable
      • getRow

        public PhonoCategory getRow​(int i)
        Gets the row in a PhonoTable at index i
        Parameters:
        i - The index number
        Returns:
        The row at index i
      • getColumnNames

        public java.util.ArrayList<java.lang.String> getColumnNames()
        Gets a list of all the column names
        Returns:
        The column names
      • dataPerCell

        public int dataPerCell()
        Gets the amount of data per cell
        Returns:
        The amount of sounds per cell
      • getSoundList

        public java.util.ArrayList<java.lang.String> getSoundList()
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object