286N/A/*
286N/A * reserved comment block
286N/A * DO NOT REMOVE OR ALTER!
286N/A */
286N/A/*
286N/A * Copyright 2001, 2002,2004 The Apache Software Foundation.
286N/A *
286N/A * Licensed under the Apache License, Version 2.0 (the "License");
286N/A * you may not use this file except in compliance with the License.
286N/A * You may obtain a copy of the License at
286N/A *
286N/A * http://www.apache.org/licenses/LICENSE-2.0
286N/A *
286N/A * Unless required by applicable law or agreed to in writing, software
286N/A * distributed under the License is distributed on an "AS IS" BASIS,
286N/A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
286N/A * See the License for the specific language governing permissions and
286N/A * limitations under the License.
286N/A */
286N/A
286N/Apackage com.sun.org.apache.xerces.internal.impl.xs.util;
286N/A
286N/A/**
286N/A * @xerces.internal
286N/A *
286N/A * @author Henry Zongaro, IBM
286N/A */
286N/Apublic final class XIntPool {
286N/A private static final short POOL_SIZE = 10;
286N/A private static final XInt[] fXIntPool = new XInt[POOL_SIZE];
286N/A
286N/A static {
286N/A for (int i = 0; i < POOL_SIZE; i++)
286N/A fXIntPool[i] = new XInt(i);
286N/A }
286N/A
286N/A public final XInt getXInt(int value) {
286N/A if (value >= 0 && value < fXIntPool.length)
286N/A return fXIntPool[value];
286N/A else
286N/A return new XInt(value);
286N/A }
286N/A}