Package org.objectweb.speedo.genclass.collection

Source Code of org.objectweb.speedo.genclass.collection.SetElem

/**
* Copyright (C) 2001-2004 France Telecom R&D
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
*/
package org.objectweb.speedo.genclass.collection;

import org.objectweb.jorm.type.api.PExceptionTyping;
import org.objectweb.speedo.genclass.GenClassAccessor;
import org.objectweb.speedo.genclass.GenClassElement;

/**
*
* @author Sebastien Chassande-Barrioz
*/
public class SetElem extends CollectionElem {

    public SetElem(GenClassAccessor gca) {
        super(gca);
    }
    public GenClassElement cloneGCE() {
        return cloneGCE(new SetElem(gca));
    }

    /**
     * The error message thrown when an accessor method associated to an index
     * is called. Indeed a set does not need index because all element must be
     * unique and they are not ordered.
     */
    public final static String ERROR_MESSAGE_NO_INDEX =
            "A set has no index";

    // ---------------------------------------------------------------------------
    // Overriden methods
    // ---------------------------------------------------------------------------

    public void pieSetByteIndexField(String fn, byte value) throws PExceptionTyping {
        throw new PExceptionTyping(ERROR_MESSAGE_NO_INDEX);
    }

    public void pieSetCharIndexField(String fn, char value) throws PExceptionTyping {
        throw new PExceptionTyping(ERROR_MESSAGE_NO_INDEX);
    }

    public void pieSetShortIndexField(String fn, short value) throws PExceptionTyping {
        throw new PExceptionTyping(ERROR_MESSAGE_NO_INDEX);
    }

    public void pieSetIntIndexField(String fn, int value) throws PExceptionTyping {
        throw new PExceptionTyping(ERROR_MESSAGE_NO_INDEX);
    }

    public void pieSetLongIndexField(String fn, long value) throws PExceptionTyping {
        throw new PExceptionTyping(ERROR_MESSAGE_NO_INDEX);
    }

    public void pieSetStringIndexField(String fn, String value) throws PExceptionTyping {
        throw new PExceptionTyping(ERROR_MESSAGE_NO_INDEX);
    }

    public short pieGetShortIndexField(String fn) throws PExceptionTyping {
        throw new PExceptionTyping(ERROR_MESSAGE_NO_INDEX);
    }

    public long pieGetLongIndexField(String fn) throws PExceptionTyping {
        throw new PExceptionTyping(ERROR_MESSAGE_NO_INDEX);
    }

    public int pieGetIntIndexField(String fn) throws PExceptionTyping {
        throw new PExceptionTyping(ERROR_MESSAGE_NO_INDEX);
    }

    public String pieGetStringIndexField(String fn) throws PExceptionTyping {
        throw new PExceptionTyping(ERROR_MESSAGE_NO_INDEX);
    }

    public byte pieGetByteIndexField(String fn) throws PExceptionTyping {
        throw new PExceptionTyping(ERROR_MESSAGE_NO_INDEX);
    }

    public char pieGetCharIndexField(String fn) throws PExceptionTyping {
        throw new PExceptionTyping(ERROR_MESSAGE_NO_INDEX);
    }
}
TOP

Related Classes of org.objectweb.speedo.genclass.collection.SetElem

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.