-
- All Known Subinterfaces:
BusPrimitive<CONTAINER>,GISFlagContainer,RoadSegment
- All Known Implementing Classes:
AbstractBusContainer,AbstractBusPrimitive,BusHub,BusItinerary,BusItineraryHalt,BusLine,BusNetwork,BusStop,MapCircle,MapComposedElement,MapElement,MapMultiPoint,MapPoint,MapPolygon,MapPolyline,MapPonctualElement,RoadAStar.VirtualSegment,RoadPolyline,SubRoadNetwork.WrapSegment
public interface FlagContainerDescribe any object that is container a set of flags. Flags are application-dependent, except for the "selected" and "read-only" flags, which are directly provided by this interface.- Since:
- 14.0
- Version:
- 17.0 2020-01-04 14:41:53
- Author:
- Stéphane GALLAND
- Maven Group Id:
- org.arakhne.afc.gis
- Maven Artifact Id:
- giscore
-
-
Field Summary
Fields Modifier and Type Field Description static intFLAG_READONLYRead-only flag.static intFLAG_SELECTEDSelection flag.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description intgetFlags()Replies the flags associated to this element.booleanhasFlag(int flagIndex)Replies if the specified flag is set for this element.voidsetFlag(int flag)Set the flag.voidswitchFlag(int flagIndex)Switch the value of the specified flag on this element.voidunsetFlag(int flagIndex)Unset the flag.
-
-
-
Field Detail
-
FLAG_SELECTED
static final int FLAG_SELECTED
Selection flag.- See Also:
getFlags(), Constant Field Values
-
FLAG_READONLY
static final int FLAG_READONLY
Read-only flag.- See Also:
getFlags(), Constant Field Values
-
-
Method Detail
-
getFlags
@Pure int getFlags()
Replies the flags associated to this element.The flag could be predefined (eg.
FLAG_SELECTED, or user defined.- Returns:
- the flags
- See Also:
FLAG_SELECTED,hasFlag(int),setFlag(int),unsetFlag(int)
-
hasFlag
@Pure boolean hasFlag(int flagIndex)
Replies if the specified flag is set for this element.The flag could be predefined (eg.
FLAG_SELECTED, or user defined.- Parameters:
flagIndex- is the index of the flag- Returns:
trueif the flag was set, otherwisefalse- See Also:
FLAG_SELECTED,getFlags(),setFlag(int),unsetFlag(int)
-
switchFlag
void switchFlag(int flagIndex)
Switch the value of the specified flag on this element.The flag could be predefined (eg.
FLAG_SELECTED, or user defined.- Parameters:
flagIndex- is the index of the flag- See Also:
FLAG_SELECTED,getFlags(),setFlag(int),unsetFlag(int)
-
setFlag
void setFlag(int flag)
Set the flag.The flag could be predefined (eg.
FLAG_SELECTED, or user defined.- Parameters:
flag- is the index of the flag- See Also:
FLAG_SELECTED,getFlags(),hasFlag(int),unsetFlag(int)
-
unsetFlag
void unsetFlag(int flagIndex)
Unset the flag.The flag could be predefined (eg.
FLAG_SELECTED, or user defined.- Parameters:
flagIndex- is the index of the flag- See Also:
FLAG_SELECTED,getFlags(),hasFlag(int),setFlag(int)
-
-