sun.java2d.StateTrackable.State Java Examples

The following examples show how to use sun.java2d.StateTrackable.State. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: DataBuffer.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
/**
 *  Constructs a DataBuffer that contains the specified number
 *  of banks with the indicated initial {@link State State}.
 *  Each bank has the specified datatype, size and offset.
 *
 *  @param initialState the initial {@link State State} state of the data
 *  @param dataType the data type of this <code>DataBuffer</code>
 *  @param size the size of the banks
 *  @param numBanks the number of banks in this
 *         <code>DataBuffer</code>
 *  @param offset the offset for each bank
 *  @since 1.7
 */
DataBuffer(State initialState,
           int dataType, int size, int numBanks, int offset)
{
    this.theTrackable = StateTrackableDelegate.createInstance(initialState);
    this.dataType = dataType;
    this.banks = numBanks;
    this.size = size;
    this.offset = offset;
    this.offsets = new int[numBanks];
    for (int i = 0; i < numBanks; i++) {
        this.offsets[i] = offset;
    }
}
 
Example #2
Source File: DataBuffer.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 *  Constructs a DataBuffer that contains the specified number
 *  of banks with the indicated initial {@link State State}.
 *  Each bank has the specified datatype, size and offset.
 *
 *  @param initialState the initial {@link State State} state of the data
 *  @param dataType the data type of this <code>DataBuffer</code>
 *  @param size the size of the banks
 *  @param numBanks the number of banks in this
 *         <code>DataBuffer</code>
 *  @param offset the offset for each bank
 *  @since 1.7
 */
DataBuffer(State initialState,
           int dataType, int size, int numBanks, int offset)
{
    this.theTrackable = StateTrackableDelegate.createInstance(initialState);
    this.dataType = dataType;
    this.banks = numBanks;
    this.size = size;
    this.offset = offset;
    this.offsets = new int[numBanks];
    for (int i = 0; i < numBanks; i++) {
        this.offsets[i] = offset;
    }
}
 
Example #3
Source File: DataBuffer.java    From jdk1.8-source-analysis with Apache License 2.0 5 votes vote down vote up
/**
 *  Constructs a DataBuffer that contains the specified number
 *  of banks with the indicated initial {@link State State}.
 *  Each bank has the specified datatype, size and offset.
 *
 *  @param initialState the initial {@link State State} state of the data
 *  @param dataType the data type of this <code>DataBuffer</code>
 *  @param size the size of the banks
 *  @param numBanks the number of banks in this
 *         <code>DataBuffer</code>
 *  @param offset the offset for each bank
 *  @since 1.7
 */
DataBuffer(State initialState,
           int dataType, int size, int numBanks, int offset)
{
    this.theTrackable = StateTrackableDelegate.createInstance(initialState);
    this.dataType = dataType;
    this.banks = numBanks;
    this.size = size;
    this.offset = offset;
    this.offsets = new int[numBanks];
    for (int i = 0; i < numBanks; i++) {
        this.offsets[i] = offset;
    }
}
 
Example #4
Source File: StateTrackableDelegate.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Returns a {@code StateTrackableDelegate} instance with the
 * specified initial {@link State State}.
 * If the specified {@code State} is
 * {@link State#UNTRACKABLE UNTRACKABLE} or
 * {@link State#IMMUTABLE IMMUTABLE}
 * then the approprirate static instance
 * {@link #UNTRACKABLE_DELEGATE} or {@link #IMMUTABLE_DELEGATE}
 * is returned.
 */
public static StateTrackableDelegate createInstance(State state) {
    switch (state) {
    case UNTRACKABLE:
        return UNTRACKABLE_DELEGATE;
    case STABLE:
        return new StateTrackableDelegate(STABLE);
    case DYNAMIC:
        return new StateTrackableDelegate(DYNAMIC);
    case IMMUTABLE:
        return IMMUTABLE_DELEGATE;
    default:
        throw new InternalError("unknown state");
    }
}
 
Example #5
Source File: DataBuffer.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
/**
 *  Constructs a DataBuffer containing one bank of the specified
 *  data type and size with the indicated initial {@link State State}.
 *
 *  @param initialState the initial {@link State State} state of the data
 *  @param dataType the data type of this {@code DataBuffer}
 *  @param size the size of the banks
 *  @since 1.7
 */
DataBuffer(State initialState,
           int dataType, int size)
{
    this.theTrackable = StateTrackableDelegate.createInstance(initialState);
    this.dataType = dataType;
    this.banks = 1;
    this.size = size;
    this.offset = 0;
    this.offsets = new int[1];  // init to 0 by new
}
 
Example #6
Source File: DataBuffer.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 *  Constructs a DataBuffer that contains the specified number
 *  of banks with the indicated initial {@link State State}.
 *  Each bank has the specified datatype, size and offset.
 *
 *  @param initialState the initial {@link State State} state of the data
 *  @param dataType the data type of this <code>DataBuffer</code>
 *  @param size the size of the banks
 *  @param numBanks the number of banks in this
 *         <code>DataBuffer</code>
 *  @param offset the offset for each bank
 *  @since 1.7
 */
DataBuffer(State initialState,
           int dataType, int size, int numBanks, int offset)
{
    this.theTrackable = StateTrackableDelegate.createInstance(initialState);
    this.dataType = dataType;
    this.banks = numBanks;
    this.size = size;
    this.offset = offset;
    this.offsets = new int[numBanks];
    for (int i = 0; i < numBanks; i++) {
        this.offsets[i] = offset;
    }
}
 
Example #7
Source File: DataBuffer.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
/**
 *  Constructs a DataBuffer that contains the specified number
 *  of banks with the indicated initial {@link State State}.
 *  Each bank has the specified datatype, size and offset.
 *
 *  @param initialState the initial {@link State State} state of the data
 *  @param dataType the data type of this {@code DataBuffer}
 *  @param size the size of the banks
 *  @param numBanks the number of banks in this
 *         {@code DataBuffer}
 *  @param offset the offset for each bank
 *  @since 1.7
 */
DataBuffer(State initialState,
           int dataType, int size, int numBanks, int offset)
{
    this.theTrackable = StateTrackableDelegate.createInstance(initialState);
    this.dataType = dataType;
    this.banks = numBanks;
    this.size = size;
    this.offset = offset;
    this.offsets = new int[numBanks];
    for (int i = 0; i < numBanks; i++) {
        this.offsets[i] = offset;
    }
}
 
Example #8
Source File: DataBuffer.java    From Java8CN with Apache License 2.0 5 votes vote down vote up
/**
 *  Constructs a DataBuffer containing one bank of the specified
 *  data type and size with the indicated initial {@link State State}.
 *
 *  @param initialState the initial {@link State State} state of the data
 *  @param dataType the data type of this <code>DataBuffer</code>
 *  @param size the size of the banks
 *  @since 1.7
 */
DataBuffer(State initialState,
           int dataType, int size)
{
    this.theTrackable = StateTrackableDelegate.createInstance(initialState);
    this.dataType = dataType;
    this.banks = 1;
    this.size = size;
    this.offset = 0;
    this.offsets = new int[1];  // init to 0 by new
}
 
Example #9
Source File: StateTrackableDelegate.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Returns a {@code StateTrackableDelegate} instance with the
 * specified initial {@link State State}.
 * If the specified {@code State} is
 * {@link State#UNTRACKABLE UNTRACKABLE} or
 * {@link State#IMMUTABLE IMMUTABLE}
 * then the approprirate static instance
 * {@link #UNTRACKABLE_DELEGATE} or {@link #IMMUTABLE_DELEGATE}
 * is returned.
 */
public static StateTrackableDelegate createInstance(State state) {
    switch (state) {
    case UNTRACKABLE:
        return UNTRACKABLE_DELEGATE;
    case STABLE:
        return new StateTrackableDelegate(STABLE);
    case DYNAMIC:
        return new StateTrackableDelegate(DYNAMIC);
    case IMMUTABLE:
        return IMMUTABLE_DELEGATE;
    default:
        throw new InternalError("unknown state");
    }
}
 
Example #10
Source File: StateTrackableDelegate.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Returns a {@code StateTrackableDelegate} instance with the
 * specified initial {@link State State}.
 * If the specified {@code State} is
 * {@link State#UNTRACKABLE UNTRACKABLE} or
 * {@link State#IMMUTABLE IMMUTABLE}
 * then the approprirate static instance
 * {@link #UNTRACKABLE_DELEGATE} or {@link #IMMUTABLE_DELEGATE}
 * is returned.
 */
public static StateTrackableDelegate createInstance(State state) {
    switch (state) {
    case UNTRACKABLE:
        return UNTRACKABLE_DELEGATE;
    case STABLE:
        return new StateTrackableDelegate(STABLE);
    case DYNAMIC:
        return new StateTrackableDelegate(DYNAMIC);
    case IMMUTABLE:
        return IMMUTABLE_DELEGATE;
    default:
        throw new InternalError("unknown state");
    }
}
 
Example #11
Source File: DataBuffer.java    From dragonwell8_jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 *  Constructs a DataBuffer containing one bank of the specified
 *  data type and size with the indicated initial {@link State State}.
 *
 *  @param initialState the initial {@link State State} state of the data
 *  @param dataType the data type of this <code>DataBuffer</code>
 *  @param size the size of the banks
 *  @since 1.7
 */
DataBuffer(State initialState,
           int dataType, int size)
{
    this.theTrackable = StateTrackableDelegate.createInstance(initialState);
    this.dataType = dataType;
    this.banks = 1;
    this.size = size;
    this.offset = 0;
    this.offsets = new int[1];  // init to 0 by new
}
 
Example #12
Source File: DataBuffer.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 *  Constructs a DataBuffer containing one bank of the specified
 *  data type and size with the indicated initial {@link State State}.
 *
 *  @param initialState the initial {@link State State} state of the data
 *  @param dataType the data type of this <code>DataBuffer</code>
 *  @param size the size of the banks
 *  @since 1.7
 */
DataBuffer(State initialState,
           int dataType, int size)
{
    this.theTrackable = StateTrackableDelegate.createInstance(initialState);
    this.dataType = dataType;
    this.banks = 1;
    this.size = size;
    this.offset = 0;
    this.offsets = new int[1];  // init to 0 by new
}
 
Example #13
Source File: DataBuffer.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
/**
 *  Constructs a DataBuffer containing one bank of the specified
 *  data type and size with the indicated initial {@link State State}.
 *
 *  @param initialState the initial {@link State State} state of the data
 *  @param dataType the data type of this <code>DataBuffer</code>
 *  @param size the size of the banks
 *  @since 1.7
 */
DataBuffer(State initialState,
           int dataType, int size)
{
    this.theTrackable = StateTrackableDelegate.createInstance(initialState);
    this.dataType = dataType;
    this.banks = 1;
    this.size = size;
    this.offset = 0;
    this.offsets = new int[1];  // init to 0 by new
}
 
Example #14
Source File: DataBuffer.java    From jdk8u-dev-jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 *  Constructs a DataBuffer containing one bank of the specified
 *  data type and size with the indicated initial {@link State State}.
 *
 *  @param initialState the initial {@link State State} state of the data
 *  @param dataType the data type of this <code>DataBuffer</code>
 *  @param size the size of the banks
 *  @since 1.7
 */
DataBuffer(State initialState,
           int dataType, int size)
{
    this.theTrackable = StateTrackableDelegate.createInstance(initialState);
    this.dataType = dataType;
    this.banks = 1;
    this.size = size;
    this.offset = 0;
    this.offsets = new int[1];  // init to 0 by new
}
 
Example #15
Source File: DataBuffer.java    From jdk8u-dev-jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 *  Constructs a DataBuffer that contains the specified number
 *  of banks with the indicated initial {@link State State}.
 *  Each bank has the specified datatype, size and offset.
 *
 *  @param initialState the initial {@link State State} state of the data
 *  @param dataType the data type of this <code>DataBuffer</code>
 *  @param size the size of the banks
 *  @param numBanks the number of banks in this
 *         <code>DataBuffer</code>
 *  @param offset the offset for each bank
 *  @since 1.7
 */
DataBuffer(State initialState,
           int dataType, int size, int numBanks, int offset)
{
    this.theTrackable = StateTrackableDelegate.createInstance(initialState);
    this.dataType = dataType;
    this.banks = numBanks;
    this.size = size;
    this.offset = offset;
    this.offsets = new int[numBanks];
    for (int i = 0; i < numBanks; i++) {
        this.offsets[i] = offset;
    }
}
 
Example #16
Source File: StateTrackableDelegate.java    From Bytecoder with Apache License 2.0 5 votes vote down vote up
/**
 * Returns a {@code StateTrackableDelegate} instance with the
 * specified initial {@link State State}.
 * If the specified {@code State} is
 * {@link State#UNTRACKABLE UNTRACKABLE} or
 * {@link State#IMMUTABLE IMMUTABLE}
 * then the approprirate static instance
 * {@link #UNTRACKABLE_DELEGATE} or {@link #IMMUTABLE_DELEGATE}
 * is returned.
 */
public static StateTrackableDelegate createInstance(State state) {
    switch (state) {
    case UNTRACKABLE:
        return UNTRACKABLE_DELEGATE;
    case STABLE:
        return new StateTrackableDelegate(STABLE);
    case DYNAMIC:
        return new StateTrackableDelegate(DYNAMIC);
    case IMMUTABLE:
        return IMMUTABLE_DELEGATE;
    default:
        throw new InternalError("unknown state");
    }
}
 
Example #17
Source File: DataBuffer.java    From Bytecoder with Apache License 2.0 5 votes vote down vote up
/**
 *  Constructs a DataBuffer that contains the specified number
 *  of banks with the indicated initial {@link State State}.
 *  Each bank has the specified datatype, size and offset.
 *
 *  @param initialState the initial {@link State State} state of the data
 *  @param dataType the data type of this {@code DataBuffer}
 *  @param size the size of the banks
 *  @param numBanks the number of banks in this
 *         {@code DataBuffer}
 *  @param offset the offset for each bank
 *  @since 1.7
 */
DataBuffer(State initialState,
           int dataType, int size, int numBanks, int offset)
{
    this.theTrackable = StateTrackableDelegate.createInstance(initialState);
    this.dataType = dataType;
    this.banks = numBanks;
    this.size = size;
    this.offset = offset;
    this.offsets = new int[numBanks];
    for (int i = 0; i < numBanks; i++) {
        this.offsets[i] = offset;
    }
}
 
Example #18
Source File: DataBuffer.java    From Bytecoder with Apache License 2.0 5 votes vote down vote up
/**
 *  Constructs a DataBuffer containing one bank of the specified
 *  data type and size with the indicated initial {@link State State}.
 *
 *  @param initialState the initial {@link State State} state of the data
 *  @param dataType the data type of this {@code DataBuffer}
 *  @param size the size of the banks
 *  @since 1.7
 */
DataBuffer(State initialState,
           int dataType, int size)
{
    this.theTrackable = StateTrackableDelegate.createInstance(initialState);
    this.dataType = dataType;
    this.banks = 1;
    this.size = size;
    this.offset = 0;
    this.offsets = new int[1];  // init to 0 by new
}
 
Example #19
Source File: DataBuffer.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
/**
 *  Constructs a DataBuffer that contains the specified number
 *  of banks with the indicated initial {@link State State}.
 *  Each bank has the specified datatype, size and offset.
 *
 *  @param initialState the initial {@link State State} state of the data
 *  @param dataType the data type of this <code>DataBuffer</code>
 *  @param size the size of the banks
 *  @param numBanks the number of banks in this
 *         <code>DataBuffer</code>
 *  @param offset the offset for each bank
 *  @since 1.7
 */
DataBuffer(State initialState,
           int dataType, int size, int numBanks, int offset)
{
    this.theTrackable = StateTrackableDelegate.createInstance(initialState);
    this.dataType = dataType;
    this.banks = numBanks;
    this.size = size;
    this.offset = offset;
    this.offsets = new int[numBanks];
    for (int i = 0; i < numBanks; i++) {
        this.offsets[i] = offset;
    }
}
 
Example #20
Source File: StateTrackableDelegate.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Returns a {@code StateTrackableDelegate} instance with the
 * specified initial {@link State State}.
 * If the specified {@code State} is
 * {@link State#UNTRACKABLE UNTRACKABLE} or
 * {@link State#IMMUTABLE IMMUTABLE}
 * then the approprirate static instance
 * {@link #UNTRACKABLE_DELEGATE} or {@link #IMMUTABLE_DELEGATE}
 * is returned.
 */
public static StateTrackableDelegate createInstance(State state) {
    switch (state) {
    case UNTRACKABLE:
        return UNTRACKABLE_DELEGATE;
    case STABLE:
        return new StateTrackableDelegate(STABLE);
    case DYNAMIC:
        return new StateTrackableDelegate(DYNAMIC);
    case IMMUTABLE:
        return IMMUTABLE_DELEGATE;
    default:
        throw new InternalError("unknown state");
    }
}
 
Example #21
Source File: StateTrackableDelegate.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Returns a {@code StateTrackableDelegate} instance with the
 * specified initial {@link State State}.
 * If the specified {@code State} is
 * {@link State#UNTRACKABLE UNTRACKABLE} or
 * {@link State#IMMUTABLE IMMUTABLE}
 * then the approprirate static instance
 * {@link #UNTRACKABLE_DELEGATE} or {@link #IMMUTABLE_DELEGATE}
 * is returned.
 */
public static StateTrackableDelegate createInstance(State state) {
    switch (state) {
    case UNTRACKABLE:
        return UNTRACKABLE_DELEGATE;
    case STABLE:
        return new StateTrackableDelegate(STABLE);
    case DYNAMIC:
        return new StateTrackableDelegate(DYNAMIC);
    case IMMUTABLE:
        return IMMUTABLE_DELEGATE;
    default:
        throw new InternalError("unknown state");
    }
}
 
Example #22
Source File: DataBuffer.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
/**
 *  Constructs a DataBuffer containing one bank of the specified
 *  data type and size with the indicated initial {@link State State}.
 *
 *  @param initialState the initial {@link State State} state of the data
 *  @param dataType the data type of this <code>DataBuffer</code>
 *  @param size the size of the banks
 *  @since 1.7
 */
DataBuffer(State initialState,
           int dataType, int size)
{
    this.theTrackable = StateTrackableDelegate.createInstance(initialState);
    this.dataType = dataType;
    this.banks = 1;
    this.size = size;
    this.offset = 0;
    this.offsets = new int[1];  // init to 0 by new
}
 
Example #23
Source File: DataBuffer.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
/**
 *  Constructs a DataBuffer that contains the specified number
 *  of banks with the indicated initial {@link State State}.
 *  Each bank has the specified datatype, size and offset.
 *
 *  @param initialState the initial {@link State State} state of the data
 *  @param dataType the data type of this <code>DataBuffer</code>
 *  @param size the size of the banks
 *  @param numBanks the number of banks in this
 *         <code>DataBuffer</code>
 *  @param offset the offset for each bank
 *  @since 1.7
 */
DataBuffer(State initialState,
           int dataType, int size, int numBanks, int offset)
{
    this.theTrackable = StateTrackableDelegate.createInstance(initialState);
    this.dataType = dataType;
    this.banks = numBanks;
    this.size = size;
    this.offset = offset;
    this.offsets = new int[numBanks];
    for (int i = 0; i < numBanks; i++) {
        this.offsets[i] = offset;
    }
}
 
Example #24
Source File: DataBuffer.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
/**
 *  Constructs a DataBuffer containing one bank of the specified
 *  data type and size with the indicated initial {@link State State}.
 *
 *  @param initialState the initial {@link State State} state of the data
 *  @param dataType the data type of this <code>DataBuffer</code>
 *  @param size the size of the banks
 *  @since 1.7
 */
DataBuffer(State initialState,
           int dataType, int size)
{
    this.theTrackable = StateTrackableDelegate.createInstance(initialState);
    this.dataType = dataType;
    this.banks = 1;
    this.size = size;
    this.offset = 0;
    this.offsets = new int[1];  // init to 0 by new
}
 
Example #25
Source File: DataBuffer.java    From JDKSourceCode1.8 with MIT License 5 votes vote down vote up
/**
 *  Constructs a DataBuffer containing one bank of the specified
 *  data type and size with the indicated initial {@link State State}.
 *
 *  @param initialState the initial {@link State State} state of the data
 *  @param dataType the data type of this <code>DataBuffer</code>
 *  @param size the size of the banks
 *  @since 1.7
 */
DataBuffer(State initialState,
           int dataType, int size)
{
    this.theTrackable = StateTrackableDelegate.createInstance(initialState);
    this.dataType = dataType;
    this.banks = 1;
    this.size = size;
    this.offset = 0;
    this.offsets = new int[1];  // init to 0 by new
}
 
Example #26
Source File: DataBuffer.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 *  Constructs a DataBuffer that contains the specified number
 *  of banks with the indicated initial {@link State State}.
 *  Each bank has the specified datatype, size and offset.
 *
 *  @param initialState the initial {@link State State} state of the data
 *  @param dataType the data type of this <code>DataBuffer</code>
 *  @param size the size of the banks
 *  @param numBanks the number of banks in this
 *         <code>DataBuffer</code>
 *  @param offset the offset for each bank
 *  @since 1.7
 */
DataBuffer(State initialState,
           int dataType, int size, int numBanks, int offset)
{
    this.theTrackable = StateTrackableDelegate.createInstance(initialState);
    this.dataType = dataType;
    this.banks = numBanks;
    this.size = size;
    this.offset = offset;
    this.offsets = new int[numBanks];
    for (int i = 0; i < numBanks; i++) {
        this.offsets[i] = offset;
    }
}
 
Example #27
Source File: StateTrackableDelegate.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Returns a {@code StateTrackableDelegate} instance with the
 * specified initial {@link State State}.
 * If the specified {@code State} is
 * {@link State#UNTRACKABLE UNTRACKABLE} or
 * {@link State#IMMUTABLE IMMUTABLE}
 * then the approprirate static instance
 * {@link #UNTRACKABLE_DELEGATE} or {@link #IMMUTABLE_DELEGATE}
 * is returned.
 */
public static StateTrackableDelegate createInstance(State state) {
    switch (state) {
    case UNTRACKABLE:
        return UNTRACKABLE_DELEGATE;
    case STABLE:
        return new StateTrackableDelegate(STABLE);
    case DYNAMIC:
        return new StateTrackableDelegate(DYNAMIC);
    case IMMUTABLE:
        return IMMUTABLE_DELEGATE;
    default:
        throw new InternalError("unknown state");
    }
}
 
Example #28
Source File: DataBuffer.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
/**
 *  Constructs a DataBuffer containing one bank of the specified
 *  data type and size with the indicated initial {@link State State}.
 *
 *  @param initialState the initial {@link State State} state of the data
 *  @param dataType the data type of this <code>DataBuffer</code>
 *  @param size the size of the banks
 *  @since 1.7
 */
DataBuffer(State initialState,
           int dataType, int size)
{
    this.theTrackable = StateTrackableDelegate.createInstance(initialState);
    this.dataType = dataType;
    this.banks = 1;
    this.size = size;
    this.offset = 0;
    this.offsets = new int[1];  // init to 0 by new
}
 
Example #29
Source File: StateTrackableDelegate.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Returns a {@code StateTrackableDelegate} instance with the
 * specified initial {@link State State}.
 * If the specified {@code State} is
 * {@link State#UNTRACKABLE UNTRACKABLE} or
 * {@link State#IMMUTABLE IMMUTABLE}
 * then the approprirate static instance
 * {@link #UNTRACKABLE_DELEGATE} or {@link #IMMUTABLE_DELEGATE}
 * is returned.
 */
public static StateTrackableDelegate createInstance(State state) {
    switch (state) {
    case UNTRACKABLE:
        return UNTRACKABLE_DELEGATE;
    case STABLE:
        return new StateTrackableDelegate(STABLE);
    case DYNAMIC:
        return new StateTrackableDelegate(DYNAMIC);
    case IMMUTABLE:
        return IMMUTABLE_DELEGATE;
    default:
        throw new InternalError("unknown state");
    }
}
 
Example #30
Source File: NullSurfaceData.java    From jdk8u-jdk with GNU General Public License v2.0 4 votes vote down vote up
private NullSurfaceData() {
    super(State.IMMUTABLE, SurfaceType.Any, ColorModel.getRGBdefault());
}