### Create an Iso using get and reverseGet functions Source: https://javadoc.io/doc/org.functionaljava/functionaljava/5.0/fj/data/optic/Iso.html Use the `iso` factory method to create an Iso by providing functions for getting the target value and setting the source value. ```java public static Iso iso(F get, F reverseGet) ``` -------------------------------- ### Create Iso from Functions Source: https://javadoc.io/doc/org.functionaljava/functionaljava/5.0/fj/data/optic/Iso.html Creates an Iso using a pair of functions: one to get the target value and one to reverse the operation, getting the source value from the target. ```java public static Iso iso(F get, F reverseGet) ``` -------------------------------- ### iso Source: https://javadoc.io/doc/org.functionaljava/functionaljava/5.0/fj/data/optic/Iso.html Create an Iso using a pair of functions: one to get the target and one to get the source. ```APIDOC ## iso ### Description Create an `Iso` using a pair of functions: one to get the target and one to get the source. ### Method public static Iso iso(F get, F reverseGet) ``` -------------------------------- ### Get Sublists Source: https://javadoc.io/doc/org.functionaljava/functionaljava/5.0/fj/data/NonEmptyList.html Generates a NonEmptyList where each element is a sublist of the original list, starting from each possible position. For example, `NonEmptyList(1, 2, 3)` would yield `NonEmptyList(NonEmptyList(1, 2, 3), NonEmptyList(2, 3), NonEmptyList(3))`. ```java NonEmptyList> sublists() ``` -------------------------------- ### Show Instance for Short Source: https://javadoc.io/doc/org.functionaljava/functionaljava/5.0/fj/Show.html Provides a Show instance for java.lang.Short. ```java public static final Show shortShow ``` -------------------------------- ### Get Subsequence Source: https://javadoc.io/doc/org.functionaljava/functionaljava/5.0/fj/data/LazyString.html Gets the specified subsequence of this LazyString between the given start (inclusive) and end (exclusive) indices. Returns a CharSequence. ```java java.lang.CharSequence subSequence(int start, int end) ``` -------------------------------- ### Show Instance for String Source: https://javadoc.io/doc/org.functionaljava/functionaljava/5.0/fj/Show.html Provides a Show instance for java.lang.String. ```java public static final Show stringShow ``` -------------------------------- ### Get all prefixes of a stream Source: https://javadoc.io/doc/org.functionaljava/functionaljava/5.0/fj/data/Stream.html Use `inits` to obtain a stream of all prefixes of the original stream, starting with the stream itself. This is helpful for prefix-based analysis. ```java public final Stream> inits() ``` -------------------------------- ### Get Plus Function (with value) Source: https://javadoc.io/doc/org.functionaljava/functionaljava/5.0/fj/data/Enumerator.html Returns a function that moves a value along the enumerator a given number of times, starting from a specified value. ```java public F> plus(A a) ``` -------------------------------- ### asOptional Source: https://javadoc.io/doc/org.functionaljava/functionaljava/5.0/index-all.html Views an Iso as an Optional. ```APIDOC ## asOptional() ### Description Views an `Iso` as a `Optional`. ### Method Method ### Endpoint N/A (Java method) ### Parameters None explicitly documented for this signature. ### Request Example N/A ### Response N/A ``` ```APIDOC ## asOptional() ### Description Views a `Lens` as an `Optional`. ### Method Method ### Endpoint N/A (Java method) ### Parameters None explicitly documented for this signature. ### Request Example N/A ### Response N/A ``` -------------------------------- ### Get First Few Elements of a Finger Tree Source: https://javadoc.io/doc/org.functionaljava/functionaljava/5.0/fj/data/fingertrees/Deep.html Retrieves the initial elements of the finger tree. This is useful for peeking at the start of the sequence without modifying the tree. ```java public Digit prefix() ``` -------------------------------- ### Method _1 Source: https://javadoc.io/doc/org.functionaljava/functionaljava/5.0/fj/P1.html Accesses the first element of the product. ```APIDOC ## Method _1 ```java public abstract A _1() ``` ### Description Accesses the first (and only) element of the product represented by P1. Returns: The first element of the product. ``` -------------------------------- ### Get Tails Source: https://javadoc.io/doc/org.functionaljava/functionaljava/5.0/fj/data/NonEmptyList.html Generates a NonEmptyList where each element is a tail of the original list, starting from each possible position. This is similar to `sublists` but typically refers to the remaining part of the list after a certain point. ```java NonEmptyList> tails() ``` -------------------------------- ### Show instance for P2 (Customizable) Source: https://javadoc.io/doc/org.functionaljava/functionaljava/5.0/fj/Show.html Creates a Show instance for the P2 (tuple-2) type with customizable start, separator, and end strings. Requires Show instances for both elements. ```java public static  Show> p2Show(Show sa, Show sb, java.lang.String start, java.lang.String sep, java.lang.String end) ``` -------------------------------- ### Show Instance for BitSet Source: https://javadoc.io/doc/org.functionaljava/functionaljava/5.0/fj/Show.html Provides a Show instance for java.util.BitSet. ```java public static final Show bitSetShow ``` -------------------------------- ### Get First-Class Get Method Source: https://javadoc.io/doc/org.functionaljava/functionaljava/5.0/fj/data/TreeMap.html Returns a first-class function version of the get method for this TreeMap. ```java F> get() ``` -------------------------------- ### Method Summary - Instance Methods Source: https://javadoc.io/doc/org.functionaljava/functionaljava/5.0/fj/data/Option.html Details the instance methods available on an Option object, including applying functions, binding, and creating arrays. ```APIDOC ## Method Summary - Instance Methods | Modifier and Type | Method and Description | |---|---| | ` Option` | `apply(Option> of)` Performs function application within an optional value (applicative functor pattern). | | `A[]` | `array(java.lang.Class c)` Returns an array from this optional value. | | ` Option` | `bind(F> f)` Binds the given function across the element of this optional value with a final join. | | ` Option` | `bind(Option ob, F> f)` Binds the given function across the element of this optional value and the given optional value with a final join. | | ` Option` | `bind(Option ob, Option oc, F>> f)` Binds the given function across the element of this optional value and the given optional value with a final join. | | ` Option` | `bind(Option ob, Option oc, Option od, F>>> f)` Binds the given function across the element of this optional value and the given optional value with a final join. | | ` Option` | `bind(Option ob, Option oc, Option od, Option oe, F>>>> f)` Binds the given function across the element of this optional value and the given optional value with a final join. | | ` Option` | `bind(Option ob, Option oc, Option od, Option oe, Option of, F>>>>> f)` Binds the given function across the element of this optional value and the given optional value with a final join. | | ` Option` | `bind(Option ob, Option oc, Option od, Option oe, Option of, Option og, F>>>>>> f)` Binds the given function across the element of this optional value and the given optional value with a final join. | | ` Option` | `bind(Option ob, Option oc, Option od, Option oe, Option of, Option og, Option oh, F>>>>>>> f)` Binds the given function across the element of this optional value and the given optional value with a final join. | | ` Option>` | `bindProduct(Option ob)` | | ` Option>` | `bindProduct(Option ob, Option oc)` | | ` Option>` | `bindProduct(Option ob, Option oc, Option od)` | | ` Option>` | `bindProduct(Option ob, Option oc, Option od, Option oe)` | | ` Option>` | `bindProduct(Option ob, Option oc, Option od, Option oe, Option of)` | ``` -------------------------------- ### Create Product-7 Instance Source: https://javadoc.io/doc/org.functionaljava/functionaljava/5.0/fj/P.html Creates an instance of a product-7 by taking seven elements. This is a direct way to form a 7-element tuple. ```java public static P7 p(A a, B b, C c, D d, E e, F$ f, G g) ``` -------------------------------- ### Get or Modify with PPrism Source: https://javadoc.io/doc/org.functionaljava/functionaljava/5.0/fj/data/optic/PPrism.html Get the target of a PPrism, or modify the source if the target is not present. Returns an Either type. ```java abstract Either getOrModify(S s) ``` -------------------------------- ### Get Option from PPrism Source: https://javadoc.io/doc/org.functionaljava/functionaljava/5.0/fj/data/optic/PPrism.html Safely get the target of a PPrism. Returns an Option, which is None if the prism does not match the source. ```java abstract Option getOption(S s) ``` -------------------------------- ### View an Iso as an Optional Source: https://javadoc.io/doc/org.functionaljava/functionaljava/5.0/fj/data/optic/Iso.html Use `asOptional` to treat an Iso as an Optional. This can be useful when the Iso's transformation might not always succeed or is optional in nature. ```java Optional asOptional() ``` -------------------------------- ### Get File Contents Source: https://javadoc.io/doc/org.functionaljava/functionaljava/5.0/fj/data/IO.html A static method that returns an IO action to get the contents of a file. The result is a LazyString. ```java static IO getContents() ``` -------------------------------- ### Create Product-5 Instance Source: https://javadoc.io/doc/org.functionaljava/functionaljava/5.0/fj/P.html Creates an instance of a product-5 by taking five elements. This is a direct way to form a 5-element tuple. ```java public static P5 p(A a, B b, C c, D d, E e) ``` -------------------------------- ### F0 Interface Method Detail: get() Source: https://javadoc.io/doc/org.functionaljava/functionaljava/5.0/fj/F0.html Details the default 'get()' method of the F0 interface, inherited from java.util.function.Supplier. ```java default A get() Specified by: get in interface java.util.function.Supplier ``` -------------------------------- ### View an Iso as a Lens Source: https://javadoc.io/doc/org.functionaljava/functionaljava/5.0/fj/data/optic/Iso.html The `asLens` method provides a view of the Iso as a Lens, allowing it to be used in contexts expecting a Lens. ```java Lens asLens() ``` -------------------------------- ### Starts With Substring Source: https://javadoc.io/doc/org.functionaljava/functionaljava/5.0/fj/data/LazyString.html Checks if this LazyString starts with the given LazyString. Returns true if it's a prefix, false otherwise. ```java boolean startsWith(LazyString cs) ``` -------------------------------- ### View an Iso as a Prism Source: https://javadoc.io/doc/org.functionaljava/functionaljava/5.0/fj/data/optic/Iso.html The `asPrism` method allows an Iso to be viewed as a Prism. This is helpful when you need to use Prism-specific operations. ```java Prism asPrism() ``` -------------------------------- ### Get subsequence Source: https://javadoc.io/doc/org.functionaljava/functionaljava/5.0/fj/data/LazyString.html Gets the specified subsequence of this lazy string. Handles out-of-bounds indexes gracefully by returning an empty or truncated sequence. ```java public java.lang.CharSequence subSequence(int start, int end) ``` -------------------------------- ### inits Source: https://javadoc.io/doc/org.functionaljava/functionaljava/5.0/fj/data/List.html Returns the list of initial segments of this list, shortest first. ```APIDOC ## inits ### Description Returns the list of initial segments of this list, shortest first. ### Method public final List> inits() ### Returns The list of initial segments of this list, shortest first. ``` -------------------------------- ### pIso Source: https://javadoc.io/doc/org.functionaljava/functionaljava/5.0/fj/data/optic/PIso.html Creates a PIso using a pair of functions: one to get the target value and one to get the source value from the target. ```APIDOC ## pIso ### Description Creates a `PIso` using a pair of functions: one to get the target and one to get the source. ### Method public static PIso pIso(F get, F reverseGet) ### Parameters * **get** (F) - Function to get the target value. * **reverseGet** (F) - Function to get the source value from the target. ``` -------------------------------- ### Show Instance for StringBuilder Source: https://javadoc.io/doc/org.functionaljava/functionaljava/5.0/fj/Show.html Provides a Show instance for java.lang.StringBuilder. ```java public static final Show stringBuilderShow ``` -------------------------------- ### on (static) Source: https://javadoc.io/doc/org.functionaljava/functionaljava/5.0/fj/Ord.html Begin definition of an ord instance. This is a static helper for creating Ord instances. ```APIDOC ## on (static) ### Description Begin definition of an ord instance. See Also: `Equal.Definition.then(F, Equal)` ### Method public static Ord.Definition on(F f, Ord ord) ### Parameters - `f` (F) - The function to map. - `ord` (Ord) - The Ord instance to use for the mapped type. ### Response - An `Ord.Definition` for type A. ``` -------------------------------- ### Get the target value from an Iso Source: https://javadoc.io/doc/org.functionaljava/functionaljava/5.0/fj/data/optic/Iso.html The `get` method extracts the target value (type A) from the source value (type S) using the Iso. ```java public A get(S s) ``` -------------------------------- ### Starts With Check Source: https://javadoc.io/doc/org.functionaljava/functionaljava/5.0/fj/data/LazyString.html A first-class function for checking if a LazyString starts with another LazyString. Returns a function that takes a LazyString and returns a boolean. ```java static F> startsWith() ``` -------------------------------- ### Show instance for P2 (Map style) Source: https://javadoc.io/doc/org.functionaljava/functionaljava/5.0/fj/Show.html Creates a Show instance for the P2 (tuple-2) type, formatted like a map. Requires Show instances for both elements. ```java public static  Show> p2MapShow(Show sa, Show sb) ``` -------------------------------- ### v6Show Source: https://javadoc.io/doc/org.functionaljava/functionaljava/5.0/fj/Show.html Provides a Show instance for V6, requiring a Show instance for its elements. ```APIDOC ## v6Show ### Description A show instance for a vector-6. ### Parameters * `ea` (Show) - A show for the elements of the vector. ### Returns Show> - A show instance for a vector-6. ``` -------------------------------- ### Get Seventh Element as Function Source: https://javadoc.io/doc/org.functionaljava/functionaljava/5.0/fj/data/vector/V7.html A first-class function to get the seventh element of a vector. This provides a functional way to access the seventh element. ```java static F,A> __7() ``` -------------------------------- ### Show Instance for Streams (split into lines) Source: https://javadoc.io/doc/org.functionaljava/functionaljava/5.0/fj/Show.html Provides a Show instance for streams that splits into lines. Requires a Show instance for the stream elements. ```java public static Show> unlineShow(Show sa) ``` -------------------------------- ### Get Sixth Element as Function Source: https://javadoc.io/doc/org.functionaljava/functionaljava/5.0/fj/data/vector/V7.html A first-class function to get the sixth element of a vector. This provides a functional way to access the sixth element. ```java static F,A> __6() ``` -------------------------------- ### Create a Product-1 with an Element Source: https://javadoc.io/doc/org.functionaljava/functionaljava/5.0/fj/P.html Creates a product-1 by providing a single element. This is a convenience method for constructing a P1 instance. ```java public static  P1 p(A a) ``` -------------------------------- ### Curried Get Method Source: https://javadoc.io/doc/org.functionaljava/functionaljava/5.0/fj/data/HashMap.html Provides a curried version of the get method, returning a function that takes a key and returns an Option of the value. Useful for functional composition. ```java public F> get() ``` -------------------------------- ### Show instance for Stream (Customizable) Source: https://javadoc.io/doc/org.functionaljava/functionaljava/5.0/fj/Show.html Creates a Show instance for the Stream type with customizable start, separator, and end strings. Requires a Show instance for its elements. ```java public static  Show> streamShow(Show sa, java.lang.String start, java.lang.String sep, java.lang.String end) ``` -------------------------------- ### intShow Source: https://javadoc.io/doc/org.functionaljava/functionaljava/5.0/fj/Show.html A show instance for the int type. ```APIDOC ## intShow ### Description A show instance for the `int` type. ### Field Detail `public static final Show intShow` ``` -------------------------------- ### Create Java Identifier Start Parser (F0) Source: https://javadoc.io/doc/org.functionaljava/functionaljava/5.0/fj/parser/Parser.CharsParser.html Returns a parser that produces a Java identifier start character. Use this to parse the initial character of a Java identifier. ```java public static Parser, java.lang.Character, E> javaIdentifierStart(F0 missing, F sat) ``` -------------------------------- ### v7Show Source: https://javadoc.io/doc/org.functionaljava/functionaljava/5.0/fj/Show.html Provides a Show instance for V7, requiring a Show instance for its elements. ```APIDOC ## v7Show ### Description A show instance for a vector-7. ### Parameters * `ea` (Show) - A show for the elements of the vector. ### Returns Show> - A show instance for a vector-7. ``` -------------------------------- ### Instance Method to Get State Source: https://javadoc.io/doc/org.functionaljava/functionaljava/5.0/fj/data/State.html The instance 'gets' method returns a State action that retrieves the current state. This is a convenience method for accessing the state within a State computation. ```java public State gets() ``` -------------------------------- ### p7Equal Source: https://javadoc.io/doc/org.functionaljava/functionaljava/5.0/fj/Equal.html Creates an Equal instance for a product-7, which is a tuple of seven elements. It requires an Equal instance for each element of the product. ```APIDOC ## p7Equal ### Description Creates an Equal instance for a product-7. ### Method static ### Signature public static Equal> p7Equal(Equal ea, Equal eb, Equal ec, Equal ed, Equal ee, Equal ef, Equal eg) ### Parameters * **ea** (Equal) - Equality across the first element of the product. * **eb** (Equal) - Equality across the second element of the product. * **ec** (Equal) - Equality across the third element of the product. * **ed** (Equal) - Equality across the fourth element of the product. * **ee** (Equal) - Equality across the fifth element of the product. * **ef** (Equal) - Equality across the sixth element of the product. * **eg** (Equal) - Equality across the seventh element of the product. ### Returns An equal instance for a product-7. ``` -------------------------------- ### Get a Value from the State Source: https://javadoc.io/doc/org.functionaljava/functionaljava/5.0/fj/data/State.html The static 'gets' method creates a State that extracts a specific value from the current state using a provided function. It allows you to read parts of the state. ```java public static  State gets(F f) ``` -------------------------------- ### Method __1 Source: https://javadoc.io/doc/org.functionaljava/functionaljava/5.0/fj/P1.html Returns a function that returns the first element of a product. ```APIDOC ## Method __1 ```java public static F,A> __1() ``` ### Description Returns a function that, when applied to a P1, returns its first element. Returns: A function that extracts the first element from a P1. ``` -------------------------------- ### Create PLens from Get and Set Functions Source: https://javadoc.io/doc/org.functionaljava/functionaljava/5.0/fj/data/optic/PLens.html Create a PLens using a pair of functions: one to get the target value and one to set it. This is a common way to define custom lenses. ```java static PLens pLens(F get, F> set) ``` -------------------------------- ### Show Instance for StringBuffer Source: https://javadoc.io/doc/org.functionaljava/functionaljava/5.0/fj/Show.html Provides a Show instance for java.lang.StringBuffer. ```java public static final Show stringBufferShow ``` -------------------------------- ### Create Java Identifier Start Parser (E) Source: https://javadoc.io/doc/org.functionaljava/functionaljava/5.0/fj/parser/Parser.CharsParser.html Returns a parser that produces a Java identifier start character. This overload allows specifying the missing character error using a generic type E. ```java public static Parser, java.lang.Character, E> javaIdentifierStart(E missing, F sat) ``` -------------------------------- ### v5Show Source: https://javadoc.io/doc/org.functionaljava/functionaljava/5.0/fj/Show.html Provides a Show instance for V5, requiring a Show instance for its elements. ```APIDOC ## v5Show ### Description A show instance for a vector-5. ### Parameters * `ea` (Show) - A show for the elements of the vector. ### Returns Show> - A show instance for a vector-5. ``` -------------------------------- ### asOptional Source: https://javadoc.io/doc/org.functionaljava/functionaljava/5.0/fj/data/optic/Iso.html View an Iso as an Optional. This method is an override from the PIso class. ```APIDOC ## asOptional ### Description View an `Iso` as an `Optional`. ### Method public Optional asOptional() ### Overrides `asOptional` in class `PIso` ``` -------------------------------- ### reverseGet Source: https://javadoc.io/doc/org.functionaljava/functionaljava/5.0/fj/data/optic/Prism.html Gets the modified source of a PPrism. ```APIDOC ## reverseGet ### Description Gets the modified source of a PPrism. ### Method `S reverseGet(A a)` ### Returns The modified source. ``` -------------------------------- ### Static Method: on(F f, Equal eq) Source: https://javadoc.io/doc/org.functionaljava/functionaljava/5.0/fj/Equal.html Begins the definition of an Equal instance. ```APIDOC ## Static Method: on(F f, Equal eq) ### Description Begin definition of an equal instance. ### Method Signature `public static Equal.Definition on(F f, Equal eq)` ### Parameters #### Path Parameters * **f** (F) - Required - The function to map. * **eq** (Equal) - Required - The Equal instance to use. ### Returns * **Equal.Definition** - An Equal definition. ``` -------------------------------- ### Get Ordering Source: https://javadoc.io/doc/org.functionaljava/functionaljava/5.0/fj/data/Enumerator.html Returns the ordering for the enumerator. ```java public Ord order() ``` -------------------------------- ### Run a State Action and Get State and Value Source: https://javadoc.io/doc/org.functionaljava/functionaljava/5.0/fj/data/State.html The 'run' method executes a State action with a given initial state and returns a pair containing the final state and the computed value. This is the primary way to get results from a State. ```java public P2 run(S s) ``` -------------------------------- ### inits Source: https://javadoc.io/doc/org.functionaljava/functionaljava/5.0/fj/data/Stream.html Returns a stream containing all prefixes of the original stream, including the stream itself. ```APIDOC ## inits ### Description Returns a stream of all prefixes of this stream. A stream is considered a prefix of itself in this context. ### Method public final Stream> inits() ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) - **return value** (Stream>) - A stream of the prefixes of this stream, starting with the stream itself. #### Response Example None ``` -------------------------------- ### Show instance for Stream (Basic) Source: https://javadoc.io/doc/org.functionaljava/functionaljava/5.0/fj/Show.html Creates a basic Show instance for the Stream type, requiring a Show instance for its elements. ```java public static  Show> streamShow(Show sa) ``` -------------------------------- ### Get Empty List Source: https://javadoc.io/doc/org.functionaljava/functionaljava/5.0/fj/data/List.html Returns an empty list. ```Java public static List nil() ``` -------------------------------- ### getOption Source: https://javadoc.io/doc/org.functionaljava/functionaljava/5.0/fj/data/optic/Optional.html Get the target of a POptional or nothing if there is no target. ```APIDOC ## getOption ### Description Get the target of a POptional or nothing if there is no target. ### Method public Option getOption(S s) ### Parameters * **s** (S) - The source value to check. ``` -------------------------------- ### priorityQueueShow Source: https://javadoc.io/doc/org.functionaljava/functionaljava/5.0/fj/Show.html Creates a Show instance for PriorityQueue, requiring Show instances for keys and values. ```APIDOC ## priorityQueueShow ### Description Creates a Show instance for PriorityQueue. ### Parameters * `sk` (Show) - Show for the keys. * `sv` (Show) - Show for the values. ### Returns Show> - A show instance for PriorityQueue. ``` -------------------------------- ### p7Hash Source: https://javadoc.io/doc/org.functionaljava/functionaljava/5.0/fj/Hash.html Creates a hash instance for a product-7. It takes seven Hash instances as input, each corresponding to an element of the product. ```APIDOC ## p7Hash ### Description Creates a hash instance for a product-7. ### Method static Hash> p7Hash(Hash ha, Hash hb, Hash hc, Hash hd, Hash he, Hash hf, Hash hg) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters - **ha** (Hash) - A hash for the first element of the product. - **hb** (Hash) - A hash for the second element of the product. - **hc** (Hash) - A hash for the third element of the product. - **hd** (Hash) - A hash for the fourth element of the product. - **he** (Hash) - A hash for the fifth element of the product. - **hf** (Hash) - A hash for the sixth element of the product. - **hg** (Hash) - A hash for the seventh element of the product. ### Response #### Success Response (200) A hash instance for a product-7. #### Response Example None provided. ``` -------------------------------- ### getOption Source: https://javadoc.io/doc/org.functionaljava/functionaljava/5.0/fj/data/optic/Prism.html Gets the target of a PPrism or nothing if there is no target. ```APIDOC ## getOption ### Description Gets the target of a PPrism or nothing if there is no target. ### Method `Option getOption(S s)` ### Returns An Option containing the target, or None if no target exists. ``` -------------------------------- ### length Source: https://javadoc.io/doc/org.functionaljava/functionaljava/5.0/fj/data/fingertrees/Digit.html Abstract method to get the length of the digit. ```APIDOC ## length ### Description Abstract method to get the length of the digit. ### Method public abstract int length() ``` -------------------------------- ### Create Product-6 Instance Source: https://javadoc.io/doc/org.functionaljava/functionaljava/5.0/fj/P.html Creates an instance of a product-6 by taking six elements. This is a direct way to form a 6-element tuple. ```java public static P6 p(A a, B b, C c, D d, E e, F$ f) ``` -------------------------------- ### fj.data.IO.getContents() Source: https://javadoc.io/doc/org.functionaljava/functionaljava/5.0/index-all.html Static method to get the contents of an IO operation. ```APIDOC ## fj.data.IO.getContents() ### Description Static method to get the contents of an IO operation. ### Method GET (conceptual) ### Endpoint N/A (Method Call) ### Parameters N/A ### Request Example N/A ### Response N/A ``` -------------------------------- ### take Source: https://javadoc.io/doc/org.functionaljava/functionaljava/5.0/fj/data/Seq.html Returns a sequence consisting of the first n elements of this sequence, or else the whole sequence, if it has less than n elements. ```APIDOC ## take ### Description The `take` method returns a new sequence containing the first `n` elements from the original sequence. If the original sequence has fewer than `n` elements, the entire sequence is returned. ### Method Signature ```java public Seq take(int n) ``` ### Parameters * `n` (int) - The maximum number of elements to take from this sequence. ``` -------------------------------- ### Create Product-3 Instance Source: https://javadoc.io/doc/org.functionaljava/functionaljava/5.0/fj/P.html Creates an instance of a product-3 by taking three elements. This is a direct way to form a 3-element tuple. ```java public static P3 p(A a, B b, C c) ``` -------------------------------- ### length_ Source: https://javadoc.io/doc/org.functionaljava/functionaljava/5.0/fj/data/List.html Provides a first-class function to get the length of a list. ```APIDOC ## length_ ### Description First-class length. Returns a function that gets the length of a given list. ### Method public static F, Integer> length_() ### Returns A function that gets the length of a given list. ``` -------------------------------- ### __5() Source: https://javadoc.io/doc/org.functionaljava/functionaljava/5.0/fj/data/vector/V7.html A first-class function to get the fifth element of a vector. ```APIDOC ## __5() ### Description A first-class function to get the fifth element of a vector. ### Method public static F,A> __5() ### Returns a function that gets the fifth element of a given vector. ``` -------------------------------- ### p6Hash Source: https://javadoc.io/doc/org.functionaljava/functionaljava/5.0/fj/Hash.html Creates a hash instance for a product-6. It takes six Hash instances as input, each corresponding to an element of the product. ```APIDOC ## p6Hash ### Description Creates a hash instance for a product-6. ### Method static Hash> p6Hash(Hash ha, Hash hb, Hash hc, Hash hd, Hash he, Hash hf) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters - **ha** (Hash) - A hash for the first element of the product. - **hb** (Hash) - A hash for the second element of the product. - **hc** (Hash) - A hash for the third element of the product. - **hd** (Hash) - A hash for the fourth element of the product. - **he** (Hash) - A hash for the fifth element of the product. - **hf** (Hash) - A hash for the sixth element of the product. ### Response #### Success Response (200) A hash instance for a product-6. #### Response Example None provided. ``` -------------------------------- ### Create a Product-2 with Elements Source: https://javadoc.io/doc/org.functionaljava/functionaljava/5.0/fj/P.html Creates a product-2 by providing two elements. This is a convenience method for constructing a P2 instance. ```java public static  P2 p(A a, B b) ``` -------------------------------- ### __4() Source: https://javadoc.io/doc/org.functionaljava/functionaljava/5.0/fj/data/vector/V7.html A first-class function to get the fourth element of a vector. ```APIDOC ## __4() ### Description A first-class function to get the fourth element of a vector. ### Method public static F,A> __4() ### Returns a function that gets the fourth element of a given vector. ``` -------------------------------- ### __4 Source: https://javadoc.io/doc/org.functionaljava/functionaljava/5.0/fj/data/vector/V6.html A first-class function to get the fourth element of a vector. ```APIDOC ## __4 ### Description A first-class function to get the fourth element of a vector. ### Method public static F,A> __4() ### Returns - F,A> - a function that gets the fourth element of a given vector. ``` -------------------------------- ### Bind Product with Five Optional Arguments Source: https://javadoc.io/doc/org.functionaljava/functionaljava/5.0/fj/data/Option.html Binds this optional value with five other optional values to create a product of their elements. ```java Option> bindProduct(Option ob, Option oc, Option od, Option oe, Option of) ``` -------------------------------- ### __3() Source: https://javadoc.io/doc/org.functionaljava/functionaljava/5.0/fj/data/vector/V3.html A first-class function to get the third element of a vector. ```APIDOC ## __3() ### Description A first-class function to get the third element of a vector. ### Method public static F,A> __3() ### Returns a function that gets the third element of a given vector. ``` -------------------------------- ### ShowS Method for String Source: https://javadoc.io/doc/org.functionaljava/functionaljava/5.0/fj/Show.html Returns the display rendering of the given argument as a String. This is a common way to represent showable values. ```java public java.lang.String showS(A a) ``` -------------------------------- ### v2Show Source: https://javadoc.io/doc/org.functionaljava/functionaljava/5.0/fj/Show.html Provides a Show instance for V2, requiring a Show instance for its elements. ```APIDOC ## v2Show ### Description A show instance for a vector-2. ### Parameters * `ea` (Show) - A show for the elements of the vector. ### Returns Show> - A show instance for a vector-2. ``` -------------------------------- ### __2() Source: https://javadoc.io/doc/org.functionaljava/functionaljava/5.0/fj/data/vector/V3.html A first-class function to get the second element of a vector. ```APIDOC ## __2() ### Description A first-class function to get the second element of a vector. ### Method public static F,A> __2() ### Returns a function that gets the second element of a given vector. ``` -------------------------------- ### __1() Source: https://javadoc.io/doc/org.functionaljava/functionaljava/5.0/fj/data/vector/V3.html A first-class function to get the first element of a vector. ```APIDOC ## __1() ### Description A first-class function to get the first element of a vector. ### Method public static F,A> __1() ### Returns a function that gets the first element of a given vector. ``` -------------------------------- ### v3Show Source: https://javadoc.io/doc/org.functionaljava/functionaljava/5.0/fj/Show.html Provides a Show instance for V3, requiring a Show instance for its elements. ```APIDOC ## v3Show ### Description A show instance for a vector-3. ### Parameters * `ea` (Show) - A show for the elements of the vector. ### Returns Show> - A show instance for a vector-3. ``` -------------------------------- ### Show Instance for PriorityQueue Source: https://javadoc.io/doc/org.functionaljava/functionaljava/5.0/fj/Show.html Provides a Show instance for a PriorityQueue. Requires Show instances for keys and values. ```java public static Show> priorityQueueShow(Show sk, Show sv) ``` -------------------------------- ### getOrModify Source: https://javadoc.io/doc/org.functionaljava/functionaljava/5.0/fj/data/optic/Prism.html Gets the target of a PPrism or modifies the source if there is no target. ```APIDOC ## getOrModify ### Description Gets the target of a PPrism or modifies the source if there is no target. ### Method `Either getOrModify(S s)` ### Returns An Either type representing the target or the modified source. ``` -------------------------------- ### get Source: https://javadoc.io/doc/org.functionaljava/functionaljava/5.0/fj/data/TreeMap.html Returns a potential value that the given key maps to. ```APIDOC ## get ### Description Returns a potential value that the given key maps to. ### Method instance ### Parameters #### Path Parameters * `k` (K) - Required - The key to look up in the tree map. ### Returns * `Option` - A potential value for the given key. ``` -------------------------------- ### Create Equal instance for Product-7 Source: https://javadoc.io/doc/org.functionaljava/functionaljava/5.0/fj/Equal.html Generates an Equal instance for a product-7. Requires an Equal instance for each of the seven elements. ```java public static Equal> p7Equal(Equal ea, Equal eb, Equal ec, Equal ed, Equal ee, Equal ef, Equal eg) ``` -------------------------------- ### p6Show Source: https://javadoc.io/doc/org.functionaljava/functionaljava/5.0/fj/Show.html Provides a Show instance for the P6 (tuple-6) type. Requires Show instances for all six elements. ```APIDOC ## p6Show ### Description A show instance for the `tuple-6` type. ### Method public static Show> p6Show(Show sa, Show sb, Show sc, Show sd, Show se, Show sf) ### Parameters #### Path Parameters - **sa** (Show) - Required - Show for the first element of the tuple. - **sb** (Show) - Required - Show for the second element of the tuple. - **sc** (Show) - Required - Show for the third element of the tuple. - **sd** (Show) - Required - Show for the fourth element of the tuple. - **se** (Show) - Required - Show for the fifth element of the tuple. - **sf** (Show) - Required - Show for the sixth element of the tuple. ### Returns A show instance for the `tuple-6` type. ``` -------------------------------- ### Get Size Source: https://javadoc.io/doc/org.functionaljava/functionaljava/5.0/fj/data/TreeMap.html Returns the number of entries currently in the TreeMap. ```java public int size() ``` -------------------------------- ### show (static) Source: https://javadoc.io/doc/org.functionaljava/functionaljava/5.0/fj/Show.html Returns a show instance using the given function. ```APIDOC ## show ### Description Returns a show instance using the given function. ### Method Signature `public static Show show(F> f)` ### Parameters * `f` (F>) - Required - The function to use for the returned show instance. ### Returns `Show` - A show instance. ``` -------------------------------- ### Get All Values Source: https://javadoc.io/doc/org.functionaljava/functionaljava/5.0/fj/data/TreeMap.html Returns a List of all values present in this TreeMap. ```java List values() ``` -------------------------------- ### Get All Keys Source: https://javadoc.io/doc/org.functionaljava/functionaljava/5.0/fj/data/TreeMap.html Returns a List of all keys present in this TreeMap. ```java List keys() ```