类 AbstractLineTokenizer

    • 字段概要

      字段 
      修饰符和类型字段说明
      protected java.lang.String[]names 
    • 方法概要

      所有方法 实例方法 抽象方法 具体方法 
      修饰符和类型方法说明
      protected abstract java.util.List<java.lang.String>doTokenize​(java.lang.String line) 
      booleanhasNames() 
      protected booleanisStrict()
      Provides access to the strict flag for subclasses if needed.
      voidsetFieldSetFactory​(FieldSetFactory fieldSetFactory)
      Factory for FieldSet instances.
      voidsetNames​(java.lang.String... names)
      Setter for column names.
      voidsetStrict​(boolean strict)
      Public setter for the strict flag.
      FieldSettokenize​(java.lang.String line)
      Yields the tokens resulting from the splitting of the supplied line.
      • 从类继承的方法 java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 字段详细资料

      • names

        protected java.lang.String[] names
    • 方法详细资料

      • setStrict

        public void setStrict​(boolean strict)
        Public setter for the strict flag. If true (the default) then number of tokens in line must match the number of tokens defined (by Range, columns, etc.) in LineTokenizer. If false then lines with less tokens will be tolerated and padded with empty columns, and lines with more tokens will simply be truncated.
        参数:
        strict - the strict flag to set
      • isStrict

        protected boolean isStrict()
        Provides access to the strict flag for subclasses if needed.
        返回:
        the strict flag value
      • setNames

        public void setNames​(java.lang.String... names)
        Setter for column names. Optional, but if set, then all lines must have as many or fewer tokens.
        参数:
        names - names of each column
      • tokenize

        public FieldSet tokenize​(java.lang.String line)
        Yields the tokens resulting from the splitting of the supplied line.
        指定者:
        tokenize 在接口中 LineTokenizer
        参数:
        line - the line to be tokenized (can be null)
        返回:
        the resulting tokens
      • doTokenize

        protected abstract java.util.List<java.lang.String> doTokenize​(java.lang.String line)