Collection of useful utilities for Java games and apps. A lot of interesting utilities that could maybe still find some use if you work with Java...
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
mightyutils/src/mightypork/utils/ion/IonizerBundled.java

37 lines
723 B

package mightypork.utils.ion;
/**
* External ionizer using a data bundle - can be used if the data type cannot be
* modified to implement the proper interface
*
* @author Ondřej Hruška (MightyPork)
* @param <T>
*/
public abstract class IonizerBundled<T> {
@SuppressWarnings("unchecked")
final void _save(Object object, IonDataBundle out)
{
save((T) object, out);
}
/**
* Save an object to data bundle
*
* @param object object to save
* @param out bundle to save to
*/
public abstract void save(T object, IonDataBundle out);
/**
* Load an object from a bundle
*
* @param in bundle to load from
* @return the loaded object
*/
public abstract T load(IonDataBundle in);
}