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

fj.data.$ 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.data;

import fj.P1;

/**
 * The constant arrow, for attaching a new name to an existing type. For every pair of types A and B, this type
 * is the identity morphism from B to B.
 */
@SuppressWarnings({"UnusedDeclaration"})
public final class $ extends P1 {

  private final B b;

  private $(final B b) {
    this.b = b;
  }

	/**
	 * @deprecated  JDK 8 warns '_' may not be supported after SE 8.  Replaced by {@link #constant} and synonym {@link #__} (prefer constant).
	 */
	@Deprecated
  public static  $ _(final B b) {
    return constant(b);
  }

	public static  $ __(final B b) {
		return constant(b);
	}

	public static  $ constant(final B b) {
		return new $(b);
	}


	public B _1() {
    return b;
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy