If you think the Android project wally listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
Java Source Code
/*
* Copyright (C) 2014 Freddie (Musenkishi) Lust-Hed
*//fromwww.java2s.com
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/package com.musenkishi.wally.models.filters;
import com.musenkishi.wally.models.Filter;
import java.util.ArrayList;
import java.util.List;
/**
* Final class containing all values needed for the timespan filter.
* Created by Musenkishi on 2014-03-13 19:30.
*/publicfinalclass FilterTimeSpanKeys {
publicstaticfinal String PARAMETER_KEY = "ts";
publicstaticfinal Filter<String, String> TIMESPAN_24H = new Filter<String, String>("1 day (24h)", "1d");
publicstaticfinal Filter<String, String> TIMESPAN_3_DAYS = new Filter<String, String>("3 days", "3d");
publicstaticfinal Filter<String, String> TIMESPAN_1_WEEK = new Filter<String, String>("1 week", "1w");
publicstaticfinal Filter<String, String> TIMESPAN_2_WEEKS = new Filter<String, String>("2 weeks", "2w");
publicstaticfinal Filter<String, String> TIMESPAN_1_MONTH = new Filter<String, String>("1 month", "1m");
publicstaticfinal Filter<String, String> TIMESPAN_2_MONTHS = new Filter<String, String>("2 months", "2m");
publicstaticfinal Filter<String, String> TIMESPAN_3_MONTHS = new Filter<String, String>("3 months", "3m");
publicstaticfinal Filter<String, String> TIMESPAN_ALL_TIME = new Filter<String, String>("All time", "1");
publicstatic List<Filter<String, String>> getOrderedList(){
ArrayList<Filter<String, String>> filters = new ArrayList<Filter<String, String>>();
filters.add(TIMESPAN_24H);
filters.add(TIMESPAN_3_DAYS);
filters.add(TIMESPAN_1_WEEK);
filters.add(TIMESPAN_2_WEEKS);
filters.add(TIMESPAN_1_MONTH);
filters.add(TIMESPAN_2_MONTHS);
filters.add(TIMESPAN_3_MONTHS);
filters.add(TIMESPAN_ALL_TIME);
return filters;
}
}