Documentation of 'javanpst.data.structures.sequence.Sequence' Java class
Sequence
javanpst.data.structures.sequence

Class Sequence

  • Direct Known Subclasses:
    NumericSequence, StringSequence


    public abstract class Sequence
    extends java.lang.Object
    An abstract class representing sequences of data
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static int DOWN 
      static int NUMERIC
      Constants identifying kind of data
      static int STRING 
      static int UP
      Type of trends in sequences
    • Constructor Summary

      Constructors 
      Constructor and Description
      Sequence() 
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method and Description
      abstract void append(java.lang.Object value)
      Adds a new element to the end of the sequence
      abstract void clear()
      Clears the sequence
      abstract void prepend(java.lang.Object value)
      Adds a new element to the start of the sequence
      abstract void readCSV(java.lang.String file)
      Loads a sequence from a CSV file
      abstract void readTXT(java.lang.String file)
      Loads a sequence from a TXT file
      abstract void readXML(java.lang.String file)
      Loads a sequence from a XML file
      abstract int size()
      Get size of the sequence
      abstract java.lang.String toString()
      To String method
      abstract void writeCSV(java.lang.String file, boolean useComma)
      Writes a sequence to a CSV file
      abstract void writeTXT(java.lang.String file)
      Writes a sequence to a TXT file
      abstract void writeXML(java.lang.String file)
      Writes a sequence to a XML file
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • Sequence

        public Sequence()
    • Method Detail

      • size

        public abstract int size()
        Get size of the sequence
        Returns:
        size of the sequence
      • clear

        public abstract void clear()
        Clears the sequence
      • append

        public abstract void append(java.lang.Object value)
        Adds a new element to the end of the sequence
        Parameters:
        value - value to add
      • prepend

        public abstract void prepend(java.lang.Object value)
        Adds a new element to the start of the sequence
        Parameters:
        value - value to add
      • toString

        public abstract java.lang.String toString()
        To String method
        Overrides:
        toString in class java.lang.Object
      • readXML

        public abstract void readXML(java.lang.String file)
        Loads a sequence from a XML file
        Parameters:
        file - path of the file
      • writeXML

        public abstract void writeXML(java.lang.String file)
        Writes a sequence to a XML file
        Parameters:
        file - path of the file
      • readCSV

        public abstract void readCSV(java.lang.String file)
        Loads a sequence from a CSV file
        Parameters:
        file - path of the file
      • writeCSV

        public abstract void writeCSV(java.lang.String file,
                                      boolean useComma)
        Writes a sequence to a CSV file
        Parameters:
        file - path of the file
        useComma - true true if "," is used as separator, false if ";" is used instead
      • readTXT

        public abstract void readTXT(java.lang.String file)
        Loads a sequence from a TXT file
        Parameters:
        file - path of the file
      • writeTXT

        public abstract void writeTXT(java.lang.String file)
        Writes a sequence to a TXT file
        Parameters:
        file - path of the file

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.