1 /* 2 * Copyright (C) 2011 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 package com.android.tools.lint.detector.api; 18 19 import com.android.annotations.NonNull; 20 import com.google.common.annotations.Beta; 21 22 /** 23 * Enum which describes the different computation speeds of various detectors 24 * <p> 25 * <b>NOTE: This is not a public or final API; if you rely on this be prepared 26 * to adjust your code for the next tools release.</b> 27 */ 28 @Beta 29 public enum Speed { 30 /** The detector can run very quickly */ 31 FAST("Fast"), 32 33 /** The detector runs reasonably fast */ 34 NORMAL("Normal"), 35 36 /** The detector might take a long time to run */ 37 SLOW("Slow"); 38 39 private String mDisplayName; 40 Speed(@onNull String displayName)41 Speed(@NonNull String displayName) { 42 mDisplayName = displayName; 43 } 44 45 /** 46 * Returns the user-visible description of the speed of the given 47 * detector 48 * 49 * @return the description of the speed to display to the user 50 */ 51 @NonNull getDisplayName()52 public String getDisplayName() { 53 return mDisplayName; 54 } 55 }