public class NumbersCombine extends Object
Constructor and Description |
---|
NumbersCombine() |
Modifier and Type | Method and Description |
---|---|
static long |
combine(int arg1,
int arg2)
combines the two given numbers into a long that is unique for the two
numbers and their order
|
static int |
combine(short arg1,
short arg2)
combines the two given numbers into an int that is unique for the two
numbers and their order
|
static short |
getFirst(int code)
returns the unique short i that has some number j such that code =
combine(i,j)
|
static int |
getFirst(long code)
returns the unique int i that has some number j such that code =
combine(i,j)
|
static short |
getSecond(int code)
returns the unique short i that has some number j such that code =
combine(j,i)
|
static int |
getSecond(long code)
returns the unique int i that has some number j such that code =
combine(j,i)
|
public static long combine(int arg1, int arg2)
arg1
- arg2
- public static int combine(short arg1, short arg2)
arg1
- arg2
- public static int getFirst(long code)
code
- public static int getSecond(long code)
code
- public static short getFirst(int code)
code
- public static short getSecond(int code)
code
- Copyright © 2017. All rights reserved.