/*
 * 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 ByteOrder extends Enum 
{
    
    /****************************************
     * BEGINNING OF GENERATED CODE
     ****************************************/
    static final private int _LSB_FIRST = 0;
    static final public org.gnu.gdk.ByteOrder LSB_FIRST = new org.gnu.gdk.ByteOrder (_LSB_FIRST);
    static final private int _MSB_FIRST = 1;
    static final public org.gnu.gdk.ByteOrder MSB_FIRST = new org.gnu.gdk.ByteOrder (_MSB_FIRST);
    static final private org.gnu.gdk.ByteOrder[] theInterned = new org.gnu.gdk.ByteOrder[] 
    {
        LSB_FIRST, MSB_FIRST 
    }

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

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

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

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

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

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

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

