Skip to content

Commit

Permalink
move packages
Browse files Browse the repository at this point in the history
  • Loading branch information
iTitus committed Jan 19, 2022
1 parent 42e9c29 commit 15d7795
Show file tree
Hide file tree
Showing 253 changed files with 1,117 additions and 1,083 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ group = 'io.github.ititus'
version = '2.0.0'

wrapper {
gradleVersion '7.3.1'
gradleVersion '7.3.3'
}

java {
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.ititus.data;
package io.github.ititus.commons.data;

import java.util.Arrays;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.ititus.data;
package io.github.ititus.commons.data;

import java.util.List;
import java.util.function.Function;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.ititus.data;
package io.github.ititus.commons.data;

public interface DeepToString {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.ititus.data;
package io.github.ititus.commons.data;

import java.util.*;
import java.util.function.Consumer;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.ititus.data;
package io.github.ititus.commons.data;

import java.util.Enumeration;
import java.util.Iterator;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.ititus.data;
package io.github.ititus.commons.data;

import java.util.Iterator;
import java.util.NoSuchElementException;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.ititus.data;
package io.github.ititus.commons.data;

import java.util.Objects;
import java.util.function.Supplier;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.ititus.data;
package io.github.ititus.commons.data;

import java.util.*;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.ititus.data;
package io.github.ititus.commons.data;

import java.util.Iterator;
import java.util.LinkedHashMap;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package io.github.ititus.data.mutable;
package io.github.ititus.commons.data.mutable;

import io.github.ititus.data.DeepToString;
import io.github.ititus.data.ObjectUtil;
import io.github.ititus.commons.data.DeepToString;
import io.github.ititus.commons.data.ObjectUtil;

import java.util.Objects;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.ititus.data.mutable;
package io.github.ititus.commons.data.mutable;

import java.util.function.Supplier;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.ititus.data.mutable;
package io.github.ititus.commons.data.mutable;

public final class MutableInt {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package io.github.ititus.data.pair;
package io.github.ititus.commons.data.pair;

import io.github.ititus.data.pair.impl.IntIntPairImpl;
import io.github.ititus.commons.data.pair.impl.IntIntPairImpl;

public interface IntIntPair extends Pair<Integer, Integer> {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package io.github.ititus.data.pair;
package io.github.ititus.commons.data.pair;

import io.github.ititus.data.pair.impl.IntObjPairImpl;
import io.github.ititus.commons.data.pair.impl.IntObjPairImpl;

public interface IntObjPair<B> extends Pair<Integer, B> {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package io.github.ititus.data.pair;
package io.github.ititus.commons.data.pair;

import io.github.ititus.data.pair.impl.LongLongPairImpl;
import io.github.ititus.commons.data.pair.impl.LongLongPairImpl;

public interface LongLongPair extends Pair<Long, Long> {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package io.github.ititus.data.pair;
package io.github.ititus.commons.data.pair;

import io.github.ititus.data.DeepToString;
import io.github.ititus.data.pair.impl.PairImpl;
import io.github.ititus.commons.data.DeepToString;
import io.github.ititus.commons.data.pair.impl.PairImpl;

public interface Pair<A, B> extends DeepToString {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package io.github.ititus.data.pair.impl;
package io.github.ititus.commons.data.pair.impl;

import io.github.ititus.data.ArrayUtil;
import io.github.ititus.data.pair.IntIntPair;
import io.github.ititus.commons.data.ArrayUtil;
import io.github.ititus.commons.data.pair.IntIntPair;

public final class IntIntPairImpl implements IntIntPair {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package io.github.ititus.data.pair.impl;
package io.github.ititus.commons.data.pair.impl;

import io.github.ititus.data.ObjectUtil;
import io.github.ititus.data.pair.IntObjPair;
import io.github.ititus.commons.data.ObjectUtil;
import io.github.ititus.commons.data.pair.IntObjPair;

import java.util.Objects;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package io.github.ititus.data.pair.impl;
package io.github.ititus.commons.data.pair.impl;

import io.github.ititus.data.ArrayUtil;
import io.github.ititus.data.pair.LongLongPair;
import io.github.ititus.commons.data.ArrayUtil;
import io.github.ititus.commons.data.pair.LongLongPair;

public final class LongLongPairImpl implements LongLongPair {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package io.github.ititus.data.pair.impl;
package io.github.ititus.commons.data.pair.impl;

import io.github.ititus.data.ObjectUtil;
import io.github.ititus.data.pair.Pair;
import io.github.ititus.commons.data.ObjectUtil;
import io.github.ititus.commons.data.pair.Pair;

import java.util.Objects;

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
package io.github.ititus.commons.exception;

public final class ExceptionUtil {

private ExceptionUtil() {
}

public static void print(Throwable t) {
System.out.flush();
System.err.flush();
print(t, 0);
}

private static void print(Throwable t, int indent) {
String msg = t.getLocalizedMessage();
System.err.println(" ".repeat(indent) + t.getClass().getName() + (msg != null ? ": " + msg : ""));

Throwable[] ss = t.getSuppressed();
if (ss.length > 0) {
System.err.println(" ".repeat(indent) + "Suppressed (" + ss.length + "):");
for (int i = 0, length = ss.length; i < length; i++) {
if (i > 0) {
System.err.println();
}

print(ss[i], indent + 1);
}
}

if (t.getCause() != null) {
System.err.println(" ".repeat(indent) + "Caused by:");
print(t.getCause(), indent + 1);
}
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.ititus.function;
package io.github.ititus.commons.function;

import java.util.Objects;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.ititus.function;
package io.github.ititus.commons.function;

import java.util.Objects;
import java.util.function.Function;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.ititus.function;
package io.github.ititus.commons.function;

import java.util.Objects;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.ititus.function;
package io.github.ititus.commons.function;

import java.util.Objects;
import java.util.function.Function;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.ititus.function;
package io.github.ititus.commons.function;

@FunctionalInterface
public interface BooleanFunction<R> {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.ititus.function;
package io.github.ititus.commons.function;

import java.util.Objects;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.ititus.function;
package io.github.ititus.commons.function;

import java.util.Objects;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.ititus.internal;
package io.github.ititus.commons.internal;

public final class Config {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.ititus.io;
package io.github.ititus.commons.io;

import java.net.URLEncoder;
import java.net.http.HttpRequest.BodyPublisher;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.ititus.io;
package io.github.ititus.commons.io;

import java.nio.file.Path;
import java.util.*;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.ititus.io;
package io.github.ititus.commons.io;

import java.nio.file.Path;
import java.util.Collection;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.ititus.io;
package io.github.ititus.commons.io;

import java.util.HashMap;
import java.util.Map;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.ititus.io;
package io.github.ititus.commons.io;

import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
Expand Down Expand Up @@ -31,5 +31,4 @@ public static String buildQueryString(Map<String, String> params) {

return query.toString();
}

}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.ititus.io;
package io.github.ititus.commons.io;

import java.io.IOException;
import java.io.InputStream;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.ititus.io;
package io.github.ititus.commons.io;

import java.nio.file.Path;
import java.util.Objects;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.ititus.io;
package io.github.ititus.commons.io;

import java.io.IOException;
import java.io.UncheckedIOException;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.ititus.io;
package io.github.ititus.commons.io;

import java.io.IOException;
import java.net.URI;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.ititus.math.base;
package io.github.ititus.commons.math.base;

import java.nio.charset.StandardCharsets;
import java.util.Base64;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package io.github.ititus.math.base;
package io.github.ititus.commons.math.base;

import io.github.ititus.math.number.BigIntegerMath;
import io.github.ititus.commons.math.number.BigIntegerMath;

import java.math.BigInteger;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package io.github.ititus.math.base;
package io.github.ititus.commons.math.base;

import io.github.ititus.math.base.binary.BinaryConverter;
import io.github.ititus.commons.math.base.binary.BinaryConverter;

public final class BaseConverters {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.ititus.math.base;
package io.github.ititus.commons.math.base;

import java.util.Objects;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
package io.github.ititus.math.base.binary;
package io.github.ititus.commons.math.base.binary;

import io.github.ititus.math.base.BaseConverter;
import io.github.ititus.commons.math.base.BaseConverter;
import io.github.ititus.commons.math.number.BigIntegerConstants;

import java.math.BigInteger;
import java.util.BitSet;

import static io.github.ititus.math.number.BigIntegerConstants.ONE;
import static io.github.ititus.math.number.BigIntegerConstants.ZERO;

public final class BinaryConverter extends BaseConverter {

public static final BinaryConverter INSTANCE = new BinaryConverter();
Expand Down Expand Up @@ -107,8 +105,8 @@ public long decodeToLongUnsigned(BinaryNumber bn) {
}

public BigInteger decodeToBigIntegerUnsigned(BinaryNumber bn) {
BigInteger n = ZERO;
BigInteger b = ONE;
BigInteger n = BigIntegerConstants.ZERO;
BigInteger b = BigIntegerConstants.ONE;

for (int i = 0; i < bn.getLength(); i++) {
if (bn.get(i)) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.ititus.math.base.binary;
package io.github.ititus.commons.math.base.binary;

import java.util.Arrays;
import java.util.BitSet;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.ititus.math.base.binary;
package io.github.ititus.commons.math.base.binary;

import java.util.ArrayList;
import java.util.Collections;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.ititus.math.base.binary;
package io.github.ititus.commons.math.base.binary;

public final class HammingDistance {

Expand Down
Loading

0 comments on commit 15d7795

Please sign in to comment.