All Downloads are FREE. Search and download functionalities are using the official Maven repository.

fj.function.Characters Maven / Gradle / Ivy

Go to download

Functional Java is an open source library that supports closures for the Java programming language

There is a newer version: 5.0
Show newest version
package fj.function;

import fj.F;

import static fj.Function.curry;

/**
 * First-class functions on Characters.
 */
public final class Characters {
  private Characters() {
    throw new UnsupportedOperationException();
  }
  public static final F toString = c -> Character.toString(c);
  public static final F isLowerCase = Character::isLowerCase;
  public static final F isUpperCase = Character::isUpperCase;
  public static final F isTitleCase = Character::isTitleCase;
  public static final F isDigit = Character::isDigit;
  public static final F isDefined = Character::isDefined;
  public static final F isLetter = Character::isLetter;
  public static final F isLetterOrDigit = Character::isLetterOrDigit;
  public static final F isJavaIdentifierStart = Character::isJavaIdentifierStart;
  public static final F isJavaIdentifierPart = Character::isJavaIdentifierPart;
  public static final F isUnicodeIdentifierStart = Character::isUnicodeIdentifierStart;
  public static final F isUnicodeIdentifierPart = Character::isUnicodeIdentifierPart;
  public static final F isIdentifierIgnorable = Character::isIdentifierIgnorable;
  public static final F toLowerCase = Character::toLowerCase;
  public static final F toUpperCase = Character::toUpperCase;
  public static final F toTitleCase = Character::toTitleCase;
  public static final F> digit = curry((ch, radix) -> Character.digit(ch, radix));
  public static final F getNumericValue = Character::getNumericValue;
  public static final F isSpaceChar = Character::isSpaceChar;
  public static final F isWhitespace = Character::isWhitespace;
  public static final F isISOControl = Character::isISOControl;
  public static final F getType = Character::getType;
  public static final F getDirectionality = Character::getDirectionality;
  public static final F isMirrored = Character::isMirrored;
  public static final F reverseBytes = Character::reverseBytes;
  public static final F isNewLine = c -> c == '\n';

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy