net.anotheria.anosite.gen.asresourcedata.data.FileLinkSortType Maven / Gradle / Ivy
/**
********************************************************************************
*** FileLinkSortType.java ***
*** generated by AnoSiteGenerator (ASG), Version: 3.2.2 ***
*** Copyright (C) 2005 - 2023 Anotheria.net, www.anotheria.net ***
*** All Rights Reserved. ***
********************************************************************************
*** Don't edit this code, if you aren't sure ***
*** that you do exactly know what you are doing! ***
*** It's better to invest time in the generator, as into the generated code. ***
********************************************************************************
*/
package net.anotheria.anosite.gen.asresourcedata.data;
import net.anotheria.util.sorter.SortType;
public class FileLinkSortType extends SortType{
public static final int SORT_BY_ID = 1;
public static final int SORT_BY_NAME = 2;
public static final int SORT_BY_TITLE = 3;
public static final int SORT_BY_FILE = 4;
public static final int SORT_BY_SIZE = 5;
public static final int SORT_BY_DEFAULT = SORT_BY_ID;
public FileLinkSortType(){
super(SORT_BY_DEFAULT);
}
public FileLinkSortType(int method){
super(method);
}
public FileLinkSortType(int method, boolean order){
super(method, order);
}
public static int name2method(String name){
if ("id".equals(name))
return SORT_BY_ID;
if ("name".equals(name))
return SORT_BY_NAME;
if ("title".equals(name))
return SORT_BY_TITLE;
if ("file".equals(name))
return SORT_BY_FILE;
if ("size".equals(name))
return SORT_BY_SIZE;
throw new RuntimeException("Unknown sort type name: "+name);
}
}