Java tutorial
//package com.java2s; //License from project: Open Source License public class Main { private static String[] propertyShortcuts = new String[] { "get", "is" }; public static boolean isPropertyShortcutMethodEqual(String methodName, String variableName) { for (String shortcut : propertyShortcuts) { if (methodName.equalsIgnoreCase(shortcut + variableName)) { return true; } } return false; } }