Package it.unimi.dsi.webgraph.labelling
Class AbstractLabel
java.lang.Object
it.unimi.dsi.webgraph.labelling.AbstractLabel
- Direct Known Subclasses:
AbstractIntLabel,AbstractIntListLabel
An abstract implementation throwing an
IllegalArgumentException on all primitive-type methods.-
Field Summary
Fields inherited from interface it.unimi.dsi.webgraph.labelling.Label
EMPTY_LABEL_ARRAY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanThe value associated to the well-known attribute, provided that the latter has a type that fits a boolean.booleangetBoolean(String key) The value associated to the attribute with given key, provided that the latter has a type that fits a boolean.bytegetByte()The value associated to the well-known attribute, provided that the latter has a type that fits a byte.byteThe value associated to the attribute with given key, provided that the latter has a type that fits a byte.chargetChar()The value associated to the well-known attribute, provided that the latter has a type that fits a char.charThe value associated to the attribute with given key, provided that the latter has a type that fits a char.doubleThe value associated to the well-known attribute, provided that the latter has a type that fits a double.doubleThe value associated to the attribute with given key, provided that the latter has a type that fits a double.floatgetFloat()The value associated to the well-known attribute, provided that the latter has a type that fits a float.floatThe value associated to the attribute with given key, provided that the latter has a type that fits a float.intgetInt()The value associated to the well-known attribute, provided that the latter has a type that fits a int.intThe value associated to the attribute with given key, provided that the latter has a type that fits a int.longgetLong()The value associated to the well-known attribute, provided that the latter has a type that fits a long.longThe value associated to the attribute with given key, provided that the latter has a type that fits a long.shortgetShort()The value associated to the well-known attribute, provided that the latter has a type that fits a short.shortThe 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, waitMethods inherited from interface it.unimi.dsi.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:LabelThe value associated to the well-known attribute, provided that the latter has a type that fits a byte. Otherwise, anIllegalArgumentExceptionis thrown.- Specified by:
getBytein 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:LabelThe value associated to the attribute with given key, provided that the latter has a type that fits a short. Otherwise, anIllegalArgumentExceptionis thrown.- Specified by:
getShortin 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:LabelThe value associated to the attribute with given key, provided that the latter has a type that fits a int. Otherwise, anIllegalArgumentExceptionis thrown.- Specified by:
getIntin 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:LabelThe value associated to the attribute with given key, provided that the latter has a type that fits a long. Otherwise, anIllegalArgumentExceptionis thrown.- Specified by:
getLongin 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:LabelThe value associated to the attribute with given key, provided that the latter has a type that fits a float. Otherwise, anIllegalArgumentExceptionis thrown.- Specified by:
getFloatin 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:LabelThe value associated to the attribute with given key, provided that the latter has a type that fits a double. Otherwise, anIllegalArgumentExceptionis thrown.- Specified by:
getDoublein 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:LabelThe value associated to the attribute with given key, provided that the latter has a type that fits a char. Otherwise, anIllegalArgumentExceptionis thrown.- Specified by:
getCharin 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:LabelThe value associated to the attribute with given key, provided that the latter has a type that fits a boolean. Otherwise, anIllegalArgumentExceptionis thrown.- Specified by:
getBooleanin 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:LabelThe value associated to the attribute with given key, provided that the latter has a type that fits a byte. Otherwise, anIllegalArgumentExceptionis thrown.- Specified by:
getBytein 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:LabelThe value associated to the well-known attribute, provided that the latter has a type that fits a short. Otherwise, anIllegalArgumentExceptionis thrown.- Specified by:
getShortin 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:LabelThe value associated to the well-known attribute, provided that the latter has a type that fits a int. Otherwise, anIllegalArgumentExceptionis thrown.- Specified by:
getIntin 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:LabelThe value associated to the well-known attribute, provided that the latter has a type that fits a long. Otherwise, anIllegalArgumentExceptionis thrown.- Specified by:
getLongin 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:LabelThe value associated to the well-known attribute, provided that the latter has a type that fits a float.- Specified by:
getFloatin 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:LabelThe value associated to the well-known attribute, provided that the latter has a type that fits a double. Otherwise, anIllegalArgumentExceptionis thrown.- Specified by:
getDoublein 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:LabelThe value associated to the well-known attribute, provided that the latter has a type that fits a char. Otherwise, anIllegalArgumentExceptionis thrown.- Specified by:
getCharin 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:LabelThe value associated to the well-known attribute, provided that the latter has a type that fits a boolean. Otherwise, anIllegalArgumentExceptionis thrown.- Specified by:
getBooleanin 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.
-