/*
 * Java-Gnome Bindings Library
 *
 * Copyright 1998-2004 the Java-Gnome Team, all rights reserved.
 *
 * The Java-Gnome bindings library is free software distributed under
 * the terms of the GNU Library General Public License version 2.
 */

package org.gnu.gdk;
import org.gnu.glib.Enum;
public class CapStyle extends Enum 
{
    /****************************************
     * BEGINNING OF GENERATED CODE
     ****************************************/
    static final private int _NOT_LAST = 0;
    static final public org.gnu.gdk.CapStyle NOT_LAST = new org.gnu.gdk.CapStyle (_NOT_LAST);
    static final private int _BUTT = 1;
    static final public org.gnu.gdk.CapStyle BUTT = new org.gnu.gdk.CapStyle (_BUTT);
    static final private int _ROUND = 2;
    static final public org.gnu.gdk.CapStyle ROUND = new org.gnu.gdk.CapStyle (_ROUND);
    static final private int _PROJECTING = 3;
    static final public org.gnu.gdk.CapStyle PROJECTING = new org.gnu.gdk.CapStyle (_PROJECTING);
    static final private org.gnu.gdk.CapStyle[] theInterned = new org.gnu.gdk.CapStyle[] 
    {
        NOT_LAST, BUTT, ROUND, PROJECTING 
    }

;
    static private java.util.Hashtable theInternedExtras;
    static final private org.gnu.gdk.CapStyle theSacrificialOne = new org.gnu.gdk.CapStyle (0);
    static public org.gnu.gdk.CapStyle intern (int value) 
    {
        if (value < theInterned.length) 
        {
            return theInterned[value];
        }
        theSacrificialOne.value_ = value;
        if (theInternedExtras == null) 
        {
            theInternedExtras = new java.util.Hashtable();
        }
        org.gnu.gdk.CapStyle already = (org.gnu.gdk.CapStyle) theInternedExtras.get (
            theSacrificialOne);
        if (already == null) 
        {
            already = new org.gnu.gdk.CapStyle(value);
            theInternedExtras.put(already, already);
        }
        return already;
    }

    private CapStyle (int value) 
    {
        value_ = value;
    }

    public org.gnu.gdk.CapStyle or (org.gnu.gdk.CapStyle other) 
    {
        return intern(value_ | other.value_);
    }

    public org.gnu.gdk.CapStyle and (org.gnu.gdk.CapStyle other) 
    {
        return intern(value_ & other.value_);
    }

    public org.gnu.gdk.CapStyle xor (org.gnu.gdk.CapStyle other) 
    {
        return intern(value_ ^ other.value_);
    }

    public boolean test (org.gnu.gdk.CapStyle other) 
    {
        return (value_ & other.value_) == other.value_;
    }

    /****************************************
     * END OF GENERATED CODE
     ****************************************/
}

