Skip to content

Instantly share code, notes, and snippets.

@edefazio
Created December 17, 2019 21:31
Show Gist options
  • Save edefazio/2d5b659bbb7b2197d7e9264238943e07 to your computer and use it in GitHub Desktop.
Save edefazio/2d5b659bbb7b2197d7e9264238943e07 to your computer and use it in GitHub Desktop.
Interfaces for Lookup Tables...(so we can use dynamically built classes can implement at runtime)
package use.jdraft.lut;
/**
* Realized Lookup Table (Lut)
* Switch lookup table
*
* @author Eric
*
*/
public interface Lut {
//String to lookup
public interface String_to_int extends Lut{
int lookup(String key);
}
public interface String_to_long extends Lut{
long lookup(String key);
}
public interface String_to_float extends Lut{
float lookup(String key);
}
public interface String_to_double extends Lut{
double lookup(String key);
}
public interface String_to_char extends Lut{
char lookup(String key);
}
public interface String_to_String extends Lut{
String lookup(String key);
}
//Long to
public interface long_to_String extends Lut{
String lookup(long key);
}
public interface long_to_long extends Lut{
long lookup(String key);
}
//int to
public interface int_to_String extends Lut{
String lookup(int key);
}
public interface int_to_int extends Lut{
long lookup(String key);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment