Java tutorial
//package com.java2s; /* * eID Identity Provider Project. * Copyright (C) 2010 FedICT. * * This is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License version * 3.0 as published by the Free Software Foundation. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this software; if not, see * http://www.gnu.org/licenses/. */ public class Main { private static final String SYMBIAN = "symbian"; private static final String S60 = "series60"; private static final String S70 = "series70"; private static final String S80 = "series80"; private static final String S90 = "series90"; private static boolean isSymbian(String userAgent) { return userAgent.indexOf(SYMBIAN) != -1 || userAgent.indexOf(S60) != -1 || userAgent.indexOf(S70) != -1 || userAgent.indexOf(S80) != -1 || userAgent.indexOf(S90) != -1; } }