|
Extension SDK 10.1.2 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object oracle.ide.model.DefaultAttributes
This class encapsulates the notion of attributes, which is a
collection of boolean flags. The DefaultAttributes
class
represents each flag as an int
. The state of each
flag can be tested, set, and unset (i.e. cleared).
Client classes of DefaultAttributes
must not make any
assumptions about the meaning of the int
that
represents a particular flag. There is no guarantee that the
DefaultAttributes
implementation will behave as a bitset,
array of int
s, or otherwise. The reason is that the
implementation of DefaultAttributes
may change without notice
to address scaling or performance issues. The only safe ways to
query and modify an DefaultAttributes
instance is through its
methods.
Special care must be taken when implementing subclasses of
DefaultAttributes
to avoid the tendency to depend on the
implementation details of a superclass.
Field Summary | |
static Attributes |
EMPTY_ATTRIBUTES
Classes that define no attributes should use EMPTY_ATTRIBUTES |
static int |
NONE
NONE is used to represent that no attributes are set. |
Constructor Summary | |
DefaultAttributes()
Creates a new Attributes object initialized with all
attributes unset. |
|
DefaultAttributes(DefaultAttributes attributes)
|
|
DefaultAttributes(int attribute)
Creates a new Attributes object initialized with
the specified attribute set. |
Method Summary | |
void |
clear()
Clears all attributes by resetting the attributes to Attributes.NONE. |
protected static int |
decAttr(int curAttr)
The caller must not make any assumptions about the format of the returned int and how the Attributes
class uses it. |
boolean |
equals(java.lang.Object o)
|
protected boolean |
equalsImpl(DefaultAttributes other)
|
protected static int |
incAttr(int curAttr)
The caller must not make any assumptions about the format of the returned int and how the Attributes
class uses it. |
boolean |
isSet(int attr)
|
protected static int |
maxAttr()
The caller must not make any assumptions about the format of the returned int and how the Attributes
class uses it. |
protected static int |
minAttr()
The caller must not make any assumptions about the format of the returned int and how the Attributes
class uses it. |
protected static int |
noneAttr()
The caller must not make any assumptions about the format of the returned int and how the Attributes
class uses it. |
void |
set(int attr)
This method sets the specified attribute. |
void |
unset(int attr)
This method unsets (i.e. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface oracle.ide.model.Attributes |
duplicate |
Field Detail |
public static final Attributes EMPTY_ATTRIBUTES
EMPTY_ATTRIBUTES
public static final int NONE
NONE
is used to represent that no attributes are set.
Constructor Detail |
public DefaultAttributes()
Attributes
object initialized with all
attributes unset.
public DefaultAttributes(int attribute)
Attributes
object initialized with
the specified attribute
set.
public DefaultAttributes(DefaultAttributes attributes)
Method Detail |
public boolean isSet(int attr)
isSet
in interface Attributes
public void set(int attr)
set
in interface Attributes
public void unset(int attr)
unset
in interface Attributes
public void clear()
clear
in interface Attributes
protected static final int noneAttr()
int
and how the Attributes
class uses it. The implementation may change without notice to
address scaling or performance issues.
protected static final int minAttr()
int
and how the Attributes
class uses it. The implementation may change without notice to
address scaling or performance issues.
protected static final int maxAttr()
int
and how the Attributes
class uses it. The implementation may change without notice to
address scaling or performance issues.
protected static final int incAttr(int curAttr)
int
and how the Attributes
class uses it. The implementation may change without notice to
address scaling or performance issues.
protected static final int decAttr(int curAttr)
int
and how the Attributes
class uses it. The implementation may change without notice to
address scaling or performance issues.
public boolean equals(java.lang.Object o)
protected final boolean equalsImpl(DefaultAttributes other)
|
Extension SDK | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 1997, 2004, Oracle. All rights reserved.