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

## ipipan.spejd.util
Class Util

    java.lang.Object
      ipipan.spejd.util.Util

    public class Util

extends java.lang.Object

Utility functions that do not fit in other classes.

Constructor Summary
`Util(Config conf)`

Method Summary
`java.lang.String[]` | `file(java.lang.String filename)` Loads an array of Strings, every line treated as a separate String.
`java.util.ArrayList<java.lang.String>` | `fileAsList(java.lang.String filename)` Loads a list of Strings, every line treated as a separate String.
`java.lang.String` | `join(java.lang.String c, java.util.Collection d)` Similar to join / implode in php.
`int` | `safeParseInt(java.lang.String c)`

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

Constructor Detail

### Util

    public Util(Config conf)

Method Detail

### safeParseInt

    public int safeParseInt(java.lang.String c)

### fileAsList

    public java.util.ArrayList<java.lang.String> fileAsList(java.lang.String filename)

  Loads a list of Strings, every line treated as a separate String. Empty strings are ignored. Similar to file() in php.

  Parameters:
    `filename` - name of the file to load
  Returns:
    a list of Strings representing the given file's content

### file

    public java.lang.String[] file(java.lang.String filename)

  Loads an array of Strings, every line treated as a separate String. Empty strings are ignored. Similar to file() in php.

  Parameters:
    `filename` - name of the file to load
  Returns:
    an arrays of Strings representing the given file's content

### join

    public java.lang.String join(java.lang.String c,
                                 java.util.Collection d)

  Similar to join / implode in php.

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