java port of Underscore.js

Overview

underscore-java

Maven Central MIT License Build Status Coverage Status codecov CircleCI Codeship Status for javadev/underscore-java wercker status Build status Build Status Run Status Known Vulnerabilities Codacy Badge Sputnik Code Scene Quality Gate Quality Gate Scrutinizer Build Status Hits-of-Code Java Version

Join the chat at https://gitter.im/javadev/underscore-java

Requirements

Java 1.8 and later or Java 11.

Installation

Include the following in your pom.xml for Maven:

<dependencies>
  <dependency>
    <groupId>com.github.javadev</groupId>
    <artifactId>underscore</artifactId>
    <version>1.64</version>
  </dependency>
  ...
</dependencies>

Gradle:

compile 'com.github.javadev:underscore:1.64'

Usage

U.of(/* array | list | set | map | anything based on Iterable interface */)
    .filter(..)
    .map(..)
    ...
    .sortWith()
    .forEach(..);
U.of(value1, value2, value3)...
U.range(0, 10)...

U.of(1, 2, 3) // or java.util.Arrays.asList(1, 2, 3) or new Integer[] {1, 2, 3}
    .filter(v -> v > 1)
    // 2, 3
    .map(v -> v + 1)
    // 3, 4
    .sortWith((a, b) -> b.compareTo(a))
    // 4, 3
    .forEach(System.out::println);
    // 4, 3
    
U.formatXml("<a><b>data</b></a>");
    // <a>
    //    <b>data</b>
    // </a>

U.formatJson("{\"a\":{\"b\":\"data\"}}");
    // {
    //    "a": {
    //      "b": "data"
    //    }
    // }

U.xmlToJson("<a attr=\"c\"><b>data</b></a>");
    // {
    //   "a": {
    //     "-attr": "c",
    //     "b": "data"
    //   },
    //   "#omit-xml-declaration": "yes"
    // }

U.jsonToXml("{\"a\":{\"-attr\":\"c\",\"b\":\"data\"}}");
    // <?xml version="1.0" encoding="UTF-8"?>
    // <a attr="c">
    //   <b>data</b>
    // </a>

U.Builder builder = U.objectBuilder()
    .add("firstName", "John")
    .add("lastName", "Smith")
    .add("age", 25)
    .add("address", U.arrayBuilder()
        .add(U.objectBuilder()
            .add("streetAddress", "21 2nd Street")
            .add("city", "New York")
            .add("state", "NY")
            .add("postalCode", "10021")))
    .add("phoneNumber", U.arrayBuilder()
        .add(U.objectBuilder()
            .add("type", "home")
            .add("number", "212 555-1234"))
        .add(U.objectBuilder()
            .add("type", "fax")
            .add("number", "646 555-4567")));
System.out.println(builder.toJson());
System.out.println(builder.toXml());
{
  "firstName": "John",
  "lastName": "Smith",
  "age": 25,
  "address": [
    {
      "streetAddress": "21 2nd Street",
      "city": "New York",
      "state": "NY",
      "postalCode": "10021"
    }
  ],
  "phoneNumber": [
    {
      "type": "home",
      "number": "212 555-1234"
    },
    {
      "type": "fax",
      "number": "646 555-4567"
    }
  ]
}
<?xml version="1.0" encoding="UTF-8"?>
<root>
  <firstName>John</firstName>
  <lastName>Smith</lastName>
  <age number="true">25</age>
  <address array="true">
    <streetAddress>21 2nd Street</streetAddress>
    <city>New York</city>
    <state>NY</state>
    <postalCode>10021</postalCode>
  </address>
  <phoneNumber>
    <type>home</type>
    <number>212 555-1234</number>
  </phoneNumber>
  <phoneNumber>
    <type>fax</type>
    <number>646 555-4567</number>
  </phoneNumber>
</root>

Underscore-java is a java port of Underscore.js.

In addition to porting Underscore's functionality, Underscore-java includes matching unit tests.

For docs, license, tests, and downloads, see: https://javadev.github.io/underscore-java

Thanks to Jeremy Ashkenas and all contributors to Underscore.js.

Comments
  • What is the best way to fill the XML Templates when needed?

    What is the best way to fill the XML Templates when needed?

    In this example, I only used one way to put xml template, but is there any way to add bits and pieces of XML snippet ?

    String response = "<FinalResponse>\r\n" + 
    				"   <Type>SUCCESS</Type>\r\n" + 
    				"   <Code>0</Code>\r\n" + 
    				"</FinalResponse>";
    		
    		String xml ="<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:soapenc=\"http://schemas.xmlsoap.org/soap/encoding/\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">"
    		        + "   <soapenv:Header/>"
    		        + "   <soapenv:Body>"
    		        + "<getMyData xmlns:ns10=\"urn:mybay.com:dms:wsdls:Visit\" xmlns:ns5=\"urn:mybay.com:enterprise:schemas:common:elements\" xmlns:ns6=\"urn:mybay.com:enterprise:schemas:Visit\" xmlns:ns7=\"urn:mybay.com:dms:schemas:Visit\" xmlns:ns8=\"urn:mybay.com:enterprise:schemas:account\">"
    		        + "<Visit>"
    		        + "<item></item>"
    		        + "</Visit>"
    		        + response
    		        + "</getMyData>"
    		        + "</soapenv:Body>"
    		        + "</soapenv:Envelope>";
    		
    		Map<String, Object> map = (Map<String, Object>) U.fromXml(xml);
    		
    		
    		Map<String, Object> responsemap = (Map<String, Object>) U.fromXml(response);
    		
    		
    	    String json = "[{\"id\":\"1\",\"name\":\"Bratislava\",\"population\":\"432000\"},{\"id\":\"2\",\"name\":\"Budapest\",\"population\":\"1759000\"},{\"id\":\"3\",\"name\":\"Prague\",\"population\":\"1280000\"},{\"id\":\"4\",\"name\":\"Warsaw\",\"population\":\"1748000\"},{\"id\":\"5\",\"name\":\"Los Angeles\",\"population\":\"3971000\"},{\"id\":\"6\",\"name\":\"New York\",\"population\":\"8550000\"},{\"id\":\"7\",\"name\":\"Edinburgh\",\"population\":\"464000\"},{\"id\":\"8\",\"name\":\"Berlin\",\"population\":\"3671000\"}]";
    	    List<Object> list = (List<Object>) U.fromJson(json);
    	    U.set(map, "soapenv:Envelope.soapenv:Body.getMyData.Visit.item", list);
    	    System.out.println(U.toXml(map));
    
    question 
    opened by javaHelper 15
  • How to convert xml to json with multiple U.Mode?

    How to convert xml to json with multiple U.Mode?

    Such as

    String json = U.xmlToJson(xml, U.Mode.REPLACE_SELF_CLOSING_WITH_NULL, U.Mode.REPLACE_EMPTY_VALUE_WITH_NULL);
    

    which can replace self closing with null and also replace empty value with null

    Reversely, when convert json to xml

    String xml = U.jsonToXml(json, U.Mode.REPLACE_NULL_WITH_EMPTY_VALUE, U.Mode.REPLACE_EMPTY_VALUE_WITH_SELF_CLOSING);
    

    At the same time, I hope to add some new Mode like:

    // replace <aaa></aaa> to "aaa": ""
    U.xmlToJson(xml, U.Mode.REPLACE_EMPTY_TAG_WITH_EMPTY_VALUE);
    

    and reversely

    // replace "a": "" to <aaa></aaa>
    U.jsonToXml(json, U.Mode.REPLACE_EMPTY_VALUE_WITH_EMPTY_TAG);
    
    enhancement 
    opened by dejavuhuh 11
  • JLS discourages use of _ as a variable name in any context

    JLS discourages use of _ as a variable name in any context

    From JLS §15.27.1. Lambda Parameters:

    The use of the variable name _ in any context is discouraged. Future versions of the Java programming language may reserve this name as a keyword and/or give it special semantics.

    Since the JLS is explicit about it, you should consider changing the variable name to something else, maybe $?

    opened by vickychijwani 11
  • Exception in thread

    Exception in thread "main" com.github.underscore.lodash.Json$ParseException: Expected value at 12:4

    How to convert below JSON to XML ?

    Error

    Exception in thread "main" com.github.underscore.lodash.Json$ParseException: Expected value at 12:4
    	at com.github.underscore.lodash.Json$JsonParser.error(Json.java:813)
    	at com.github.underscore.lodash.Json$JsonParser.expected(Json.java:806)
    	at com.github.underscore.lodash.Json$JsonParser.readValue(Json.java:535)
    	at com.github.underscore.lodash.Json$JsonParser.readArray(Json.java:548)
    	at com.github.underscore.lodash.Json$JsonParser.readValue(Json.java:519)
    	at com.github.underscore.lodash.Json$JsonParser.readObject(Json.java:572)
    	at com.github.underscore.lodash.Json$JsonParser.readValue(Json.java:521)
    	at com.github.underscore.lodash.Json$JsonParser.readObject(Json.java:572)
    	at com.github.underscore.lodash.Json$JsonParser.readValue(Json.java:521)
    	at com.github.underscore.lodash.Json$JsonParser.parse(Json.java:500)
    	at com.github.underscore.lodash.Json.fromJson(Json.java:872)
    	at com.github.underscore.lodash.U.fromJson(U.java:2027)
    	at com.example.JsonToXml2.main(JsonToXml2.java:60)
    
    public class JsonToXml2 {
    	public static void main(String[] args) {
    		
    		String response = "<FinalResponse xmlns:ns5=\"urn:mybay.com:enterprise:schemas:common:elements\">\r\n" + 
    				"   <ns5:Type>SUCCESS</ns5:Type>\r\n" + 
    				"   <ns5:Code>0</ns5:Code>\r\n" + 
    				"</FinalResponse>";
    		
    		String xml ="<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:soapenc=\"http://schemas.xmlsoap.org/soap/encoding/\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">"
    		        + "   <soapenv:Header/>"
    		        + "   <soapenv:Body>"
    		        + "<getMyData xmlns:ns10=\"urn:mybay.com:dms:wsdls:Visit\" xmlns:ns5=\"urn:mybay.com:enterprise:schemas:common:elements\" xmlns:ns6=\"urn:mybay.com:enterprise:schemas:Visit\" xmlns:ns7=\"urn:mybay.com:dms:schemas:Visit\" xmlns:ns8=\"urn:mybay.com:enterprise:schemas:account\">"
    		        + "<Visit>"
    		        + "<item>"
    		        + "</item>"
    		        + "</Visit>"
    		        + "</getMyData>"
    		        + response
    		        + "</soapenv:Body>"
    		        + "</soapenv:Envelope>";
    		
    		Map<String, Object> map = (Map<String, Object>) U.fromXml(xml);
    		
    		
    		Map<String, Object> responsemap = (Map<String, Object>) U.fromXml(response);
    		
    		
    	    String json = "{\r\n" + 
    	    		"  \"_embedded\": {\r\n" + 
    	    		"    \"employeeDetails\": [\r\n" + 
    	    		"      {\r\n" + 
    	    		"        \"employeeNumber\": \"100\",\r\n" + 
    	    		"        \"status\": \"A\"\r\n" + 
    	    		"      },\r\n" + 
    	    		"      {\r\n" + 
    	    		"        \"billingNum\": \"200\",\r\n" + 
    	    		"        \"status\": \"A\"\r\n" + 
    	    		"      },\r\n" + 
    	    		"    ]\r\n" + 
    	    		"  },\r\n" + 
    	    		"  \"_links\": {\r\n" + 
    	    		"    \"self\": {\r\n" + 
    	    		"      \"href\": \"/employee/100/employees\"\r\n" + 
    	    		"    }\r\n" + 
    	    		"  },\r\n" + 
    	    		"  \"page\": {\r\n" + 
    	    		"    \"size\": 25,\r\n" + 
    	    		"    \"totalElements\": 11,\r\n" + 
    	    		"    \"totalPages\": 1,\r\n" + 
    	    		"    \"number\": 0\r\n" + 
    	    		"  }\r\n" + 
    	    		"}";
    	    List<Object> list = (List<Object>) U.fromJson(json);
    	    U.set(map, "soapenv:Envelope.soapenv:Body.getMyData.Visit.item", list);
    	    System.out.println(U.toXml(map));
    	}
    }
    
    question 
    opened by javaHelper 10
  • Convert xml to json

    Convert xml to json

    I am getting the API response as following XML, <a> <b ID="0"> <c>10020</c> <d>NEWYORK</d> <e>NY</e> </b> <b ID="1"> <c>06373</c> <d>OLDLYME</d> <e>CT</e> </b> </a>

    I want to convert the above xml to json as follows,

    { "b": [ { "c": "10020", "d": "NEWYORK", "e": "NY" }, { "c": "06373", "d": "OLDLYME", "e": "CT" } ] }

    I have already tried U.xmlToJson(), U.fromXmlWithoutAttributes() but unable to achieve the above expected result.(Skip the root element <a> and also skip xml element attributes("ID") ). Please let me know will this achieved by using Underscore-lib?

    enhancement question 
    opened by Sriram1404 9
  • converting xml to json: self-closing tag

    converting xml to json: self-closing tag

    Hi, I'm working with this nice lib to convert xml/json data and run into some problem with the "-self-closing" : "true" result, if the source xml node is like <nodename />.

    to be honest: I didnt studied the code now and I'm not a java expert. But it seems, that there is no way to deactive the value "self-closing" with e.g. an argument?! Is such a feature planned?

    May I ask you, why you add these self-closing feature? IMO I dont understand why to set an object with this value. I run into trouble with my frontend webapp with the resulting json I get with this lib. Dont you agree that something like { "nodename" : null } is more the result to expect? Also I dont think that the current integration is 100% json correct. your self-closing : "true" is set as string instead of boolean. Would be great to hear about what you think, if there are any easy workarounds or sth similar. Thx in advance! BR

    enhancement 
    opened by DubZyy 9
  • Add support for the toXml() method in string and lodash plugins.

    Add support for the toXml() method in string and lodash plugins.

    Json example

    {
      "glossary": {
        "title": "example glossary",
        "GlossDiv": {
          "title": "S",
          "GlossList": {
            "GlossEntry": {
              "ID": "SGML",
              "SortAs": "SGML",
              "GlossTerm": "Standard Generalized Markup Language",
              "Acronym": "SGML",
              "Abbrev": "ISO 8879:1986",
              "GlossDef": {
                "para": "A meta-markup language, used to create markup languages such as DocBook.",
                "GlossSeeAlso": [
                  "GML",
                  "XML"
                ]
              },
              "GlossSee": "markup"
            }
          }
        }
      }
    }
    

    Xml example:

    <root>
      <glossary>
        <title>example glossary</title>
        <GlossDiv>
          <title>S</title>
          <GlossList>
            <GlossEntry>
              <ID>SGML</ID>
              <SortAs>SGML</SortAs>
              <GlossTerm>Standard Generalized Markup Language</GlossTerm>
              <Acronym>SGML</Acronym>
              <Abbrev>ISO 8879:1986</Abbrev>
              <GlossDef>
                <para>A meta-markup language, used to create markup languages such as DocBook.</para>
                <GlossSeeAlso>
                  <element>GML</element>
                  <element>XML</element>
                </GlossSeeAlso>
              </GlossDef>
              <GlossSee>markup</GlossSee>
            </GlossEntry>
          </GlossList>
        </GlossDiv>
      </glossary>
    </root>
    
    enhancement 
    opened by javadev 9
  • [fix] Xml#getRootName returns null, although there is more than one element.

    [fix] Xml#getRootName returns null, although there is more than one element.

    If there are two or more elements in the map and all elements except one are of type List, the method returns null, resulting in invalid XML due to the missing root element.

    Without this fix, the following JSON results to invalid XML:

    {
      "a": {
        "b": "v1" 
      },
      "c": ["v1", "v2", "v2"]
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <a>
      <b>v1</b>
    </a>
    <c>v1</c>
    <c>v2</c>
    <c>v2</c>
    

    @javadev mind taking a look.

    bug 
    opened by xhaggi 8
  • Handling Numbers and String Data Type

    Handling Numbers and String Data Type

    How can i convert Number presented on XML to be JSON Integer and Not String?

    Example : <a><b>100</b><a> to be { "a" : { "b" : 100 } } and NOT { "a" : { "b" : "100" } }

    bug question 
    opened by josephshirima 7
  • Add support for better formatting in toJson() method.

    Add support for better formatting in toJson() method.

    Example formatted json:

    {
      "glossary": {
        "title": "example glossary",
        "GlossDiv": {
          "title": "S",
          "GlossList": {
            "GlossEntry": {
              "ID": "SGML",
              "SortAs": "SGML",
              "GlossTerm": "Standard Generalized Markup Language",
              "Acronym": "SGML",
              "Abbrev": "ISO 8879:1986",
              "GlossDef": {
                "para": "A meta-markup language, used to create markup languages such as DocBook.",
                "GlossSeeAlso": [
                  "GML",
                  "XML"
                ]
              },
              "GlossSee": "markup"
            }
          }
        }
      }
    }
    
    opened by javadev 7
  • U.xmlToJson() produces emtpy objects when tag is emtpy

    U.xmlToJson() produces emtpy objects when tag is emtpy

    I am trying to convert this XML to JSON :

    <result>
    	<SalHdr>
    		<SalId>32745</SalId>
    		<BillNo>32745</BillNo>
    		<BillDt>2020-09-05T00:00:00</BillDt>
    		<BookId>1</BookId>
    		<Cash>CA</Cash>
    		<BillRefNo>0032745</BillRefNo>
    		<PtyId>0</PtyId>
    		<PtyName></PtyName> // look here
    		<Add1></Add1> // look here
    		<City></City> // look here
    		<TotAmt>247.61</TotAmt>
    		<TaxId>4</TaxId>
    		<Taxper>0.00</Taxper>
    		<TaxAmt>12.38</TaxAmt>
    		<RndOff>0.01</RndOff>
    		<NetAmt>260.00</NetAmt>
    		<DiscAmt>0.00</DiscAmt>
    		<Discper>0.00</Discper>
    		<Remarks></Remarks>
    		<UserId>2</UserId>
    		<CompId>1</CompId>
    		<AcYrId>12</AcYrId>
    		<DocCancel>0</DocCancel>
    		<OtherState>0</OtherState>
    		<WaiterId>4</WaiterId>
    		<WaiterCode>4</WaiterCode>
    		<DeliveryId>0</DeliveryId>
    		<Delivery>CASH</Delivery>
    		<Est>0</Est>
    		<BillTime>2020-09-05T09:08:49</BillTime>
    	</SalHdr>
    	<SalHdr>
    		<SalId>32746</SalId>
    		<BillNo>32746</BillNo>
    		<BillDt>2020-09-05T00:00:00</BillDt>
    		<BookId>1</BookId>
    		<Cash>CA</Cash>
    		<BillRefNo>0032746</BillRefNo>
    		<PtyId>0</PtyId>
    		<PtyName></PtyName>
    		<Add1></Add1>
    		<City></City>
    		<TotAmt>404.74</TotAmt>
    		<TaxId>4</TaxId>
    		<Taxper>0.00</Taxper>
    		<TaxAmt>20.24</TaxAmt>
    		<RndOff>0.02</RndOff>
    		<NetAmt>425.00</NetAmt>
    		<DiscAmt>0.00</DiscAmt>
    		<Discper>0.00</Discper>
    		<Remarks></Remarks>
    		<UserId>2</UserId>
    		<CompId>1</CompId>
    		<AcYrId>12</AcYrId>
    		<DocCancel>0</DocCancel>
    		<OtherState>0</OtherState>
    		<WaiterId>1</WaiterId>
    		<WaiterCode>1</WaiterCode>
    		<DeliveryId>0</DeliveryId>
    		<Delivery>CASH</Delivery>
    		<Est>0</Est>
    		<BillTime>2020-09-05T09:11:21</BillTime>
    	</SalHdr>
    

    Here the PtyName, add1,city is empty . In json I am getting as empty {} instead of emtpy string or null

    {
    "results" : {
    [
    {
            "SalId": "32745",
            "BillNo": "32745",
            "BillDt": "2020-09-05T00:00:00",
            "BookId": "1",
            "Cash": "CA",
            "BillRefNo": "0032745",
            "PtyId": "0",
            "PtyName": {}, // look here
            "Add1": {}, // look here
            "City": {}, // look here
            "TotAmt": "247.61",
            "TaxId": "4",
            "Taxper": "0.00",
            "TaxAmt": "12.38",
            "RndOff": "0.01",
            "NetAmt": "260.00",
            "DiscAmt": "0.00",
            "Discper": "0.00",
            "Remarks": {},
            "UserId": "2",
            "CompId": "1",
            "AcYrId": "12",
            "DocCancel": "0",
            "OtherState": "0",
            "WaiterId": "4",
            "WaiterCode": "4",
            "DeliveryId": "0",
            "Delivery": "CASH",
            "Est": "0",
            "BillTime": "2020-09-05T09:08:49",
            "ID": "1"
          },
          {
            "SalId": "32746",
            "BillNo": "32746",
            "BillDt": "2020-09-05T00:00:00",
            "BookId": "1",
            "Cash": "CA",
            "BillRefNo": "0032746",
            "PtyId": "0",
            "PtyName": {},
            "Add1": {},
            "City": {},
            "TotAmt": "404.74",
            "TaxId": "4",
            "Taxper": "0.00",
            "TaxAmt": "20.24",
            "RndOff": "0.02",
            "NetAmt": "425.00",
            "DiscAmt": "0.00",
            "Discper": "0.00",
            "Remarks": {},
            "UserId": "2",
            "CompId": "1",
            "AcYrId": "12",
            "DocCancel": "0",
            "OtherState": "0",
            "WaiterId": "1",
            "WaiterCode": "1",
            "DeliveryId": "0",
            "Delivery": "CASH",
            "Est": "0",
            "BillTime": "2020-09-05T09:11:21",
            "ID": "2"
          }
        ]
    ]
    }
    
    

    Please help me in this issue since it breaking the model classes

    enhancement 
    opened by RageshAntony 6
Releases(v1.85)
An advanced, but easy to use, platform for writing functional applications in Java 8.

Getting Cyclops X (10) The latest version is cyclops:10.4.0 Stackoverflow tag cyclops-react Documentation (work in progress for Cyclops X) Integration

AOL 1.3k Dec 29, 2022
Java 8 annotation processor and framework for deriving algebraic data types constructors, pattern-matching, folds, optics and typeclasses.

Derive4J: Java 8 annotation processor for deriving algebraic data types constructors, pattern matching and more! tl;dr Show me how to write, say, the

null 543 Nov 23, 2022
Stream utilities for Java 8

protonpack A small collection of Stream utilities for Java 8. Protonpack provides the following: takeWhile and takeUntil skipWhile and skipUntil zip a

Dominic Fox 464 Nov 8, 2022
Enhancing Java Stream API

StreamEx 0.7.3 Enhancing Java Stream API. This library defines four classes: StreamEx, IntStreamEx, LongStreamEx, DoubleStreamEx which are fully compa

Tagir Valeev 2k Jan 3, 2023
vʌvr (formerly called Javaslang) is a non-commercial, non-profit object-functional library that runs with Java 8+. It aims to reduce the lines of code and increase code quality.

Vavr is an object-functional language extension to Java 8, which aims to reduce the lines of code and increase code quality. It provides persistent co

vavr 5.1k Jan 3, 2023
Functional patterns for Java

λ Functional patterns for Java Table of Contents Background Installation Examples Semigroups Monoids Functors Bifunctors Profunctors Applicatives Mona

null 825 Dec 29, 2022
A library that simplifies error handling for Functional Programming in Java

Faux Pas: Error handling in Functional Programming Faux pas noun, /fəʊ pɑː/: blunder; misstep, false step Faux Pas is a library that simplifies error

Zalando SE 114 Dec 5, 2022
RustScript is a functional scripting language with as much relation to Rust as Javascript has to Java.

RustScript RustScript is a scripting language as much relation to Rust as JavaScript has to Java I made this for a school project; it's meant to be im

Mikail Khan 25 Dec 24, 2022
java port of Underscore.js

underscore-java Requirements Java 1.8 and later or Java 11. Installation Include the following in your pom.xml for Maven: <dependencies> <dependency

Valentyn Kolesnikov 411 Dec 6, 2022
Hierarchical Temporal Memory implementation in Java - an official Community-Driven Java port of the Numenta Platform for Intelligent Computing (NuPIC).

htm.java Official Java™ version of... Hierarchical Temporal Memory (HTM) Community-supported & ported from the Numenta Platform for Intelligent Comput

Numenta 301 Dec 1, 2022
icecream-java is a Java port of the icecream library for Python.

icecream-java is a Java port of the icecream library for Python.

Akshay Thakare 20 Apr 7, 2022
A 2d Java physics engine, native java port of the C++ physics engines Box2D and LiquidFun

jbox2d Please see the project's BountySource page to vote on issues that matter to you. Commenting/voting on issues helps me prioritize the small amou

jbox2d 1k Dec 27, 2022
Java port of a concurrent trie hash map implementation from the Scala collections library

About This is a Java port of a concurrent trie hash map implementation from the Scala collections library. It is almost a line-by-line conversion from

null 147 Oct 31, 2022
Port of LevelDB to Java

LevelDB in Java This is a rewrite (port) of LevelDB in Java. This goal is to have a feature complete implementation that is within 10% of the performa

Dain Sundstrom 1.4k Dec 30, 2022
A straight forward C++ to Java port of Daniel Lemire's fast_double_parser

FastDoubleParser A straight forward C++ to Java port of Daniel Lemire's fast_double_parser. https://github.com/lemire/fast_double_parser Usage: import

null 128 Jan 4, 2023
OpenTTD port to Java

NextTTD (JDrive) This is an OpenTTD port to Java. Current state: The game is basically playable - aircrafts, trains, ships and road vehicles are worki

Dmitry Zavalishin 23 Dec 16, 2022
A Local implementation of a java library functions to create a serverside and clientside application which will communicate over TCP using given port and ip address.

A Local implementation of java library functions to create a serverside and clientside application which will communicate over TCP using given port and ip address.

Isaac Barry 1 Feb 12, 2022
Juerr is a Java port of the uerr crate, it provides stunning visual error handling.

Juerr Juerr is a Java port of the uerr crate, it provides stunning visual error handling. Showcase Using the code below, we can display a simple error

IkeVoodoo 3 Jul 17, 2022
Java port of Brainxyz's Artificial Life, a simple program to simulate primitive Artificial Life using simple rules of attraction or repulsion among atom-like particles, producing complex self-organzing life-like patterns.

ParticleSimulation simple Java port of Brainxyz's Artificial Life A simple program to simulate primitive Artificial Life using simple rules of attract

Koonts 3 Oct 5, 2022