try {
                        if (mSlicer != null) {
                            mSlicer.close();
                        }
                    } catch (IOException e) {
                        Log.w(LOG_TAG, "IOException while closing slicer: " + e.getMessage());
                    }

package com.thibaudperso.sonycamera.timelapse.ui.adjustments;

import android.annotation.TargetApi;
import android.app.Activity;
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.Rect;
import android.os.Build;
import android.os.Handler;
import android.os.Looper;
import android.util.AttributeSet;
import android.util.Log;
import android.view.SurfaceHolder;
import android.view.SurfaceView;
import android.view.ViewGroup.LayoutParams;
import com.thibaudperso.sonycamera.timelapse.ui.adjustments.SimpleLiveviewSlicer.Payload;
import java.io.IOException;
import java.util.concurrent.ArrayBlockingQueue;
import java.util.concurrent.BlockingQueue;
import static android.content.ContentValues.TAG;
import static com.thibaudperso.sonycamera.timelapse.Constants.LOG_TAG;

/**
 * A SurfaceView based class to draw liveview frames serially.
 */
public class SimpleStreamSurfaceView extends SurfaceView implements SurfaceHolder.Callback {

    private boolean mWhileFetching;

    private final BlockingQueue<byte[]> mJpegQueue = new ArrayBlockingQueue<>(2);

    private Thread mDrawerThread;

    private Handler mSlicerHandler;

    private int mPreviousWidth = 0;

    private int mPreviousHeight = 0;

    private final Paint mFramePaint;

    private SimpleLiveviewSlicer mSlicer;

    public SimpleStreamSurfaceView(Context context) {
        super(context);
        getHolder().addCallback(this);
        mFramePaint = new Paint();
        mFramePaint.setDither(true);
    }

    public SimpleStreamSurfaceView(Context context, AttributeSet attrs) {
        super(context, attrs);
        getHolder().addCallback(this);
        mFramePaint = new Paint();
        mFramePaint.setDither(true);
    }

    public SimpleStreamSurfaceView(Context context, AttributeSet attrs, int defStyle) {
        super(context, attrs, defStyle);
        getHolder().addCallback(this);
        mFramePaint = new Paint();
        mFramePaint.setDither(true);
    }

    @Override
    public void surfaceChanged(SurfaceHolder holder, int format, int width, int height) {
    }

    @Override
    public void surfaceCreated(SurfaceHolder holder) {
    }

    @Override
    public void surfaceDestroyed(SurfaceHolder holder) {
        mWhileFetching = false;
    }

    /**
     * Start retrieving and drawing liveview frame data by new threads.
     *
     * @return true if the starting is completed successfully, false otherwise.
     * @throws IllegalStateException when Remote API object is not set.
     */
    public boolean start(final String liveviewUrl) {
        if (mWhileFetching) {
            Log.w(TAG, "start() already starting.");
            return false;
        }
        mWhileFetching = true;
        // A thread for retrieving liveview data from server.
        Thread slicerThread = new Thread(new Runnable() {

            @Override
            public void run() {
                mSlicer = null;
                try {
                    // Create Slicer to open the stream and parse it.
                    mSlicer = new SimpleLiveviewSlicer();
                    mSlicer.open(liveviewUrl);
                    Looper.prepare();
                    mSlicerHandler = new Handler();
                    while (mWhileFetching) {
                        final Payload payload = mSlicer.nextPayload();
                        if (payload == null) {
                            // never occurs
                            Log.e(LOG_TAG, "Liveview Payload is null.");
                            continue;
                        }
                        if (mJpegQueue.size() == 2) {
                            mJpegQueue.remove();
                        }
                        mJpegQueue.add(payload.jpegData);
                    }
                } catch (IOException e) {
                    Log.w(LOG_TAG, "IOException while fetching: " + e.getMessage());
                } finally {
                    // Finalize

                    if (mDrawerThread != null) {
                        mDrawerThread.interrupt();
                    }
                    mJpegQueue.clear();
                    mWhileFetching = false;
                }
            }
        });
        slicerThread.start();
        // A thread for drawing liveview frame fetched by above thread.
        mDrawerThread = new Thread() {

            @Override
            public void run() {
                Bitmap frameBitmap = null;
                BitmapFactory.Options factoryOptions = new BitmapFactory.Options();
                factoryOptions.inSampleSize = 1;
                initInBitmap(factoryOptions);
                while (mWhileFetching) {
                    try {
                        byte[] jpegData = mJpegQueue.take();
                        frameBitmap = BitmapFactory.decodeByteArray(jpegData, 0, jpegData.length, factoryOptions);
                    } catch (IllegalArgumentException e) {
                        clearInBitmap(factoryOptions);
                        continue;
                    } catch (InterruptedException e) {
                        Log.i(TAG, "Drawer thread is Interrupted.");
                        e.printStackTrace();
                        break;
                    }
                    setInBitmap(factoryOptions, frameBitmap);
                    drawFrame(frameBitmap);
                }
                if (frameBitmap != null) {
                    frameBitmap.recycle();
                }
                mWhileFetching = false;
            }
        };
        mDrawerThread.start();
        return true;
    }

    /**
     * Request to stop retrieving and drawing liveview data.
     */
    public void stop() {
        mWhileFetching = false;
        if (mSlicer != null && mSlicerHandler != null) {
            mSlicerHandler.post(new Runnable() {

                @Override
                public void run() {
                    try {
                        mSlicer.close();
                    } catch (IOException e) {
                        e.printStackTrace();
                    }
                }
            });
            mSlicerHandler = null;
        }
    }

    /**
     * Check to see whether start() is already called.
     *
     * @return true if start() is already called, false otherwise.
     */
    public boolean isStarted() {
        return mWhileFetching;
    }

    @TargetApi(Build.VERSION_CODES.HONEYCOMB)
    private void initInBitmap(BitmapFactory.Options options) {
        options.inBitmap = null;
        options.inMutable = true;
    }

    @TargetApi(Build.VERSION_CODES.HONEYCOMB)
    private void clearInBitmap(BitmapFactory.Options options) {
        if (options.inBitmap != null) {
            options.inBitmap.recycle();
            options.inBitmap = null;
        }
    }

    @TargetApi(Build.VERSION_CODES.HONEYCOMB)
    private void setInBitmap(BitmapFactory.Options options, Bitmap bitmap) {
        options.inBitmap = bitmap;
    }

    // Draw frame bitmap onto a canvas.
    private void drawFrame(Bitmap frame) {
        if (frame.getWidth() != mPreviousWidth || frame.getHeight() != mPreviousHeight) {
            onDetectedFrameSizeChanged(frame.getWidth(), frame.getHeight());
            return;
        }
        Canvas canvas = getHolder().lockCanvas();
        if (canvas == null) {
            return;
        }
        int w = frame.getWidth();
        int h = frame.getHeight();
        Rect src = new Rect(0, 0, w, h);
        float by = Math.min((float) getWidth() / w, (float) getHeight() / h);
        int offsetX = (getWidth() - (int) (w * by)) / 2;
        int offsetY = (getHeight() - (int) (h * by)) / 2;
        Rect dst = new Rect(offsetX, offsetY, getWidth() - offsetX, getHeight() - offsetY);
        canvas.drawBitmap(frame, src, dst, mFramePaint);
        getHolder().unlockCanvasAndPost(canvas);
    }

    // Called when the width or height of liveview frame image is changed.
    private void onDetectedFrameSizeChanged(final int width, final int height) {
        mPreviousWidth = width;
        mPreviousHeight = height;
        drawBlackFrame();
        drawBlackFrame();
        // delete triple buffers
        drawBlackFrame();
        ((Activity) getContext()).runOnUiThread(new Runnable() {

            @Override
            public void run() {
                // Get the SurfaceView layout parameters
                LayoutParams lp = getLayoutParams();
                lp.width = getWidth();
                lp.height = (int) (((float) height / (float) width) * (float) getWidth());
                setLayoutParams(lp);
            }
        });
    }

    // Draw black screen.
    private void drawBlackFrame() {
        Canvas canvas = getHolder().lockCanvas();
        if (canvas == null) {
            return;
        }
        Paint paint = new Paint();
        paint.setColor(Color.BLACK);
        paint.setStyle(Paint.Style.FILL);
        canvas.drawRect(new Rect(0, 0, getWidth(), getHeight()), paint);
        getHolder().unlockCanvasAndPost(canvas);
    }
}


package cn.ittiger.video.bean;

import cn.ittiger.database.annotation.PrimaryKey;
import cn.ittiger.video.util.DBManager;

/**
 * @author laohu
 * @site http://ittiger.cn
 */
public class IFengInfo {

    @PrimaryKey
    private int tabId;

    private String itemId;

    public IFengInfo() {
    }

    public IFengInfo(int tabId, String itemId) {
        this.tabId = tabId;
        this.itemId = itemId;
    }

    public int getTabId() {
        return tabId;
    }

{
        this.tabId = tabId;
    }

    public String getItemId() {
        return itemId;
    }

    public void setItemId(String itemId) {
        this.itemId = itemId;
    }

    public static void save(IFengInfo iFengInfo) {
        boolean isExist = DBManager.getInstance().getSQLiteDB().queryIfExist(IFengInfo.class, String.valueOf(iFengInfo.getTabId()));
        if (isExist) {
            DBManager.getInstance().getSQLiteDB().update(iFengInfo);
        } else {
            DBManager.getInstance().getSQLiteDB().save(iFengInfo);
        }
    }
}


package cn.ittiger.video.bean;

import cn.ittiger.database.annotation.PrimaryKey;
import cn.ittiger.video.util.DBManager;

/**
 * @author laohu
 * @site http://ittiger.cn
 */
public class IFengInfo {

    @PrimaryKey
    private int tabId;

    private String itemId;

    public IFengInfo() {
    }

    public IFengInfo(int tabId, String itemId) {
        this.tabId = tabId;
        this.itemId = itemId;
    }

    public int getTabId() {
        return tabId;
    }

    public void setTabId(int tabId)

    public String getItemId() {
        return itemId;
    }

    public void setItemId(String itemId) {
        this.itemId = itemId;
    }

    public static void save(IFengInfo iFengInfo) {
        boolean isExist = DBManager.getInstance().getSQLiteDB().queryIfExist(IFengInfo.class, String.valueOf(iFengInfo.getTabId()));
        if (isExist) {
            DBManager.getInstance().getSQLiteDB().update(iFengInfo);
        } else {
            DBManager.getInstance().getSQLiteDB().save(iFengInfo);
        }
    }
}


package cn.ittiger.video.bean;

import cn.ittiger.database.annotation.PrimaryKey;
import cn.ittiger.video.util.DBManager;

/**
 * @author laohu
 * @site http://ittiger.cn
 */
public class IFengInfo {

    @PrimaryKey
    private int tabId;

    private String itemId;

    public IFengInfo() {
    }

    public IFengInfo(int tabId, String itemId) {
        this.tabId = tabId;
        this.itemId = itemId;
    }

    public int getTabId() {
        return tabId;
    }

    public void setTabId(int tabId) {
        this.tabId = tabId;
    }

    public String getItemId() {

    }

    public void setItemId(String itemId) {
        this.itemId = itemId;
    }

    public static void save(IFengInfo iFengInfo) {
        boolean isExist = DBManager.getInstance().getSQLiteDB().queryIfExist(IFengInfo.class, String.valueOf(iFengInfo.getTabId()));
        if (isExist) {
            DBManager.getInstance().getSQLiteDB().update(iFengInfo);
        } else {
            DBManager.getInstance().getSQLiteDB().save(iFengInfo);
        }
    }
}


/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package org.drools.workshop.model;

import javax.xml.bind.annotation.XmlRootElement;

/**
 * @author salaboy
 */
@XmlRootElement
public class Item {

    private String name;

    private int price;

    public Item(String name, int price) {
        this.name = name;
        this.price = price;
    }

    public Item() {
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getPrice() {
        return price;
    }

    public void setPrice(int price) {
        this.price = price;
    }

{
        return "Item{" + "name=" + name + ", price=" + price + '}';
    }

    @Override
    public int hashCode() {
        int hash = 5;
        hash = 73 * hash + (this.name != null ? this.name.hashCode() : 0);
        hash = 73 * hash + this.price;
        return hash;
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final Item other = (Item) obj;
        if (this.price != other.price) {
            return false;
        }
        if ((this.name == null) ? (other.name != null) : !this.name.equals(other.name)) {
            return false;
        }
        return true;
    }
}


/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package org.drools.workshop.model;

import javax.xml.bind.annotation.XmlRootElement;

/**
 * @author salaboy
 */
@XmlRootElement
public class Item {

    private String name;

    private int price;

    public Item(String name, int price) {
        this.name = name;
        this.price = price;
    }

    public Item() {
    }

    public String getName() {
        return name;
    }

    public void setName(String name)

    public int getPrice() {
        return price;
    }

    public void setPrice(int price) {
        this.price = price;
    }

    @Override
    public String toString() {
        return "Item{" + "name=" + name + ", price=" + price + '}';
    }

    @Override
    public int hashCode() {
        int hash = 5;
        hash = 73 * hash + (this.name != null ? this.name.hashCode() : 0);
        hash = 73 * hash + this.price;
        return hash;
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final Item other = (Item) obj;
        if (this.price != other.price) {
            return false;
        }
        if ((this.name == null) ? (other.name != null) : !this.name.equals(other.name)) {
            return false;
        }
        return true;
    }
}


/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package org.drools.workshop.model;

import javax.xml.bind.annotation.XmlRootElement;

/**
 * @author salaboy
 */
@XmlRootElement
public class Item {

    private String name;

    private int price;

    public Item(String name, int price) {
        this.name = name;
        this.price = price;
    }

    public Item() {
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        thi

    }

    public int getPrice() {
        return price;
    }

    public void setPrice(int price) {
        this.price = price;
    }

    @Override
    public String toString() {
        return "Item{" + "name=" + name + ", price=" + price + '}';
    }

    @Override
    public int hashCode() {
        int hash = 5;
        hash = 73 * hash + (this.name != null ? this.name.hashCode() : 0);
        hash = 73 * hash + this.price;
        return hash;
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final Item other = (Item) obj;
        if (this.price != other.price) {
            return false;
        }
        if ((this.name == null) ? (other.name != null) : !this.name.equals(other.name)) {
            return false;
        }
        return true;
    }
}


package io.github.syst3ms.skriptparser.log;

import org.jetbrains.annotations.Nullable;
import java.util.List;
import java.util.Optional;

/**
 * An entry in Skript's log.
 */
public class LogEntry {

    private final LogType type;

    private final String message;

    private final int line;

    private final List<ErrorContext> errorContext;

    private final ErrorType errorType;

    private final String tip;

    public LogEntry(String message, LogType verbosity, int line, List<ErrorContext> errorContext, @Nullable ErrorType errorType) {
        this(message, verbosity, line, errorContext, errorType, null);
    }

    public LogEntry(String message, LogType verbosity, int line, List<ErrorContext> errorContext, @Nullable ErrorType errorType, @Nullable String tip) {
        this.type = verbosity;
        this.message = message;
        this.line = line;
        this.errorContext = errorContext;
        this.errorType = errorType;
        this.tip = tip;
    }

    public String getMessage() {
        return message;
    }

    public LogType getType() {
        return type;
    }

    List<ErrorContext> getErrorContext() {
        return errorContext;
    }

{
        return errorType;
    }

    public Optional<String> getTip() {
        return Optional.ofNullable(tip);
    }

    public int getLine() {
        return line;
    }
}


{
        return Optional.ofNullable(tip);
    }

package io.github.syst3ms.skriptparser.log;

import org.jetbrains.annotations.Nullable;
import java.util.List;
import java.util.Optional;

/**
 * An entry in Skript's log.
 */
public class LogEntry {

    private final LogType type;

    private final String message;

    private final int line;

    private final List<ErrorContext> errorContext;

    private final ErrorType errorType;

    private final String tip;

    public LogEntry(String message, LogType verbosity, int line, List<ErrorContext> errorContext, @Nullable ErrorType errorType) {
        this(message, verbosity, line, errorContext, errorType, null);
    }

    public LogEntry(String message, LogType verbosity, int line, List<ErrorContext> errorContext, @Nullable ErrorType errorType, @Nullable String tip) {
        this.type = verbosity;
        this.message = message;
        this.line = line;
        this.errorContext = errorContext;
        this.errorType = errorType;
        this.tip = tip;
    }

    public String getMessage() {
        return message;
    }

    public LogType getType() {
        return type;
    }

    List<ErrorContext> getErrorContext() {
        return errorContext;
    }

    public ErrorType getErrorType() {
        return errorType;
    }

    public Optional<String> getTip()

    public int getLine() {
        return line;
    }
}


package io.github.syst3ms.skriptparser.log;

import org.jetbrains.annotations.Nullable;
import java.util.List;
import java.util.Optional;

/**
 * An entry in Skript's log.
 */
public class LogEntry {

    private final LogType type;

    private final String message;

    private final int line;

    private final List<ErrorContext> errorContext;

    private final ErrorType errorType;

    private final String tip;

    public LogEntry(String message, LogType verbosity, int line, List<ErrorContext> errorContext, @Nullable ErrorType errorType) {
        this(message, verbosity, line, errorContext, errorType, null);
    }

    public LogEntry(String message, LogType verbosity, int line, List<ErrorContext> errorContext, @Nullable ErrorType errorType, @Nullable String tip) {
        this.type = verbosity;
        this.message = message;
        this.line = line;
        this.errorContext = errorContext;
        this.errorType = errorType;
        this.tip = tip;
    }

    public String getMessage() {
        return message;
    }

    public LogType getType() {
        return type;
    }

    List<ErrorContext> getErrorContext() {
        return errorConte

    }

    public ErrorType getErrorType() {
        return errorType;
    }

    public Optional<String> getTip() {
        return Optional.ofNullable(tip);
    }

    public int getLine() {
        return line;
    }
}


package com.android.settings.accessibility;

import android.content.Intent;
import android.content.pm.ResolveInfo;
import android.os.Bundle;
import android.support.v7.preference.Preference;
import android.support.v7.preference.PreferenceScreen;
import android.view.View;
import com.android.settings.R;
import com.android.settings.SettingsActivity;
import com.android.settings.SettingsPreferenceFragment;
import com.android.settings.widget.SwitchBar;
import com.android.settings.widget.ToggleSwitch;

public abstract class ToggleFeaturePreferenceFragment extends SettingsPreferenceFragment {

    protected SwitchBar mSwitchBar;

    protected ToggleSwitch mToggleSwitch;

    protected String mPreferenceKey;

    protected CharSequence mSettingsTitle;

    protected Intent mSettingsIntent;

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        final int resId = getPreferenceScreenResId();
        if (resId <= 0) {
            PreferenceScreen preferenceScreen = getPreferenceManager().createPreferenceScreen(getActivity());
            setPreferenceScreen(preferenceScreen);
        }
    }

    @Override
    public void onViewCreated(View view, Bundle savedInstanceState) {
        super.onViewCreated(view, savedInstanceState);
        SettingsActivity activity = (SettingsActivity) getActivity();
        mSwitchBar = activity.getSwitchBar();
        updateSwitchBarText(mSwitchBar);
        mToggleSwitch = mSwitchBar.getSwitch();
        onProcessArguments(getArguments());
        // Show the "Settings" menu as if it were a preference screen
        if (mSettingsTitle != null && mSettingsIntent != null) {
            PreferenceScreen preferenceScreen = getPreferenceScreen();
            Preference settingsPref = new Preference(preferenceScreen.getContext());
            settingsPref.setTitle(mSettingsTitle);
            settingsPref.setIconSpaceReserved(true);
            settingsPref.setIntent(mSettingsIntent);
            preferenceScreen.addPreference(settingsPref);
        }
    }

    @Override
    public void onActivityCreated(Bundle savedInstanceState) {
        super.onActivityCreated(savedInstanceState);
        installActionBarToggleSwitch();
    }

    @Override
    public void onDestroyView() {
        super.onDestroyView();
        removeActionBarToggleSwitch();
    }

    protected void updateSwitchBarText(SwitchBar switchBar) {
        // Implement this to provide meaningful text in switch bar
        switchBar.setSwitchBarText(R.string.accessibility_service_master_switch_title, R.string.accessibility_service_master_switch_title);
    }

    protected abstract void onPreferenceToggled(String preferenceKey, boolean enabled);

    protected void onInstallSwitchBarToggleSwitch() {
        // Implement this to set a checked listener.
    }

    protected void onRemoveSwitchBarToggleSwitch() {
        // Implement this to reset a checked listener.
    }

    private void installActionBarToggleSwitch() {
        mSwitchBar.show();
        onInstallSwitchBarToggleSwitch();
    }

{
        mToggleSwitch.setOnBeforeCheckedChangeListener(null);
        onRemoveSwitchBarToggleSwitch();
        mSwitchBar.hide();
    }

    public void setTitle(String title) {
        getActivity().setTitle(title);
    }

    protected void onProcessArguments(Bundle arguments) {
        mPreferenceKey = arguments.getString(AccessibilitySettings.EXTRA_PREFERENCE_KEY);
        if (arguments.containsKey(AccessibilitySettings.EXTRA_CHECKED)) {
            final boolean enabled = arguments.getBoolean(AccessibilitySettings.EXTRA_CHECKED);
            mSwitchBar.setCheckedInternal(enabled);
        }
        if (arguments.containsKey(AccessibilitySettings.EXTRA_RESOLVE_INFO)) {
            ResolveInfo info = arguments.getParcelable(AccessibilitySettings.EXTRA_RESOLVE_INFO);
            getActivity().setTitle(info.loadLabel(getPackageManager()).toString());
        } else if (arguments.containsKey(AccessibilitySettings.EXTRA_TITLE)) {
            setTitle(arguments.getString(AccessibilitySettings.EXTRA_TITLE));
        }
        if (arguments.containsKey(AccessibilitySettings.EXTRA_SUMMARY_RES)) {
            final int summary = arguments.getInt(AccessibilitySettings.EXTRA_SUMMARY_RES);
            mFooterPreferenceMixin.createFooterPreference().setTitle(summary);
        } else if (arguments.containsKey(AccessibilitySettings.EXTRA_SUMMARY)) {
            final CharSequence summary = arguments.getCharSequence(AccessibilitySettings.EXTRA_SUMMARY);
            mFooterPreferenceMixin.createFooterPreference().setTitle(summary);
        }
    }
}


{
        // Implement this to reset a checked listener.
    }

package com.android.settings.accessibility;

import android.content.Intent;
import android.content.pm.ResolveInfo;
import android.os.Bundle;
import android.support.v7.preference.Preference;
import android.support.v7.preference.PreferenceScreen;
import android.view.View;
import com.android.settings.R;
import com.android.settings.SettingsActivity;
import com.android.settings.SettingsPreferenceFragment;
import com.android.settings.widget.SwitchBar;
import com.android.settings.widget.ToggleSwitch;

public abstract class ToggleFeaturePreferenceFragment extends SettingsPreferenceFragment {

    protected SwitchBar mSwitchBar;

    protected ToggleSwitch mToggleSwitch;

    protected String mPreferenceKey;

    protected CharSequence mSettingsTitle;

    protected Intent mSettingsIntent;

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        final int resId = getPreferenceScreenResId();
        if (resId <= 0) {
            PreferenceScreen preferenceScreen = getPreferenceManager().createPreferenceScreen(getActivity());
            setPreferenceScreen(preferenceScreen);
        }
    }

    @Override
    public void onViewCreated(View view, Bundle savedInstanceState) {
        super.onViewCreated(view, savedInstanceState);
        SettingsActivity activity = (SettingsActivity) getActivity();
        mSwitchBar = activity.getSwitchBar();
        updateSwitchBarText(mSwitchBar);
        mToggleSwitch = mSwitchBar.getSwitch();
        onProcessArguments(getArguments());
        // Show the "Settings" menu as if it were a preference screen
        if (mSettingsTitle != null && mSettingsIntent != null) {
            PreferenceScreen preferenceScreen = getPreferenceScreen();
            Preference settingsPref = new Preference(preferenceScreen.getContext());
            settingsPref.setTitle(mSettingsTitle);
            settingsPref.setIconSpaceReserved(true);
            settingsPref.setIntent(mSettingsIntent);
            preferenceScreen.addPreference(settingsPref);
        }
    }

    @Override
    public void onActivityCreated(Bundle savedInstanceState) {
        super.onActivityCreated(savedInstanceState);
        installActionBarToggleSwitch();
    }

    @Override
    public void onDestroyView() {
        super.onDestroyView();
        removeActionBarToggleSwitch();
    }

    protected void updateSwitchBarText(SwitchBar switchBar) {
        // Implement this to provide meaningful text in switch bar
        switchBar.setSwitchBarText(R.string.accessibility_service_master_switch_title, R.string.accessibility_service_master_switch_title);
    }

    protected abstract void onPreferenceToggled(String preferenceKey, boolean enabled);

    protected void onInstallSwitchBarToggleSwitch() {
        // Implement this to set a checked listener.
    }

    protected void onRemoveSwitchBarToggleSwitch()

    private void installActionBarToggleSwitch() {
        mSwitchBar.show();
        onInstallSwitchBarToggleSwitch();
    }

    private void removeActionBarToggleSwitch() {
        mToggleSwitch.setOnBeforeCheckedChangeListener(null);
        onRemoveSwitchBarToggleSwitch();
        mSwitchBar.hide();
    }

    public void setTitle(String title) {
        getActivity().setTitle(title);
    }

    protected void onProcessArguments(Bundle arguments) {
        mPreferenceKey = arguments.getString(AccessibilitySettings.EXTRA_PREFERENCE_KEY);
        if (arguments.containsKey(AccessibilitySettings.EXTRA_CHECKED)) {
            final boolean enabled = arguments.getBoolean(AccessibilitySettings.EXTRA_CHECKED);
            mSwitchBar.setCheckedInternal(enabled);
        }
        if (arguments.containsKey(AccessibilitySettings.EXTRA_RESOLVE_INFO)) {
            ResolveInfo info = arguments.getParcelable(AccessibilitySettings.EXTRA_RESOLVE_INFO);
            getActivity().setTitle(info.loadLabel(getPackageManager()).toString());
        } else if (arguments.containsKey(AccessibilitySettings.EXTRA_TITLE)) {
            setTitle(arguments.getString(AccessibilitySettings.EXTRA_TITLE));
        }
        if (arguments.containsKey(AccessibilitySettings.EXTRA_SUMMARY_RES)) {
            final int summary = arguments.getInt(AccessibilitySettings.EXTRA_SUMMARY_RES);
            mFooterPreferenceMixin.createFooterPreference().setTitle(summary);
        } else if (arguments.containsKey(AccessibilitySettings.EXTRA_SUMMARY)) {
            final CharSequence summary = arguments.getCharSequence(AccessibilitySettings.EXTRA_SUMMARY);
            mFooterPreferenceMixin.createFooterPreference().setTitle(summary);
        }
    }
}


package com.android.settings.accessibility;

import android.content.Intent;
import android.content.pm.ResolveInfo;
import android.os.Bundle;
import android.support.v7.preference.Preference;
import android.support.v7.preference.PreferenceScreen;
import android.view.View;
import com.android.settings.R;
import com.android.settings.SettingsActivity;
import com.android.settings.SettingsPreferenceFragment;
import com.android.settings.widget.SwitchBar;
import com.android.settings.widget.ToggleSwitch;

public abstract class ToggleFeaturePreferenceFragment extends SettingsPreferenceFragment {

    protected SwitchBar mSwitchBar;

    protected ToggleSwitch mToggleSwitch;

    protected String mPreferenceKey;

    protected CharSequence mSettingsTitle;

    protected Intent mSettingsIntent;

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        final int resId = getPreferenceScreenResId();
        if (resId <= 0) {
            PreferenceScreen preferenceScreen = getPreferenceManager().createPreferenceScreen(getActivity());
            setPreferenceScreen(preferenceScreen);
        }
    }

    @Override
    public void onViewCreated(View view, Bundle savedInstanceState) {
        super.onViewCreated(view, savedInstanceState);
        SettingsActivity activity = (SettingsActivity) getActivity();
        mSwitchBar = activity.getSwitchBar();
        updateSwitchBarText(mSwitchBar);
        mToggleSwitch = mSwitchBar.getSwitch();
        onProcessArguments(getArguments());
        // Show the "Settings" menu as if it were a preference screen
        if (mSettingsTitle != null && mSettingsIntent != null) {
            PreferenceScreen preferenceScreen = getPreferenceScreen();
            Preference settingsPref = new Preference(preferenceScreen.getContext());
            settingsPref.setTitle(mSettingsTitle);
            settingsPref.setIconSpaceReserved(true);
            settingsPref.setIntent(mSettingsIntent);
            preferenceScreen.addPreference(settingsPref);
        }
    }

    @Override
    public void onActivityCreated(Bundle savedInstanceState) {
        super.onActivityCreated(savedInstanceState);
        installActionBarToggleSwitch();
    }

    @Override
    public void onDestroyView() {
        super.onDestroyView();
        removeActionBarToggleSwitch();
    }

    protected void updateSwitchBarText(SwitchBar switchBar) {
        // Implement this to provide meaningful text in switch bar
        switchBar.setSwitchBarText(R.string.accessibility_service_master_switch_title, R.string.accessibility_service_master_switch_title);
    }

    protected abstract void onPreferenceToggled(String preferenceKey, boolean enabled);

    protected void onInstallSwitchBarToggleSwitch() {
        // Implement this to set a checked listener.
    }

    protected void onRemoveSwitchBarToggleSwitch() {
        // Implement this to reset a checked listener.
    }

    private void installActionBarToggleSwitch() {
        mSwitchBar.show();
        onInstallSwitchBarToggleSwitch();
    }

    private void removeActionBarToggleSwitch() {
        mToggleSwitch.setOnBeforeCheckedChangeListener(null);
        onRemoveSwitchBarToggleSwitch();
        mSwitchBar.hide();
    }

    public void setTitle(String title) {
        getActivity().setTitle(title);
    }

    protected void onProcessArguments(Bundle arguments) {
        mPreferenceKey = arguments.getString(Acc

        if (arguments.containsKey(AccessibilitySettings.EXTRA_CHECKED)) {
            final boolean enabled = arguments.getBoolean(AccessibilitySettings.EXTRA_CHECKED);
            mSwitchBar.setCheckedInternal(enabled);
        }
        if (arguments.containsKey(AccessibilitySettings.EXTRA_RESOLVE_INFO)) {
            ResolveInfo info = arguments.getParcelable(AccessibilitySettings.EXTRA_RESOLVE_INFO);
            getActivity().setTitle(info.loadLabel(getPackageManager()).toString());
        } else if (arguments.containsKey(AccessibilitySettings.EXTRA_TITLE)) {
            setTitle(arguments.getString(AccessibilitySettings.EXTRA_TITLE));
        }
        if (arguments.containsKey(AccessibilitySettings.EXTRA_SUMMARY_RES)) {
            final int summary = arguments.getInt(AccessibilitySettings.EXTRA_SUMMARY_RES);
            mFooterPreferenceMixin.createFooterPreference().setTitle(summary);
        } else if (arguments.containsKey(AccessibilitySettings.EXTRA_SUMMARY)) {
            final CharSequence summary = arguments.getCharSequence(AccessibilitySettings.EXTRA_SUMMARY);
            mFooterPreferenceMixin.createFooterPreference().setTitle(summary);
        }
    }
}


package com.qcadoo.mes.technologies.imports.productToProductGroupTechnology;

import static com.qcadoo.mes.basic.imports.dtos.CellBinder.required;
import javax.annotation.PostConstruct;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import com.qcadoo.mes.basic.imports.dtos.CellBinderRegistry;
import com.qcadoo.mes.basic.imports.helpers.CellParser;
import com.qcadoo.mes.technologies.constants.ProductToProductGroupFields;

@Component
public class ProductToProductGroupTechnologyCellBinderRegistry {

    private CellBinderRegistry cellBinderRegistry = new CellBinderRegistry();

    @Autowired
    private CellParser productCellParser;

{
        cellBinderRegistry.setCellBinder(required(ProductToProductGroupFields.FINAL_PRODUCT, productCellParser));
        cellBinderRegistry.setCellBinder(required(ProductToProductGroupFields.PRODUCT_FAMILY, productCellParser));
        cellBinderRegistry.setCellBinder(required(ProductToProductGroupFields.ORDER_PRODUCT, productCellParser));
    }

    public CellBinderRegistry getCellBinderRegistry() {
        return cellBinderRegistry;
    }
}


{
        return cellBinderRegistry;
    }

package com.qcadoo.mes.technologies.imports.productToProductGroupTechnology;

import static com.qcadoo.mes.basic.imports.dtos.CellBinder.required;
import javax.annotation.PostConstruct;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import com.qcadoo.mes.basic.imports.dtos.CellBinderRegistry;
import com.qcadoo.mes.basic.imports.helpers.CellParser;
import com.qcadoo.mes.technologies.constants.ProductToProductGroupFields;

@Component
public class ProductToProductGroupTechnologyCellBinderRegistry {

    private CellBinderRegistry cellBinderRegistry = new CellBinderRegistry();

    @Autowired
    private CellParser productCellParser;

    @PostConstruct
    private void init() {
        cellBinderRegistry.setCellBinder(required(ProductToProductGroupFields.FINAL_PRODUCT, productCellParser));
        cellBinderRegistry.setCellBinder(required(ProductToProductGroupFields.PRODUCT_FAMILY, productCellParser));
        cellBinderRegistry.setCellBinder(required(ProductToProductGroupFields.ORDER_PRODUCT, productCellParser));
    }

    public CellBinderRegistry getCellBinderRegistry()


package com.qcadoo.mes.technologies.imports.productToProductGroupTechnology;

import static com.qcadoo.mes.basic.imports.dtos.CellBinder.required;
import javax.annotation.PostConstruct;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import com.qcadoo.mes.basic.imports.dtos.CellBinderRegistry;
import com.qcadoo.mes.basic.imports.helpers.CellParser;
import com.qcadoo.mes.technologies.constants.ProductToProductGroupFields;

@Component
public class ProductToProductGroupTechnologyCellBinderRegistry {

    private CellBinderRegistry cellBinderRegistry = new CellBinderRegistry();

    @Autowired
    private CellParser productCellParser;

    @PostConstruct
    private void init() {
        cellBinderRegistry.setCellBinder(required(ProductToProductGroupFields.FINAL_PRODUCT, productCellParser));
        cellBinderRegistry.setCellBinder(required(ProductToProductGroupFields.PRODUCT_FAMILY, productCellParser));
        cell

    }

    public CellBinderRegistry getCellBinderRegistry() {
        return cellBinderRegistry;
    }
}


void init(List<List<String>> tokenizedValues, String[] ids)

package com.microsoft.recognizers.text.matcher;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import java.util.stream.StreamSupport;

public class StringMatcher {

    private final ITokenizer tokenizer;

    private final IMatcher<String> matcher;

    public StringMatcher(MatchStrategy strategy, ITokenizer tokenizer) {
        this.tokenizer = tokenizer != null ? tokenizer : new SimpleTokenizer();
        switch(strategy) {
            case AcAutomaton:
                matcher = new AcAutomation<>();
                break;
            case TrieTree:
                matcher = new TrieTree<>();
                break;
            default:
                throw new IllegalArgumentException();
        }
    }

    public StringMatcher(MatchStrategy strategy) {
        this(strategy, null);
    }

    public StringMatcher(ITokenizer tokenizer) {
        this(MatchStrategy.TrieTree, tokenizer);
    }

    public StringMatcher() {
        this(MatchStrategy.TrieTree, null);
    }

    public void init(Iterable<String> values) {
        init(values, StreamSupport.stream(values.spliterator(), false).toArray(size -> new String[size]));
    }

    void init(Iterable<String> values, String[] ids) {
        List<List<String>> tokenizedValues = getTokenizedText(values);
        init(tokenizedValues, ids);
    }

    void init(Map<String, List<String>> valuesMap) {
        ArrayList<String> values = new ArrayList<>();
        ArrayList<String> ids = new ArrayList<>();
        for (Map.Entry<String, List<String>> item : valuesMap.entrySet()) {
            String id = item.getKey();
            for (String value : item.getValue()) {
                values.add(value);
                ids.add(id);
            }
        }
        List<List<String>> tokenizedValues = getTokenizedText(values);
        init(tokenizedValues, ids.toArray(new String[0]));
    }

{
        matcher.init(tokenizedValues, ids);
    }

    private List<List<String>> getTokenizedText(Iterable<String> values) {
        List<List<String>> result = new ArrayList<>();
        for (String value : values) {
            result.add(tokenizer.tokenize(value).stream().map(i -> i.text).collect(Collectors.toCollection(ArrayList::new)));
        }
        return result;
    }

    public Iterable<MatchResult<String>> find(Iterable<String> tokenizedQuery) {
        return matcher.find(tokenizedQuery);
    }

    public Iterable<MatchResult<String>> find(String queryText) {
        List<Token> queryTokens = tokenizer.tokenize(queryText);
        Iterable<String> tokenizedQueryText = queryTokens.stream().map(t -> t.text).collect(Collectors.toCollection(ArrayList::new));
        List<MatchResult<String>> result = new ArrayList<>();
        for (MatchResult<String> r : find(tokenizedQueryText)) {
            Token startToken = queryTokens.get(r.getStart());
            Token endToken = queryTokens.get(r.getStart() + r.getLength() - 1);
            int start = startToken.getStart();
            int length = endToken.getEnd() - startToken.getStart();
            String rtext = queryText.substring(start, start + length);
            result.add(new MatchResult<String>(start, length, r.getCanonicalValues(), rtext));
        }
        return result;
    }
}


{
        init(values, StreamSupport.stream(values.spliterator(), false).toArray(size -> new String[size]));
    }

package com.microsoft.recognizers.text.matcher;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import java.util.stream.StreamSupport;

public class StringMatcher {

    private final ITokenizer tokenizer;

    private final IMatcher<String> matcher;

    public StringMatcher(MatchStrategy strategy, ITokenizer tokenizer) {
        this.tokenizer = tokenizer != null ? tokenizer : new SimpleTokenizer();
        switch(strategy) {
            case AcAutomaton:
                matcher = new AcAutomation<>();
                break;
            case TrieTree:
                matcher = new TrieTree<>();
                break;
            default:
                throw new IllegalArgumentException();
        }
    }

    public StringMatcher(MatchStrategy strategy) {
        this(strategy, null);
    }

    public StringMatcher(ITokenizer tokenizer) {
        this(MatchStrategy.TrieTree, tokenizer);
    }

    public StringMatcher() {
        this(MatchStrategy.TrieTree, null);
    }

    public void init(Iterable<String> values)

    void init(Iterable<String> values, String[] ids) {
        List<List<String>> tokenizedValues = getTokenizedText(values);
        init(tokenizedValues, ids);
    }

    void init(Map<String, List<String>> valuesMap) {
        ArrayList<String> values = new ArrayList<>();
        ArrayList<String> ids = new ArrayList<>();
        for (Map.Entry<String, List<String>> item : valuesMap.entrySet()) {
            String id = item.getKey();
            for (String value : item.getValue()) {
                values.add(value);
                ids.add(id);
            }
        }
        List<List<String>> tokenizedValues = getTokenizedText(values);
        init(tokenizedValues, ids.toArray(new String[0]));
    }

    void init(List<List<String>> tokenizedValues, String[] ids) {
        matcher.init(tokenizedValues, ids);
    }

    private List<List<String>> getTokenizedText(Iterable<String> values) {
        List<List<String>> result = new ArrayList<>();
        for (String value : values) {
            result.add(tokenizer.tokenize(value).stream().map(i -> i.text).collect(Collectors.toCollection(ArrayList::new)));
        }
        return result;
    }

    public Iterable<MatchResult<String>> find(Iterable<String> tokenizedQuery) {
        return matcher.find(tokenizedQuery);
    }

    public Iterable<MatchResult<String>> find(String queryText) {
        List<Token> queryTokens = tokenizer.tokenize(queryText);
        Iterable<String> tokenizedQueryText = queryTokens.stream().map(t -> t.text).collect(Collectors.toCollection(ArrayList::new));
        List<MatchResult<String>> result = new ArrayList<>();
        for (MatchResult<String> r : find(tokenizedQueryText)) {
            Token startToken = queryTokens.get(r.getStart());
            Token endToken = queryTokens.get(r.getStart() + r.getLength() - 1);
            int start = startToken.getStart();
            int length = endToken.getEnd() - startToken.getStart();
            String rtext = queryText.substring(start, start + length);
            result.add(new MatchResult<String>(start, length, r.getCanonicalValues(), rtext));
        }
        return result;
    }
}


package com.microsoft.recognizers.text.matcher;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import java.util.stream.StreamSupport;

public class StringMatcher {

    private final ITokenizer tokenizer;

    private final IMatcher<String> matcher;

    public StringMatcher(MatchStrategy strategy, ITokenizer tokenizer) {
        this.tokenizer = tokenizer != null ? tokenizer : new SimpleTokenizer();
        switch(strategy) {
            case AcAutomaton:
                matcher = new AcAutomation<>();
                break;
            case TrieTree:
                matcher = new TrieTree<>();
                break;
            default:
                throw new IllegalArgumentException();
        }
    }

    public StringMatcher(MatchStrategy strategy) {
        this(strategy, null);
    }

    public StringMatcher(ITokenizer tokenizer) {
        this(MatchStrategy.TrieTree, tokenizer);
    }

    public StringMatcher() {
        this(MatchStrategy.TrieTree, null);
    }

    public void init(Iterable<String> values) {
        init(values, StreamSupport.stream(values.spliterator(), false).toArray(size -> new String[size]));
    }

    void init(Iterable<String> values, String[] ids) {
        List<List<String>> tokenizedValues = getTokenizedText(values);
        init(tokenizedValues, ids);
    }

    void init(Map<String, List<String>> valuesMap) {
        ArrayList<String> values = new ArrayList<>();
        ArrayList<String> ids = new ArrayList<>();
        for (Map.Entry<String, List<String>> item : valuesMap.entrySet()) {
            String id = item.getKey();
            for (String value : item.getValue()) {
                values.add(value);
                ids.add(id);
            }
        }
        List<List<String>> tokenizedValues = getTokenizedText(values);
        init(tokeni

    }

    void init(List<List<String>> tokenizedValues, String[] ids) {
        matcher.init(tokenizedValues, ids);
    }

    private List<List<String>> getTokenizedText(Iterable<String> values) {
        List<List<String>> result = new ArrayList<>();
        for (String value : values) {
            result.add(tokenizer.tokenize(value).stream().map(i -> i.text).collect(Collectors.toCollection(ArrayList::new)));
        }
        return result;
    }

    public Iterable<MatchResult<String>> find(Iterable<String> tokenizedQuery) {
        return matcher.find(tokenizedQuery);
    }

    public Iterable<MatchResult<String>> find(String queryText) {
        List<Token> queryTokens = tokenizer.tokenize(queryText);
        Iterable<String> tokenizedQueryText = queryTokens.stream().map(t -> t.text).collect(Collectors.toCollection(ArrayList::new));
        List<MatchResult<String>> result = new ArrayList<>();
        for (MatchResult<String> r : find(tokenizedQueryText)) {
            Token startToken = queryTokens.get(r.getStart());
            Token endToken = queryTokens.get(r.getStart() + r.getLength() - 1);
            int start = startToken.getStart();
            int length = endToken.getEnd() - startToken.getStart();
            String rtext = queryText.substring(start, start + length);
            result.add(new MatchResult<String>(start, length, r.getCanonicalValues(), rtext));
        }
        return result;
    }
}


switch(strategy) {
            case AcAutomaton:
                matcher = new AcAutomation<>();
                break;
            case TrieTree:
                matcher = new TrieTree<>();
                break;
            default:
                throw new IllegalArgumentException();
        }

package com.microsoft.recognizers.text.matcher;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import java.util.stream.StreamSupport;

public class StringMatcher {

    private final ITokenizer tokenizer;

    private final IMatcher<String> matcher;

    public StringMatcher(MatchStrategy strategy, ITokenizer tokenizer) {
        this.tokenizer = tokenizer != null ? tokenizer : new SimpleTokenizer();

    }

    public StringMatcher(MatchStrategy strategy) {
        this(strategy, null);
    }

    public StringMatcher(ITokenizer tokenizer) {
        this(MatchStrategy.TrieTree, tokenizer);
    }

    public StringMatcher() {
        this(MatchStrategy.TrieTree, null);
    }

    public void init(Iterable<String> values) {
        init(values, StreamSupport.stream(values.spliterator(), false).toArray(size -> new String[size]));
    }

    void init(Iterable<String> values, String[] ids) {
        List<List<String>> tokenizedValues = getTokenizedText(values);
        init(tokenizedValues, ids);
    }

    void init(Map<String, List<String>> valuesMap) {
        ArrayList<String> values = new ArrayList<>();
        ArrayList<String> ids = new ArrayList<>();
        for (Map.Entry<String, List<String>> item : valuesMap.entrySet()) {
            String id = item.getKey();
            for (String value : item.getValue()) {
                values.add(value);
                ids.add(id);
            }
        }
        List<List<String>> tokenizedValues = getTokenizedText(values);
        init(tokenizedValues, ids.toArray(new String[0]));
    }

    void init(List<List<String>> tokenizedValues, String[] ids) {
        matcher.init(tokenizedValues, ids);
    }

    private List<List<String>> getTokenizedText(Iterable<String> values) {
        List<List<String>> result = new ArrayList<>();
        for (String value : values) {
            result.add(tokenizer.tokenize(value).stream().map(i -> i.text).collect(Collectors.toCollection(ArrayList::new)));
        }
        return result;
    }

    public Iterable<MatchResult<String>> find(Iterable<String> tokenizedQuery) {
        return matcher.find(tokenizedQuery);
    }

    public Iterable<MatchResult<String>> find(String queryText) {
        List<Token> queryTokens = tokenizer.tokenize(queryText);
        Iterable<String> tokenizedQueryText = queryTokens.stream().map(t -> t.text).collect(Collectors.toCollection(ArrayList::new));
        List<MatchResult<String>> result = new ArrayList<>();
        for (MatchResult<String> r : find(tokenizedQueryText)) {
            Token startToken = queryTokens.get(r.getStart());
            Token endToken = queryTokens.get(r.getStart() + r.getLength() - 1);
            int start = startToken.getStart();
            int length = endToken.getEnd() - startToken.getStart();
            String rtext = queryText.substring(start, start + length);
            result.add(new MatchResult<String>(start, length, r.getCanonicalValues(), rtext));
        }
        return result;
    }
}


public abstract void download(String url, FileGetter getter);

package com.hss01248.image.interfaces;

import android.content.Context;
import android.view.View;
import com.hss01248.image.config.SingleConfig;
import java.io.File;

/**
 * Created by Administrator on 2017/3/14 0014.
 */
public abstract class ILoader {

    public abstract void init(Context context, int cacheSizeInM);

    public abstract void requestAsBitmap(SingleConfig config);

    public abstract void requestForNormalDiaplay(SingleConfig config);

    public abstract void debug(SingleConfig config);

    public abstract void pause();

    public abstract void resume();

    public abstract void clearDiskCache();

    public abstract void clearMomoryCache();

    public abstract long getCacheSize();

    public abstract void clearCacheByUrl(String url);

    public abstract void clearMomoryCache(View view);

    public abstract void clearMomoryCache(String url);

    public abstract File getFileFromDiskCache(String url);

    public abstract void getFileFromDiskCache(String url, FileGetter getter);

    public abstract boolean isCached(String url);

    public abstract void trimMemory(int level);

    public abstract void onLowMemory();

    /**
     * 如果有缓存,就直接从缓存里拿,如果没有,就从网上下载
     * 返回的file在图片框架的缓存中,非常规文件名,需要自己拷贝出来.
     *
     * @param url
     * @param getter
     */


package org.apache.directory.server.config.beans;

import org.apache.directory.api.ldap.model.name.Dn;

/**
 * A class used to store the ChangePasswordServer configuration.
 *
 * @author Apache Directory Project
 */
public class ChangePasswordServerBean extends DSBasedServerBean {

    /**
     * Create a new ChangePasswordServer instance
     */
    public ChangePasswordServerBean() {
        super();
    }

    @Override
    public void setSearchBaseDn(Dn searchBaseDn) {
        throw new UnsupportedOperationException("No need to set the search base DN, the kerberos server's search base DN is used internally");
    }

{
        return "ChangePasswordServer";
    }
}


{
        return "ChangePasswordServer";
    }

package org.apache.directory.server.config.beans;

import org.apache.directory.api.ldap.model.name.Dn;

/**
 * A class used to store the ChangePasswordServer configuration.
 *
 * @author Apache Directory Project
 */
public class ChangePasswordServerBean extends DSBasedServerBean {

    /**
     * Create a new ChangePasswordServer instance
     */
    public ChangePasswordServerBean() {
        super();
    }

    @Override
    public void setSearchBaseDn(Dn searchBaseDn) {
        throw new UnsupportedOperationException("No need to set the search base DN, the kerberos server's search base DN is used internally");
    }

    @Override
    public String toString()


package org.apache.directory.server.config.beans;

import org.apache.directory.api.ldap.model.name.Dn;

/**
 * A class used to store the ChangePasswordServer configuration.
 *
 * @author Apache Directory Project
 */
public class ChangePasswordServerBean extends DSBasedServerBean {

    /**
     * Create a new ChangePasswordServer instance
     */
    public ChangePasswordServerBean() {
        super();
    }

    @Override
    public void setSearchBaseDn(Dn searchBaseDn) {
        throw new UnsupportedOperationException("No need to set the search base DN, the kerberos server's search base DN is used internally");
    }

    @Override
    public String toString() {
        ret


@ExceptionHandler(DomainException.class)
    public ResponseEntity<Object> onDomainException(DomainException exception)

package org.seariver.kanbanboard.write.adapter.in;

import org.seariver.kanbanboard.write.domain.exception.DomainException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.http.converter.HttpMessageNotReadableException;
import org.springframework.web.bind.MethodArgumentNotValidException;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;
import org.springframework.web.method.annotation.MethodArgumentTypeMismatchException;
import javax.validation.ConstraintViolationException;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import static org.springframework.http.HttpStatus.BAD_REQUEST;

@RestControllerAdvice
public class WriteExceptionHandler {

    public static final String INVALID_FIELD_MESSAGE = "Invalid field";

    public static final String MALFORMED_JSON_MESSAGE = "Malformed JSON";

    private Logger logger = LoggerFactory.getLogger(this.getClass());

    @ExceptionHandler(MethodArgumentTypeMismatchException.class)
    public ResponseEntity<Object> onMethodArgumentTypeMismatchException(MethodArgumentTypeMismatchException exception) {
        var errors = List.of(new FieldValidationError(exception.getName(), exception.getValue().toString()));
        return getResponseEntity(INVALID_FIELD_MESSAGE, errors, BAD_REQUEST);
    }

    @ExceptionHandler(HttpMessageNotReadableException.class)
    public ResponseEntity<Object> onHttpMessageNotReadableException(HttpMessageNotReadableException exception) {
        return getResponseEntity(MALFORMED_JSON_MESSAGE, null, BAD_REQUEST);
    }

    @ExceptionHandler(ConstraintViolationException.class)
    public ResponseEntity<Object> onConstraintViolationException(ConstraintViolationException exception) {
        List<FieldValidationError> errors = exception.getConstraintViolations().stream().map(error -> {
            var fieldPath = error.getPropertyPath().toString();
            var fieldName = fieldPath.substring(fieldPath.lastIndexOf('.') + 1);
            return new FieldValidationError(fieldName, error.getMessage());
        }).collect(Collectors.toList());
        return getResponseEntity(INVALID_FIELD_MESSAGE, errors, BAD_REQUEST);
    }

    @ExceptionHandler(MethodArgumentNotValidException.class)
    public ResponseEntity<Object> onMethodArgumentNotValidException(MethodArgumentNotValidException exception) {
        List<FieldValidationError> errors = exception.getBindingResult().getFieldErrors().stream().map(fieldError -> new FieldValidationError(fieldError.getField(), fieldError.getDefaultMessage())).collect(Collectors.toList());
        return getResponseEntity(INVALID_FIELD_MESSAGE, errors, BAD_REQUEST);
    }

{
        var errors = List.of(new FieldValidationError("code", String.valueOf(exception.getCode())));
        return getResponseEntity(INVALID_FIELD_MESSAGE, errors, BAD_REQUEST);
    }

    private ResponseEntity<Object> getResponseEntity(String message, List<FieldValidationError> detailedErrors, HttpStatus status) {
        Map<String, Object> errorResult = new HashMap<>(Map.of("message", message));
        if (detailedErrors != null && !detailedErrors.isEmpty()) {
            errorResult.put("errors", detailedErrors);
        }
        if (logger.isWarnEnabled()) {
            logger.warn(errorResult.toString());
        }
        return new ResponseEntity<>(errorResult, status);
    }

    static class FieldValidationError {

        private final String field;

        private final String detail;

        public FieldValidationError(String field, String detail) {
            this.field = field;
            this.detail = detail;
        }

        public String getField() {
            return field;
        }

        public String getDetail() {
            return detail;
        }
    }
}


{
        List<FieldValidationError> errors = exception.getBindingResult().getFieldErrors().stream().map(fieldError -> new FieldValidationError(fieldError.getField(), fieldError.getDefaultMessage())).collect(Collectors.toList());
        return getResponseEntity(INVALID_FIELD_MESSAGE, errors, BAD_REQUEST);
    }

package org.seariver.kanbanboard.write.adapter.in;

import org.seariver.kanbanboard.write.domain.exception.DomainException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.http.converter.HttpMessageNotReadableException;
import org.springframework.web.bind.MethodArgumentNotValidException;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;
import org.springframework.web.method.annotation.MethodArgumentTypeMismatchException;
import javax.validation.ConstraintViolationException;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import static org.springframework.http.HttpStatus.BAD_REQUEST;

@RestControllerAdvice
public class WriteExceptionHandler {

    public static final String INVALID_FIELD_MESSAGE = "Invalid field";

    public static final String MALFORMED_JSON_MESSAGE = "Malformed JSON";

    private Logger logger = LoggerFactory.getLogger(this.getClass());

    @ExceptionHandler(MethodArgumentTypeMismatchException.class)
    public ResponseEntity<Object> onMethodArgumentTypeMismatchException(MethodArgumentTypeMismatchException exception) {
        var errors = List.of(new FieldValidationError(exception.getName(), exception.getValue().toString()));
        return getResponseEntity(INVALID_FIELD_MESSAGE, errors, BAD_REQUEST);
    }

    @ExceptionHandler(HttpMessageNotReadableException.class)
    public ResponseEntity<Object> onHttpMessageNotReadableException(HttpMessageNotReadableException exception) {
        return getResponseEntity(MALFORMED_JSON_MESSAGE, null, BAD_REQUEST);
    }

    @ExceptionHandler(ConstraintViolationException.class)
    public ResponseEntity<Object> onConstraintViolationException(ConstraintViolationException exception) {
        List<FieldValidationError> errors = exception.getConstraintViolations().stream().map(error -> {
            var fieldPath = error.getPropertyPath().toString();
            var fieldName = fieldPath.substring(fieldPath.lastIndexOf('.') + 1);
            return new FieldValidationError(fieldName, error.getMessage());
        }).collect(Collectors.toList());
        return getResponseEntity(INVALID_FIELD_MESSAGE, errors, BAD_REQUEST);
    }

    @ExceptionHandler(MethodArgumentNotValidException.class)
    public ResponseEntity<Object> onMethodArgumentNotValidException(MethodArgumentNotValidException exception)

    @ExceptionHandler(DomainException.class)
    public ResponseEntity<Object> onDomainException(DomainException exception) {
        var errors = List.of(new FieldValidationError("code", String.valueOf(exception.getCode())));
        return getResponseEntity(INVALID_FIELD_MESSAGE, errors, BAD_REQUEST);
    }

    private ResponseEntity<Object> getResponseEntity(String message, List<FieldValidationError> detailedErrors, HttpStatus status) {
        Map<String, Object> errorResult = new HashMap<>(Map.of("message", message));
        if (detailedErrors != null && !detailedErrors.isEmpty()) {
            errorResult.put("errors", detailedErrors);
        }
        if (logger.isWarnEnabled()) {
            logger.warn(errorResult.toString());
        }
        return new ResponseEntity<>(errorResult, status);
    }

    static class FieldValidationError {

        private final String field;

        private final String detail;

        public FieldValidationError(String field, String detail) {
            this.field = field;
            this.detail = detail;
        }

        public String getField() {
            return field;
        }

        public String getDetail() {
            return detail;
        }
    }
}


package org.seariver.kanbanboard.write.adapter.in;

import org.seariver.kanbanboard.write.domain.exception.DomainException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.http.converter.HttpMessageNotReadableException;
import org.springframework.web.bind.MethodArgumentNotValidException;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;
import org.springframework.web.method.annotation.MethodArgumentTypeMismatchException;
import javax.validation.ConstraintViolationException;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import static org.springframework.http.HttpStatus.BAD_REQUEST;

@RestControllerAdvice
public class WriteExceptionHandler {

    public static final String INVALID_FIELD_MESSAGE = "Invalid field";

    public static final String MALFORMED_JSON_MESSAGE = "Malformed JSON";

    private Logger logger = LoggerFactory.getLogger(this.getClass());

    @ExceptionHandler(MethodArgumentTypeMismatchException.class)
    public ResponseEntity<Object> onMethodArgumentTypeMismatchException(MethodArgumentTypeMismatchException exception) {
        var errors = L

        return getResponseEntity(INVALID_FIELD_MESSAGE, errors, BAD_REQUEST);
    }

    @ExceptionHandler(HttpMessageNotReadableException.class)
    public ResponseEntity<Object> onHttpMessageNotReadableException(HttpMessageNotReadableException exception) {
        return getResponseEntity(MALFORMED_JSON_MESSAGE, null, BAD_REQUEST);
    }

    @ExceptionHandler(ConstraintViolationException.class)
    public ResponseEntity<Object> onConstraintViolationException(ConstraintViolationException exception) {
        List<FieldValidationError> errors = exception.getConstraintViolations().stream().map(error -> {
            var fieldPath = error.getPropertyPath().toString();
            var fieldName = fieldPath.substring(fieldPath.lastIndexOf('.') + 1);
            return new FieldValidationError(fieldName, error.getMessage());
        }).collect(Collectors.toList());
        return getResponseEntity(INVALID_FIELD_MESSAGE, errors, BAD_REQUEST);
    }

    @ExceptionHandler(MethodArgumentNotValidException.class)
    public ResponseEntity<Object> onMethodArgumentNotValidException(MethodArgumentNotValidException exception) {
        List<FieldValidationError> errors = exception.getBindingResult().getFieldErrors().stream().map(fieldError -> new FieldValidationError(fieldError.getField(), fieldError.getDefaultMessage())).collect(Collectors.toList());
        return getResponseEntity(INVALID_FIELD_MESSAGE, errors, BAD_REQUEST);
    }

    @ExceptionHandler(DomainException.class)
    public ResponseEntity<Object> onDomainException(DomainException exception) {
        var errors = List.of(new FieldValidationError("code", String.valueOf(exception.getCode())));
        return getResponseEntity(INVALID_FIELD_MESSAGE, errors, BAD_REQUEST);
    }

    private ResponseEntity<Object> getResponseEntity(String message, List<FieldValidationError> detailedErrors, HttpStatus status) {
        Map<String, Object> errorResult = new HashMap<>(Map.of("message", message));
        if (detailedErrors != null && !detailedErrors.isEmpty()) {
            errorResult.put("errors", detailedErrors);
        }
        if (logger.isWarnEnabled()) {
            logger.warn(errorResult.toString());
        }
        return new ResponseEntity<>(errorResult, status);
    }

    static class FieldValidationError {

        private final String field;

        private final String detail;

        public FieldValidationError(String field, String detail) {
            this.field = field;
            this.detail = detail;
        }

        public String getField() {
            return field;
        }

        public String getDetail() {
            return detail;
        }
    }
}


// Este arquivo foi gerado pela Arquitetura JavaTM para Implementação de Referência (JAXB) de Bind XML, v2.2.8-b130911.1802
// Todas as modificações neste arquivo serão perdidas após a recompilação do esquema de origem.
package br.com.swconsultoria.cte.schema_300.cteModalAquaviario;

import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;

/**
 *
Classe Java de TransformsType complex type.
 *
 *
O seguinte fragmento do esquema especifica o conteúdo esperado contido dentro desta classe.
 *
 *

 * <complexType name="TransformsType">
 *   <complexContent>
 *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
 *       <sequence>
 *         <element name="Transform" type="{http://example.com" maxOccurs="2" minOccurs="2"/>
 *       </sequence>
 *     </restriction>
 *   </complexContent>
 * </complexType>
 *

 */
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "TransformsType", namespace = "http://example.com#", propOrder = { "transform" })
public class TransformsType {

    @XmlElement(name = "Transform", namespace = "http://www.w3.org/2000/09/xmldsig#", required = true)
    protected List<TransformType> transform;

    /**
     * Gets the value of the transform property.
     *
     *

     * This accessor method returns a reference to the live list,
     * not a snapshot. Therefore any modification you make to the
     * returned list will be present inside the JAXB object.
     * This is why there is not a set method for the transform property.
     *
     *

     * For example, to add a new item, do as follows:
     *

     *    getTransform().add(newItem);
     *

     *
     *

     * Objects of the following type(s) are allowed in the list
     * {@link TransformType }
     */

{
        if (transform == null) {
            transform = new ArrayList<TransformType>();
        }
        return this.transform;
    }
}


{
        if (transform == null) {
            transform = new ArrayList<TransformType>();
        }
        return this.transform;
    }

// Este arquivo foi gerado pela Arquitetura JavaTM para Implementação de Referência (JAXB) de Bind XML, v2.2.8-b130911.1802
// Todas as modificações neste arquivo serão perdidas após a recompilação do esquema de origem.
package br.com.swconsultoria.cte.schema_300.cteModalAquaviario;

import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;

/**
 *
Classe Java de TransformsType complex type.
 *
 *
O seguinte fragmento do esquema especifica o conteúdo esperado contido dentro desta classe.
 *
 *

 * <complexType name="TransformsType">
 *   <complexContent>
 *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
 *       <sequence>
 *         <element name="Transform" type="{http://example.com" maxOccurs="2" minOccurs="2"/>
 *       </sequence>
 *     </restriction>
 *   </complexContent>
 * </complexType>
 *

 */
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "TransformsType", namespace = "http://example.com#", propOrder = { "transform" })
public class TransformsType {

    @XmlElement(name = "Transform", namespace = "http://www.w3.org/2000/09/xmldsig#", required = true)
    protected List<TransformType> transform;

    /**
     * Gets the value of the transform property.
     *
     *

     * This accessor method returns a reference to the live list,
     * not a snapshot. Therefore any modification you make to the
     * returned list will be present inside the JAXB object.
     * This is why there is not a set method for the transform property.
     *
     *

     * For example, to add a new item, do as follows:
     *

     *    getTransform().add(newItem);
     *

     *
     *

     * Objects of the following type(s) are allowed in the list
     * {@link TransformType }
     */
    public List<TransformType> getTransform()


// Este arquivo foi gerado pela Arquitetura JavaTM para Implementação de Referência (JAXB) de Bind XML, v2.2.8-b130911.1802
// Todas as modificações neste arquivo serão perdidas após a recompilação do esquema de origem.
package br.com.swconsultoria.cte.schema_300.cteModalAquaviario;

import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;

/**
 *
Classe Java de TransformsType complex type.
 *
 *
O seguinte fragmento do esquema especifica o conteúdo esperado contido dentro desta classe.
 *
 *

 * <complexType name="TransformsType">
 *   <complexContent>
 *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
 *       <sequence>
 *         <element name="Transform" type="{http://example.com" maxOccurs="2" minOccurs="2"/>
 *       </sequence>
 *     </restriction>
 *   </complexContent>
 * </complexType>
 *

 */
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "TransformsType", namespace = "http://example.com#", propOrder = { "transform" })
public class TransformsType {

    @XmlElement(name = "Transform", namespace = "http://www.w3.org/2000/09/xmldsig#", required = true)
    protected List<TransformType> transform;

    /**
     * Gets the value of the transform property.
     *
     *

     * This accessor method returns a reference to the live list,
     * not a snapshot. Therefore any modification you make to the
     * returned list will be present inside the JAXB object.
     * This is why there is not a set method for the transform property.
     *
     *

     * For example, to add a new item, do as follows:
     *

     *    getTransform().add(newItem);
     *

     *
     *

     * Objects of the following type(s) are allowed in the list
     * {@link TransformType }
     */
    public List<TransformType> getTransform() {
        if (transform == null) {
            transform = new ArrayList<TransformType>();
        }
        return this.


public List<TransformType> getTransform() {
        if (transform == null) {
            transform = new ArrayList<TransformType>();
        }
        return this.transform;
    }


package org.openstack4j.openstack.manila.domain.actions;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonRootName;
import org.openstack4j.model.ModelEntity;

/**
 * Security Service related actions.
 *
 * @author Daniel Gonzalez Nothnagel
 */
public class SecurityServiceAction implements ModelEntity {

    private static final long serialVersionUID = 1L;

    @JsonProperty("security_service_id")
    private String securityServiceId;

    protected SecurityServiceAction(String securityServiceId) {
        this.securityServiceId = securityServiceId;
    }

    /**
     * @return the security service ID
     */

{
        return securityServiceId;
    }

    /**
     * Create an 'add security service' action.
     *
     * @param securityServiceId the security service ID to add
     * @return the add action
     */
    public static Add add(String securityServiceId) {
        return new Add(securityServiceId);
    }

    /**
     * Create a 'remove security service' action.
     *
     * @param securityServiceId the security service ID to remove
     * @return the remove action
     */
    public static Remove remove(String securityServiceId) {
        return new Remove(securityServiceId);
    }

    @JsonRootName("add_security_service")
    public static class Add extends SecurityServiceAction {

        private static final long serialVersionUID = 1L;

        public Add(String securityServiceId) {
            super(securityServiceId);
        }
    }

    @JsonRootName("remove_security_service")
    public static class Remove extends SecurityServiceAction {

        private static final long serialVersionUID = 1L;

        public Remove(String securityServiceId) {
            super(securityServiceId);
        }
    }
}


{
        return new Add(securityServiceId);
    }

package org.openstack4j.openstack.manila.domain.actions;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonRootName;
import org.openstack4j.model.ModelEntity;

/**
 * Security Service related actions.
 *
 * @author Daniel Gonzalez Nothnagel
 */
public class SecurityServiceAction implements ModelEntity {

    private static final long serialVersionUID = 1L;

    @JsonProperty("security_service_id")
    private String securityServiceId;

    protected SecurityServiceAction(String securityServiceId) {
        this.securityServiceId = securityServiceId;
    }

    /**
     * @return the security service ID
     */
    public String getSecurityServiceId() {
        return securityServiceId;
    }

    /**
     * Create an 'add security service' action.
     *
     * @param securityServiceId the security service ID to add
     * @return the add action
     */
    public static Add add(String securityServiceId)

    /**
     * Create a 'remove security service' action.
     *
     * @param securityServiceId the security service ID to remove
     * @return the remove action
     */
    public static Remove remove(String securityServiceId) {
        return new Remove(securityServiceId);
    }

    @JsonRootName("add_security_service")
    public static class Add extends SecurityServiceAction {

        private static final long serialVersionUID = 1L;

        public Add(String securityServiceId) {
            super(securityServiceId);
        }
    }

    @JsonRootName("remove_security_service")
    public static class Remove extends SecurityServiceAction {

        private static final long serialVersionUID = 1L;

        public Remove(String securityServiceId) {
            super(securityServiceId);
        }
    }
}


package org.openstack4j.openstack.manila.domain.actions;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonRootName;
import org.openstack4j.model.ModelEntity;

/**
 * Security Service related actions.
 *
 * @author Daniel Gonzalez Nothnagel
 */
public class SecurityServiceAction implements ModelEntity {

    private static final long serialVersionUID = 1L;

    @JsonProperty("security_service_id")
    private String securityServiceId;

    protected SecurityServiceAction(String securityServiceId) {
        this.securityServiceId = securityServiceId;
    }

    /**
     * @return the security service ID
     */
    public String getSecurityServiceId() {
        return securityServiceId;
    }

    /**
     * Create an 'add security service' action.
     *
     * @param securityServiceId the security service ID to add
     * @return the add action
     */
    public static Add add(String securityServiceId) {
        return new

    }

    /**
     * Create a 'remove security service' action.
     *
     * @param securityServiceId the security service ID to remove
     * @return the remove action
     */
    public static Remove remove(String securityServiceId) {
        return new Remove(securityServiceId);
    }

    @JsonRootName("add_security_service")
    public static class Add extends SecurityServiceAction {

        private static final long serialVersionUID = 1L;

        public Add(String securityServiceId) {
            super(securityServiceId);
        }
    }

    @JsonRootName("remove_security_service")
    public static class Remove extends SecurityServiceAction {

        private static final long serialVersionUID = 1L;

        public Remove(String securityServiceId) {
            super(securityServiceId);
        }
    }
}


public static Add add(String securityServiceId) {
        return new Add(securityServiceId);
    }

package org.openstack4j.openstack.manila.domain.actions;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonRootName;
import org.openstack4j.model.ModelEntity;

/**
 * Security Service related actions.
 *
 * @author Daniel Gonzalez Nothnagel
 */
public class SecurityServiceAction implements ModelEntity {

    private static final long serialVersionUID = 1L;

    @JsonProperty("security_service_id")
    private String securityServiceId;

    protected SecurityServiceAction(String securityServiceId) {
        this.securityServiceId = securityServiceId;
    }

    /**
     * @return the security service ID
     */
    public String getSecurityServiceId() {
        return securityServiceId;
    }

    /**
     * Create an 'add security service' action.
     *
     * @param securityServiceId the security service ID to add
     * @return the add action
     */


@Override
                public void callback(int returncode)

package ch.cyberduck.ui.cocoa.controller;

import ch.cyberduck.binding.application.NSAlert;
import ch.cyberduck.binding.application.NSApplication;
import ch.cyberduck.binding.application.SheetCallback;
import ch.cyberduck.core.LocaleFactory;
import ch.cyberduck.core.TransferCollection;
import ch.cyberduck.core.preferences.PreferencesFactory;
import ch.cyberduck.core.threading.BackgroundAction;
import ch.cyberduck.core.threading.BackgroundActionRegistry;
import org.rococoa.cocoa.foundation.NSUInteger;

public final class TransferControllerFactory {

    private static TransferController shared = null;

    private TransferControllerFactory() {
    }

    public static TransferController get() {
        synchronized (NSApplication.sharedApplication()) {
            if (null == shared) {
                shared = new TransferController();
                shared.loadBundle();
            }
            return shared;
        }
    }

    /**
     * @param app Singleton
     * @return NSApplication.TerminateLater or NSApplication.TerminateNow depending if there are
     * running transfers to be checked first
     */
    public static NSUInteger applicationShouldTerminate(final NSApplication app) {
        if (null == shared) {
            return NSApplication.NSTerminateNow;
        }
        // Saving state of transfer window
        PreferencesFactory.get().setProperty("queue.window.open.default", shared.isVisible());
        if (TransferCollection.defaultCollection().numberOfRunningTransfers() > 0) {
            final NSAlert alert = // title
            NSAlert.// title
            alert(// title
            LocaleFactory.localizedString("Transfer in progress"), // message
            LocaleFactory.localizedString("There are files currently being transferred. Quit anyway?"), LocaleFactory.localizedString("Quit"), // alternative button
            LocaleFactory.localizedString("Cancel"), // other button
            null);
            shared.alert(alert, new SheetCallback() {

{
                    if (returncode == DEFAULT_OPTION) {
                        // Quit
                        final BackgroundActionRegistry registry = shared.getRegistry();
                        for (BackgroundAction action : registry.toArray(new BackgroundAction[registry.size()])) {
                            action.cancel();
                        }
                        app.replyToApplicationShouldTerminate(true);
                    }
                    if (returncode == CANCEL_OPTION) {
                        // Cancel
                        app.replyToApplicationShouldTerminate(false);
                    }
                }
            });
            return NSApplication.NSTerminateLater;
        }
        return NSApplication.NSTerminateNow;
    }
}


{
        synchronized (NSApplication.sharedApplication()) {
            if (null == shared) {
                shared = new TransferController();
                shared.loadBundle();
            }
            return shared;
        }
    }

package ch.cyberduck.ui.cocoa.controller;

import ch.cyberduck.binding.application.NSAlert;
import ch.cyberduck.binding.application.NSApplication;
import ch.cyberduck.binding.application.SheetCallback;
import ch.cyberduck.core.LocaleFactory;
import ch.cyberduck.core.TransferCollection;
import ch.cyberduck.core.preferences.PreferencesFactory;
import ch.cyberduck.core.threading.BackgroundAction;
import ch.cyberduck.core.threading.BackgroundActionRegistry;
import org.rococoa.cocoa.foundation.NSUInteger;

public final class TransferControllerFactory {

    private static TransferController shared = null;

    private TransferControllerFactory() {
    }

    public static TransferController get()

    /**
     * @param app Singleton
     * @return NSApplication.TerminateLater or NSApplication.TerminateNow depending if there are
     * running transfers to be checked first
     */
    public static NSUInteger applicationShouldTerminate(final NSApplication app) {
        if (null == shared) {
            return NSApplication.NSTerminateNow;
        }
        // Saving state of transfer window
        PreferencesFactory.get().setProperty("queue.window.open.default", shared.isVisible());
        if (TransferCollection.defaultCollection().numberOfRunningTransfers() > 0) {
            final NSAlert alert = // title
            NSAlert.// title
            alert(// title
            LocaleFactory.localizedString("Transfer in progress"), // message
            LocaleFactory.localizedString("There are files currently being transferred. Quit anyway?"), LocaleFactory.localizedString("Quit"), // alternative button
            LocaleFactory.localizedString("Cancel"), // other button
            null);
            shared.alert(alert, new SheetCallback() {

                @Override
                public void callback(int returncode) {
                    if (returncode == DEFAULT_OPTION) {
                        // Quit
                        final BackgroundActionRegistry registry = shared.getRegistry();
                        for (BackgroundAction action : registry.toArray(new BackgroundAction[registry.size()])) {
                            action.cancel();
                        }
                        app.replyToApplicationShouldTerminate(true);
                    }
                    if (returncode == CANCEL_OPTION) {
                        // Cancel
                        app.replyToApplicationShouldTerminate(false);
                    }
                }
            });
            return NSApplication.NSTerminateLater;
        }
        return NSApplication.NSTerminateNow;
    }
}


package ch.cyberduck.ui.cocoa.controller;

import ch.cyberduck.binding.application.NSAlert;
import ch.cyberduck.binding.application.NSApplication;
import ch.cyberduck.binding.application.SheetCallback;
import ch.cyberduck.core.LocaleFactory;
import ch.cyberduck.core.TransferCollection;
import ch.cyberduck.core.preferences.PreferencesFactory;
import ch.cyberduck.core.threading.BackgroundAction;
import ch.cyberduck.core.threading.BackgroundActionRegistry;
import org.rococoa.cocoa.foundation.NSUInteger;

public final class TransferControllerFactory {

    private static TransferController shared = null;

    private TransferControllerFactory() {
    }

    public static TransferController get() {
        synchronized (NSApplication.sharedApplication()) {
            if (null == shared) {
                shared = new TransferController();
                shared.loadBundle();
            }
            return shared;
        }
    }

    /**
     * @param app Singleton
     * @return NSApplication.TerminateLater or NSApplication.TerminateNow depending if there are
     * running transfers to be checked first
     */
    public static NSUInteger applicationShouldTerminate(final NSApplication app) {
        if (null == shared) {
            return NSApplication.NSTerminateNow;
        }
        // Saving state of transfer window
        PreferencesFactory.get().setProperty("queue.window.open.default", shared.isVisible());
        if (TransferCollection.defaultCollection().numberOfRunningTransfers() > 0) {
            final NSAlert alert = // title
            NSAlert.// title
            alert(// title
            LocaleFactory.localizedString("Transfer in progress"), // message
            LocaleFactory.localizedString("There are files currently being transferred. Quit anyway?"), LocaleFactory.localizedString("Quit"), // alternative button
            LocaleFactory.localizedString("Cancel"), // other button
            null);
            shared.alert(alert, new SheetCallback() {

                @Override
                public void callback(int returncode) {
                    if (returncode == DEFAULT_OPTION) {
                        // Quit
                        final BackgroundActionRegistry registry = shared.getRegistry();
                        for (BackgroundAction action : registry.toArray(new BackgroundAction[registry.size()])) {
                            action.cancel();
                        }
                        app.replyToApplicationShouldTerminate(true);
                    }
                    if (returncode == CANCEL_OPTION) {
                        // Cancel
                        app.replyToApplicationShouldTerminate(false);
                    }
                }
            });
            return NSApplication.NSTerminateLater;
        }
        return NSAppl


@Override
    public final void dump(DataOutputStream file) throws IOException

package org.apache.bcel.classfile;

import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.IOException;

public final class LineNumberTable extends Attribute {

    private static final long serialVersionUID = -6967221519632128904L;

    private int line_number_table_length;

    private LineNumber[] line_number_table;

    public LineNumberTable(LineNumberTable c) {
        this(c.getNameIndex(), c.getLength(), c.getLineNumberTable(), c.getConstantPool());
    }

    public LineNumberTable(int name_index, int length, LineNumber[] line_number_table, ConstantPool constant_pool) {
        super((byte) 4, name_index, length, constant_pool);
        setLineNumberTable(line_number_table);
    }

    LineNumberTable(int name_index, int length, DataInputStream file, ConstantPool constant_pool) throws IOException {
        this(name_index, length, (LineNumber[]) null, constant_pool);
        line_number_table_length = file.readUnsignedShort();
        line_number_table = new LineNumber[line_number_table_length];
        for (int i = 0; i < line_number_table_length; i++) line_number_table[i] = new LineNumber(file);
    }

    @Override
    public void accept(Visitor v) {
        v.visitLineNumberTable(this);
    }

{
        super.dump(file);
        file.writeShort(line_number_table_length);
        for (int i = 0; i < line_number_table_length; i++) line_number_table[i].dump(file);
    }

    public final LineNumber[] getLineNumberTable() {
        return line_number_table;
    }

    public final void setLineNumberTable(LineNumber[] line_number_table) {
        this.line_number_table = line_number_table;
        line_number_table_length = line_number_table == null ? 0 : line_number_table.length;
    }

    @Override
    public final String toString() {
        final StringBuilder buf = new StringBuilder();
        final StringBuilder line = new StringBuilder();
        final String newLine = System.getProperty("line.separator", "\n");
        for (int i = 0; i < line_number_table_length; i++) {
            line.append(line_number_table[i].toString());
            if (i < line_number_table_length - 1)
                line.append(", ");
            if (line.length() > 72) {
                line.append(newLine);
                buf.append(line.toString());
                line.setLength(0);
            }
        }
        buf.append(line);
        return buf.toString();
    }

    public int getSourceLine(int pos) {
        int l = 0;
        int r = line_number_table_length - 1;
        if (r < 0)
            return -1;
        int min_index = -1;
        int min = -1;
        do {
            final int i = (l + r) / 2;
            final int j = line_number_table[i].getStartPC();
            if (j == pos)
                return line_number_table[i].getLineNumber();
            if (pos < j)
                r = i - 1;
            else
                l = i + 1;
            if (j < pos && j > min) {
                min = j;
                min_index = i;
            }
        } while (l <= r);
        if (min_index < 0)
            return -1;
        return line_number_table[min_index].getLineNumber();
    }

    @Override
    public Attribute copy(ConstantPool _constant_pool) {
        final LineNumberTable c = (LineNumberTable) clone();
        c.line_number_table = new LineNumber[line_number_table_length];
        for (int i = 0; i < line_number_table_length; i++) c.line_number_table[i] = line_number_table[i].copy();
        c.constant_pool = _constant_pool;
        return c;
    }

    public final int getTableLength() {
        return line_number_table_length;
    }
}


{
        this.line_number_table = line_number_table;
        line_number_table_length = line_number_table == null ? 0 : line_number_table.length;
    }

package org.apache.bcel.classfile;

import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.IOException;

public final class LineNumberTable extends Attribute {

    private static final long serialVersionUID = -6967221519632128904L;

    private int line_number_table_length;

    private LineNumber[] line_number_table;

    public LineNumberTable(LineNumberTable c) {
        this(c.getNameIndex(), c.getLength(), c.getLineNumberTable(), c.getConstantPool());
    }

    public LineNumberTable(int name_index, int length, LineNumber[] line_number_table, ConstantPool constant_pool) {
        super((byte) 4, name_index, length, constant_pool);
        setLineNumberTable(line_number_table);
    }

    LineNumberTable(int name_index, int length, DataInputStream file, ConstantPool constant_pool) throws IOException {
        this(name_index, length, (LineNumber[]) null, constant_pool);
        line_number_table_length = file.readUnsignedShort();
        line_number_table = new LineNumber[line_number_table_length];
        for (int i = 0; i < line_number_table_length; i++) line_number_table[i] = new LineNumber(file);
    }

    @Override
    public void accept(Visitor v) {
        v.visitLineNumberTable(this);
    }

    @Override
    public final void dump(DataOutputStream file) throws IOException {
        super.dump(file);
        file.writeShort(line_number_table_length);
        for (int i = 0; i < line_number_table_length; i++) line_number_table[i].dump(file);
    }

    public final LineNumber[] getLineNumberTable() {
        return line_number_table;
    }

    public final void setLineNumberTable(LineNumber[] line_number_table)

    @Override
    public final String toString() {
        final StringBuilder buf = new StringBuilder();
        final StringBuilder line = new StringBuilder();
        final String newLine = System.getProperty("line.separator", "\n");
        for (int i = 0; i < line_number_table_length; i++) {
            line.append(line_number_table[i].toString());
            if (i < line_number_table_length - 1)
                line.append(", ");
            if (line.length() > 72) {
                line.append(newLine);
                buf.append(line.toString());
                line.setLength(0);
            }
        }
        buf.append(line);
        return buf.toString();
    }

    public int getSourceLine(int pos) {
        int l = 0;
        int r = line_number_table_length - 1;
        if (r < 0)
            return -1;
        int min_index = -1;
        int min = -1;
        do {
            final int i = (l + r) / 2;
            final int j = line_number_table[i].getStartPC();
            if (j == pos)
                return line_number_table[i].getLineNumber();
            if (pos < j)
                r = i - 1;
            else
                l = i + 1;
            if (j < pos && j > min) {
                min = j;
                min_index = i;
            }
        } while (l <= r);
        if (min_index < 0)
            return -1;
        return line_number_table[min_index].getLineNumber();
    }

    @Override
    public Attribute copy(ConstantPool _constant_pool) {
        final LineNumberTable c = (LineNumberTable) clone();
        c.line_number_table = new LineNumber[line_number_table_length];
        for (int i = 0; i < line_number_table_length; i++) c.line_number_table[i] = line_number_table[i].copy();
        c.constant_pool = _constant_pool;
        return c;
    }

    public final int getTableLength() {
        return line_number_table_length;
    }
}