Obtains the shape of the preview of the preference's color from a specific typed array.

@param typedArray
The typed array, the shape should be obtained from, as an instance of the class
{@link TypedArray}. The typed array may not be null
762930
private void obtainPreviewShape(@NonNull final TypedArray typedArray) {
        int defaultValue = getContext().getResources()
                .getInteger(R.integer.color_picker_preference_default_preview_shape);
        setPreviewShape(PreviewShape.fromValue(typedArray
                .getInteger(R.styleable.AbstractColorPickerPreference_previewShape, defaultValue)));
    }
390642
public final void setShape(@NonNull final PreviewShape shape) {
        Condition.INSTANCE.ensureNotNull(shape, "The shape may not be null");
        this.shape = shape;
    }
543512
public IType getFeatureType()
  {
    if( _delegate.getFeatureType().isArray() )
    {
      return _delegate.getFeatureType();
    }
    return _delegate.getFeatureType().getArrayType();
  }
1369507
private void obtainPreviewSize(@NonNull final TypedArray typedArray) {
        int defaultValue = getContext().getResources()
                .getDimensionPixelSize(R.dimen.color_picker_preference_default_preview_size);
        setPreviewSize(typedArray
                .getDimensionPixelSize(R.styleable.AbstractColorPickerPreference_previewSize,
                        defaultValue));
    }
1159102
private void obtainTint(@NonNull final TypedArray typedArray) {
        setIconTintList(
                typedArray.getColorStateList(R.styleable.NavigationPreference_android_tint));
    }
1256610
@Override
    public synchronized void onNDArray(INDArray arr) {
        if (shape == null)
            updater.update(arr.reshape(1, arr.length()), updater.ndArrayHolder().get());
        else
            updater.update(arr, updater.ndArrayHolder().get());
    }
209508
private void obtainEmulateParallelLight(@NonNull final TypedArray typedArray) {
        boolean defaultValue = getResources()
                .getBoolean(R.bool.elevation_shadow_view_emulate_parallel_light_default_value);
        emulateParallelLight = typedArray
                .getBoolean(R.styleable.ElevationShadowView_emulateParallelLight, defaultValue);
    }
1245229
private void obtainDialogItemColor(@NonNull final TypedArray typedArray) {
        setDialogItemColor(
                typedArray.getColor(R.styleable.AbstractListPreference_dialogItemColor, -1));
    }
719599
public static <T> T descClone(final T comparableArray) {

        if (isComparableArray(comparableArray)) {
            T clone = BeanUtils.clone(comparableArray);
            descByReflex(clone);
            return clone;
        }
        return comparableArray;
    }
382961
public static <T extends Comparable<? super T>> T[] asc(final T[] comparableArray) {

        if (comparableArray == null) {
            return null;
        }
        T[] clone = comparableArray.clone();
        ascByReflex(clone);
        return clone;
    }
504278
private TwoColors getCheckBoxBulletColors(CommonControlState type) {
        switch (type) {

        case DISABLED:
        case DISABLED_SELECTED:
            return buttonbulletDisabled;

        case ENABLED:
        case PRESSED:
        case SELECTED:
        case PRESSED_SELECTED:
            return buttonBulletEnabled;
        }

        return null;
    }
479735
private void obtainMinNumber(@NonNull final TypedArray typedArray) {
        int defaultValue = getContext().getResources()
                .getInteger(R.integer.number_picker_preference_default_min_number);
        setMinNumber(
                typedArray.getInteger(R.styleable.AbstractNumericPreference_min, defaultValue));
    }
232269
protected void initAttributes(TypedArray attrArray) {
        mCircleXRadius = attrArray.getDimension(R.styleable.CircularSeekBar_circle_x_radius, DEFAULT_CIRCLE_X_RADIUS * DPTOPX_SCALE);
        mCircleYRadius = attrArray.getDimension(R.styleable.CircularSeekBar_circle_y_radius, DEFAULT_CIRCLE_Y_RADIUS * DPTOPX_SCALE);
        mPointerRadius = attrArray.getDimension(R.styleable.CircularSeekBar_pointer_radius, DEFAULT_POINTER_RADIUS * DPTOPX_SCALE);
        mPointerHaloWidth = attrArray.getDimension(R.styleable.CircularSeekBar_pointer_halo_width, DEFAULT_POINTER_HALO_WIDTH * DPTOPX_SCALE);
        mPointerHaloBorderWidth = attrArray.getDimension(R.styleable.CircularSeekBar_pointer_halo_border_width, DEFAULT_POINTER_HALO_BORDER_WIDTH * DPTOPX_SCALE);
        mCircleStrokeWidth = attrArray.getDimension(R.styleable.CircularSeekBar_circle_stroke_width, DEFAULT_CIRCLE_STROKE_WIDTH * DPTOPX_SCALE);

        mPointerColor = attrArray.getColor(R.styleable.CircularSeekBar_pointer_color, DEFAULT_POINTER_COLOR);
        mPointerHaloColor = attrArray.getColor(R.styleable.CircularSeekBar_pointer_halo_color, DEFAULT_POINTER_HALO_COLOR);
        mPointerHaloColorOnTouch = attrArray.getColor(R.styleable.CircularSeekBar_pointer_halo_color_ontouch, DEFAULT_POINTER_HALO_COLOR_ONTOUCH);
        mCircleColor = attrArray.getColor(R.styleable.CircularSeekBar_circle_color, DEFAULT_CIRCLE_COLOR);
        mCircleProgressColor = attrArray.getColor(R.styleable.CircularSeekBar_circle_progress_color, DEFAULT_CIRCLE_PROGRESS_COLOR);
        mCircleFillColor = attrArray.getColor(R.styleable.CircularSeekBar_circle_fill, DEFAULT_CIRCLE_FILL_COLOR);

        mPointerAlpha = Color.alpha(mPointerHaloColor);

        mPointerAlphaOnTouch = attrArray.getInt(R.styleable.CircularSeekBar_pointer_alpha_ontouch, DEFAULT_POINTER_ALPHA_ONTOUCH);
        if (mPointerAlphaOnTouch > 255 || mPointerAlphaOnTouch < 0) {
            mPointerAlphaOnTouch = DEFAULT_POINTER_ALPHA_ONTOUCH;
        }

        mMax = attrArray.getInt(R.styleable.CircularSeekBar_maxValue, DEFAULT_MAX);
        mProgress = attrArray.getInt(R.styleable.CircularSeekBar_progressValue, DEFAULT_PROGRESS);
        mCustomRadii = attrArray.getBoolean(R.styleable.CircularSeekBar_use_custom_radii, DEFAULT_USE_CUSTOM_RADII);
        mMaintainEqualCircle = attrArray.getBoolean(R.styleable.CircularSeekBar_maintain_equal_circle, DEFAULT_MAINTAIN_EQUAL_CIRCLE);
        mMoveOutsideCircle = attrArray.getBoolean(R.styleable.CircularSeekBar_move_outside_circle, DEFAULT_MOVE_OUTSIDE_CIRCLE);
        lockEnabled = attrArray.getBoolean(R.styleable.CircularSeekBar_lock_enabled, DEFAULT_LOCK_ENABLED);

        // Modulo 360 right now to avoid constant conversion
        mStartAngle = ((360f + (attrArray.getFloat((R.styleable.CircularSeekBar_start_angle), DEFAULT_START_ANGLE) % 360f)) % 360f);
        mEndAngle = ((360f + (attrArray.getFloat((R.styleable.CircularSeekBar_end_angle), DEFAULT_END_ANGLE) % 360f)) % 360f);

        if (mStartAngle == mEndAngle) {
            //mStartAngle = mStartAngle + 1f;
            mEndAngle = mEndAngle - .1f;
        }
    }
416639
private void obtainBreadCrumbTitle(@NonNull final TypedArray typedArray) {
        setBreadCrumbTitle(
                typedArray.getText(R.styleable.NavigationPreference_android_breadCrumbTitle));
    }
985408
public static <E extends Comparable<E>> void sort(E[] array) {
        int index = 0;
        E value = null;
        
        for(int i = 1; i < array.length; i++) {
            index = i;
            value = array[index];

            while(index > 0 && value.compareTo(array[index - 1]) < 0) {
                array[index] = array[index - 1];
                
                index--;
            }
            
            array[index] = value;
        }
    }
799212
private void obtainDialogWidth(@NonNull final TypedArray typedArray) {
        int width = 0;

        try {
            width = typedArray
                    .getDimensionPixelSize(R.styleable.DialogPreference_dialogWidth, width);
        } catch (Resources.NotFoundException | UnsupportedOperationException e) {
            width = typedArray.getInteger(0, width);
        }

        if (width != 0) {
            setDialogWidth(width);
        }
    }
29075
protected Type getTypeForElement(@Nonnull TypedElement type) {
        Type propertyType;
        final Optional<Class> pt;
        final String typeName = type.getName();
        if (type.isPrimitive()) {
            if (type.isArray()) {
                pt = ClassUtils.arrayTypeForPrimitive(typeName);
            } else {
                pt = ClassUtils.getPrimitiveType(typeName);
            }
        } else {
            pt = Optional.empty();
        }
        if (pt.isPresent()) {
            propertyType = getTypeReference(pt.get());
        } else {
            if (type.isArray()) {
                propertyType = getTypeReference(typeName + "[]");
            } else {
                propertyType = getTypeReference(typeName);
            }
        }
        return propertyType;
    }