Class AbstractLabel
java.lang.Object
it.unimi.dsi.big.webgraph.labelling.AbstractLabel
- All Implemented Interfaces:
Label
,FlyweightPrototype<Label>
- Direct Known Subclasses:
AbstractIntLabel
,AbstractIntListLabel
,AbstractLongListLabel
An abstract implementation throwing an
IllegalArgumentException
on all primitive-type methods.-
Field Summary
Fields inherited from interface it.unimi.dsi.big.webgraph.labelling.Label
EMPTY_LABEL_ARRAY, EMPTY_LABEL_BIG_ARRAY
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
The value associated to the well-known attribute, provided that the latter has a type that fits a boolean.boolean
getBoolean
(String key) The value associated to the attribute with given key, provided that the latter has a type that fits a boolean.byte
getByte()
The value associated to the well-known attribute, provided that the latter has a type that fits a byte.byte
The value associated to the attribute with given key, provided that the latter has a type that fits a byte.char
getChar()
The value associated to the well-known attribute, provided that the latter has a type that fits a char.char
The value associated to the attribute with given key, provided that the latter has a type that fits a char.double
The value associated to the well-known attribute, provided that the latter has a type that fits a double.double
The value associated to the attribute with given key, provided that the latter has a type that fits a double.float
getFloat()
The value associated to the well-known attribute, provided that the latter has a type that fits a float.float
The value associated to the attribute with given key, provided that the latter has a type that fits a float.int
getInt()
The value associated to the well-known attribute, provided that the latter has a type that fits a int.int
The value associated to the attribute with given key, provided that the latter has a type that fits a int.long
getLong()
The value associated to the well-known attribute, provided that the latter has a type that fits a long.long
The value associated to the attribute with given key, provided that the latter has a type that fits a long.short
getShort()
The value associated to the well-known attribute, provided that the latter has a type that fits a short.short
The value associated to the attribute with given key, provided that the latter has a type that fits a short.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface it.unimi.dsi.big.webgraph.labelling.Label
attributeKeys, attributeTypes, copy, fixedWidth, fromBitStream, get, get, toBitStream, toSpec, wellKnownAttributeKey
-
Constructor Details
-
AbstractLabel
public AbstractLabel()
-
-
Method Details
-
getByte
Description copied from interface:Label
The value associated to the well-known attribute, provided that the latter has a type that fits a byte. Otherwise, anIllegalArgumentException
is thrown.- Specified by:
getByte
in interfaceLabel
- Returns:
- the attribute value; if the attribute type is primitive, it is wrapped suitably.
- Throws:
IllegalArgumentException
- if the attribute key is not known, or it has the wrong type.
-
getShort
Description copied from interface:Label
The value associated to the attribute with given key, provided that the latter has a type that fits a short. Otherwise, anIllegalArgumentException
is thrown.- Specified by:
getShort
in interfaceLabel
- Parameters:
key
- the attribute key.- Returns:
- the attribute value; if the attribute type is primitive, it is wrapped suitably.
- Throws:
IllegalArgumentException
- if the attribute key is not known, or it has the wrong type.
-
getInt
Description copied from interface:Label
The value associated to the attribute with given key, provided that the latter has a type that fits a int. Otherwise, anIllegalArgumentException
is thrown.- Specified by:
getInt
in interfaceLabel
- Parameters:
key
- the attribute key.- Returns:
- the attribute value; if the attribute type is primitive, it is wrapped suitably.
- Throws:
IllegalArgumentException
- if the attribute key is not known, or it has the wrong type.
-
getLong
Description copied from interface:Label
The value associated to the attribute with given key, provided that the latter has a type that fits a long. Otherwise, anIllegalArgumentException
is thrown.- Specified by:
getLong
in interfaceLabel
- Parameters:
key
- the attribute key.- Returns:
- the attribute value; if the attribute type is primitive, it is wrapped suitably.
- Throws:
IllegalArgumentException
- if the attribute key is not known, or it has the wrong type.
-
getFloat
Description copied from interface:Label
The value associated to the attribute with given key, provided that the latter has a type that fits a float. Otherwise, anIllegalArgumentException
is thrown.- Specified by:
getFloat
in interfaceLabel
- Parameters:
key
- the attribute key.- Returns:
- the attribute value; if the attribute type is primitive, it is wrapped suitably.
- Throws:
IllegalArgumentException
- if the attribute key is not known, or it has the wrong type.
-
getDouble
Description copied from interface:Label
The value associated to the attribute with given key, provided that the latter has a type that fits a double. Otherwise, anIllegalArgumentException
is thrown.- Specified by:
getDouble
in interfaceLabel
- Parameters:
key
- the attribute key.- Returns:
- the attribute value; if the attribute type is primitive, it is wrapped suitably.
- Throws:
IllegalArgumentException
- if the attribute key is not known, or it has the wrong type.
-
getChar
Description copied from interface:Label
The value associated to the attribute with given key, provided that the latter has a type that fits a char. Otherwise, anIllegalArgumentException
is thrown.- Specified by:
getChar
in interfaceLabel
- Parameters:
key
- the attribute key.- Returns:
- the attribute value; if the attribute type is primitive, it is wrapped suitably.
- Throws:
IllegalArgumentException
- if the attribute key is not known, or it has the wrong type.
-
getBoolean
Description copied from interface:Label
The value associated to the attribute with given key, provided that the latter has a type that fits a boolean. Otherwise, anIllegalArgumentException
is thrown.- Specified by:
getBoolean
in interfaceLabel
- Parameters:
key
- the attribute key.- Returns:
- the attribute value; if the attribute type is primitive, it is wrapped suitably.
- Throws:
IllegalArgumentException
- if the attribute key is not known, or it has the wrong type.
-
getByte
Description copied from interface:Label
The value associated to the attribute with given key, provided that the latter has a type that fits a byte. Otherwise, anIllegalArgumentException
is thrown.- Specified by:
getByte
in interfaceLabel
- Parameters:
key
- the attribute key.- Returns:
- the attribute value; if the attribute type is primitive, it is wrapped suitably.
- Throws:
IllegalArgumentException
- if the attribute key is not known, or it has the wrong type.
-
getShort
Description copied from interface:Label
The value associated to the well-known attribute, provided that the latter has a type that fits a short. Otherwise, anIllegalArgumentException
is thrown.- Specified by:
getShort
in interfaceLabel
- Returns:
- the attribute value; if the attribute type is primitive, it is wrapped suitably.
- Throws:
IllegalArgumentException
- if the attribute key is not known, or it has the wrong type.
-
getInt
Description copied from interface:Label
The value associated to the well-known attribute, provided that the latter has a type that fits a int. Otherwise, anIllegalArgumentException
is thrown.- Specified by:
getInt
in interfaceLabel
- Returns:
- the attribute value; if the attribute type is primitive, it is wrapped suitably.
- Throws:
IllegalArgumentException
- if the attribute key is not known, or it has the wrong type.
-
getLong
Description copied from interface:Label
The value associated to the well-known attribute, provided that the latter has a type that fits a long. Otherwise, anIllegalArgumentException
is thrown.- Specified by:
getLong
in interfaceLabel
- Returns:
- the attribute value; if the attribute type is primitive, it is wrapped suitably.
- Throws:
IllegalArgumentException
- if the attribute key is not known, or it has the wrong type.
-
getFloat
Description copied from interface:Label
The value associated to the well-known attribute, provided that the latter has a type that fits a float.- Specified by:
getFloat
in interfaceLabel
- Returns:
- the attribute value; if the attribute type is primitive, it is wrapped suitably.
- Throws:
IllegalArgumentException
- if the attribute key is not known, or it has the wrong type.
-
getDouble
Description copied from interface:Label
The value associated to the well-known attribute, provided that the latter has a type that fits a double. Otherwise, anIllegalArgumentException
is thrown.- Specified by:
getDouble
in interfaceLabel
- Returns:
- the attribute value; if the attribute type is primitive, it is wrapped suitably.
- Throws:
IllegalArgumentException
- if the attribute key is not known, or it has the wrong type.
-
getChar
Description copied from interface:Label
The value associated to the well-known attribute, provided that the latter has a type that fits a char. Otherwise, anIllegalArgumentException
is thrown.- Specified by:
getChar
in interfaceLabel
- Returns:
- the attribute value; if the attribute type is primitive, it is wrapped suitably.
- Throws:
IllegalArgumentException
- if the attribute key is not known, or it has the wrong type.
-
getBoolean
Description copied from interface:Label
The value associated to the well-known attribute, provided that the latter has a type that fits a boolean. Otherwise, anIllegalArgumentException
is thrown.- Specified by:
getBoolean
in interfaceLabel
- Returns:
- the attribute value; if the attribute type is primitive, it is wrapped suitably.
- Throws:
IllegalArgumentException
- if the attribute key is not known, or it has the wrong type.
-