public String getDisplayName() { String displayName; if(title!=null) displayName = title; else displayName = name; return StringUtils.removeStart(displayName, "Jenkins "); }
/** * {@inheritDoc} */ public String name(int value) { if (value < LOOKUP_TABLE_SIZE) { return lookupTable()[value]; } return super.name(value); }
IEnumerator IEnumerable.GetEnumerator() { throw new NotImplementedException(); }
public String getChoicesText() { return StringUtils.join(choices, "\n"); }
/** * <p>Creates a random string whose length is the number of characters * specified.</p> * * <p>Characters will be chosen from the set of all characters.</p> * * @param count the length of random string to create * @return the random string */ public static String random(int count) { return random(count, false, false); }
/** * <p>Checks if the value is in the given array.</p> * * <p>The method returns <code>false</code> if a <code>null</code> array is passed in.</p> * * @param array the array to search through * @param valueToFind the value to find * @return <code>true</code> if the array contains the object */ public static boolean contains(double[] array, double valueToFind) { return indexOf(array, valueToFind) != INDEX_NOT_FOUND; }
/** * Gets the value as a Boolean instance. * * @return the value as a Boolean, never null */ public Object getValue() { return BooleanUtils.toBooleanObject(this.value); }
/** * <p>Sets a boolean BitField.</p> * * @param holder the short data containing the bits we're * interested in * @param flag indicating whether to set or clear the bits * @return the value of holder with the specified bits set or * cleared */ public short setShortBoolean(short holder, boolean flag) { return flag ? setShort(holder) : clearShort(holder); }
/** * <p>Sets a boolean BitField.</p> * * @param holder the byte data containing the bits we're * interested in * @param flag indicating whether to set or clear the bits * @return the value of holder with the specified bits set or * cleared */ public byte setByteBoolean(byte holder, boolean flag) { return flag ? setByte(holder) : clearByte(holder); }
/** * <p>Constructs a <code>CharRange</code> over a set of characters.</p> * * @param start first character, inclusive, in this range * @param end last character, inclusive, in this range * @return the new CharRange object * @see CharRange#CharRange(char, char, boolean) * @since 2.5 */ public static CharRange isIn(char start, char end) { return new CharRange(start, end, false); }
/** * <p>Convert a <code>String</code> to an <code>int</code>, returning * <code>zero</code> if the conversion fails.</p> * * @param str the string to convert * @return the int represented by the string, or <code>zero</code> if * conversion fails */ public static int stringToInt(String str) { return stringToInt(str, 0); }
/** * {@inheritDoc} */ public String name(int value) { int index = binarySearch(value); if (index < 0) { return null; } return names[index]; } }
/** * <p> * Returns the name of the entity identified by the specified value. * </p> * * @param value * the value to locate * @return entity name associated with the specified value */ public String entityName(int value) { return map.name(value); }
/** * <p>Sets the bits.</p> * * @param holder the byte data containing the bits we're * interested in * * @return the value of holder with the specified bits set * to <code>1</code> */ public byte setByte(byte holder) { return (byte) set(holder); }
/** * <p>Constructs a new CharSet using the set syntax.</p> * * @param setStr the String describing the set, may be null * @since 2.0 */ protected CharSet(String setStr) { super(); add(setStr); }
/** * <p>Clears the bits.</p> * * @param holder the byte data containing the bits we're * interested in * * @return the value of holder with the specified bits cleared * (set to <code>0</code>) */ public byte clearByte(byte holder) { return (byte) clear(holder); }
/** * <p>Checks if the value is in the given array.</p> * * <p>The method returns <code>false</code> if a <code>null</code> array is passed in.</p> * * @param array the array to search through * @param valueToFind the value to find * @return <code>true</code> if the array contains the object */ public static boolean contains(short[] array, short valueToFind) { return indexOf(array, valueToFind) != INDEX_NOT_FOUND; }
/** * <p>Constructs a negated <code>CharRange</code> over a set of characters.</p> * * @param start first character, inclusive, in this range * @param end last character, inclusive, in this range * @return the new CharRange object * @see CharRange#CharRange(char, char, boolean) * @since 2.5 */ public static CharRange isNotIn(char start, char end) { return new CharRange(start, end, true); }
/** * <p>Sets the bits.</p> * * @param holder the short data containing the bits we're * interested in * @return the value of holder with the specified bits set * to <code>1</code> */ public short setShort(short holder) { return (short) set(holder); }
/** * <p>Checks if the object is in the given array.</p> * * <p>The method returns <code>false</code> if a <code>null</code> array is passed in.</p> * * @param array the array to search through * @param objectToFind the object to find * @return <code>true</code> if the array contains the object */ public static boolean contains(Object[] array, Object objectToFind) { return indexOf(array, objectToFind) != INDEX_NOT_FOUND; }