AndroidParcelablePlugin

码农软件 · 软件分类 · 手机开发包 · 2019-05-05 09:59:27

软件介绍

AndroidParcelablePlugin 是为 Android Parcelable 提供的 Intellij IDEA(Android Studio) 插件。

实现 Parcelable 接口:

package com.wangjie.idea.plugin;
public class Person{
    private int id;
    private String name;
    private Float height;
    private Double weight;
    private Byte gender;
    private Boolean deleted;
    private Long birth;
}

生成:

package com.wangjie.idea.plugin;
import android.os.*;
public class Person implements Parcelable {
    public static final Parcelable.Creator<Person> CREATOR = new Parcelable.Creator<Person>() {
        @Override
        public Person[] newArray(int size) {
            return new Person[size];
        }
        @Override
        public Person createFromParcel(Parcel in) {
            return new Person(in);
        }
    };
    private int id;
    private String name;
    private Float height;
    private Double weight;
    private Byte gender;
    private Boolean deleted;
    private Long birth;
    public Person(Parcel in) {
        id = in.readInt();
        name = in.readString();
        height = in.readFloat();
        weight = in.readDouble();
        gender = in.readByte();
        deleted = 1 == in.readByte();
        birth = in.readLong();
    }
    @Override
    public void writeToParcel(Parcel out, int flags) {
        out.writeInt(id);
        out.writeString(name);
        out.writeFloat(height);
        out.writeDouble(weight);
        out.writeByte(gender);
        out.writeByte((byte) (deleted ? 1 : 0));
        out.writeLong(birth);
    }
    @Override
    public int describeContents() {
        return 0;
    }
}

本文地址:https://www.codercto.com/soft/d/5060.html

Algorithms on Strings, Trees and Sequences

Algorithms on Strings, Trees and Sequences

Dan Gusfield / Cambridge University Press / 1997-5-28 / USD 99.99

String algorithms are a traditional area of study in computer science. In recent years their importance has grown dramatically with the huge increase of electronically stored text and of molecular seq......一起来看看 《Algorithms on Strings, Trees and Sequences》 这本书的介绍吧!

JS 压缩/解压工具
JS 压缩/解压工具

在线压缩/解压 JS 代码

html转js在线工具
html转js在线工具

html转js在线工具

RGB CMYK 转换工具
RGB CMYK 转换工具

RGB CMYK 互转工具