com.twitter.algebird.javaapi.Semigroups Maven / Gradle / Ivy
/*
Copyright 2014 Twitter, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package com.twitter.algebird.javaapi;
import com.twitter.algebird.Semigroup;
import com.twitter.algebird.Semigroup$;
/**
*
* helps use the Semigroups from Java
*
* @author Julien Le Dem
*
*/
public class Semigroups {
private Semigroups() {}
private static final Semigroup$ MODULE = Semigroup$.MODULE$;
private static final MethodRegistry registry = new MethodRegistry(MODULE, Semigroup.class);
/**
* @param c the type of the elements
* @return a semigroup of c
*/
public static Semigroup semigroup(Class c) {
@SuppressWarnings("unchecked")
Semigroup sg = (Semigroup)registry.resolveAndInvoke(c);
return sg;
}
public static Semigroup boolSemigroup() { return MODULE.jboolSemigroup(); }
public static Semigroup intSemigroup() { return MODULE.jintSemigroup(); }
public static Semigroup shortSemigroup() { return MODULE.jshortSemigroup(); }
public static Semigroup bigIntSemigroup() { return MODULE.bigIntSemigroup(); }
public static Semigroup longSemigroup() { return MODULE.jlongSemigroup(); }
public static Semigroup floatSemigroup() { return MODULE.jfloatSemigroup(); }
public static Semigroup doubleSemigroup() { return MODULE.jdoubleSemigroup(); }
public static Semigroup stringSemigroup() { return MODULE.stringSemigroup(); }
public static Semigroup> optionSemigroup(Semigroup componentSemigroup) { return MODULE.optionSemigroup(componentSemigroup); }
public static Semigroup> listSemigroup() { return MODULE.listSemigroup(); }
public static Semigroup> seqSemigroup() { return MODULE.seqSemigroup(); }
public static Semigroup> indexedSeqSemigroup(Semigroup componentSemigroup) { return MODULE.indexedSeqSemigroup(componentSemigroup); }
public static Semigroup> jlistSemigroup() { return MODULE.jlistSemigroup(); }
public static Semigroup> setSemigroup() { return MODULE.setSemigroup(); }
public static Semigroup> mapSemigroup(Semigroup componentSemigroup) { return MODULE.mapSemigroup(componentSemigroup); }
public static Semigroup> scMapSemigroup(Semigroup componentSemigroup) { return MODULE.scMapSemigroup(componentSemigroup); }
public static Semigroup> jmapSemigroup(Semigroup componentSemigroup) { return MODULE.jmapSemigroup(componentSemigroup); }
public static Semigroup> function1Semigroup() { return MODULE.function1Semigroup(); }
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy