Class AbstractLabel
- java.lang.Object
-
- it.unimi.dsi.big.webgraph.labelling.AbstractLabel
-
- Direct Known Subclasses:
AbstractIntLabel,AbstractIntListLabel,AbstractLongListLabel
public abstract class AbstractLabel extends java.lang.Object implements Label
An abstract implementation throwing anIllegalArgumentExceptionon 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
Constructors Constructor Description AbstractLabel()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleangetBoolean()The value associated to the well-known attribute, provided that the latter has a type that fits a boolean.booleangetBoolean(java.lang.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.bytegetByte(java.lang.String key)The 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.chargetChar(java.lang.String key)The value associated to the attribute with given key, provided that the latter has a type that fits a char.doublegetDouble()The value associated to the well-known attribute, provided that the latter has a type that fits a double.doublegetDouble(java.lang.String key)The 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.floatgetFloat(java.lang.String key)The 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.intgetInt(java.lang.String key)The 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.longgetLong(java.lang.String key)The 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.shortgetShort(java.lang.String key)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
-
-
-
-
Method Detail
-
getByte
public byte getByte() throws java.lang.IllegalArgumentExceptionDescription 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.
-
getShort
public short getShort(java.lang.String key) throws java.lang.IllegalArgumentExceptionDescription 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.
-
getInt
public int getInt(java.lang.String key) throws java.lang.IllegalArgumentExceptionDescription 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.
-
getLong
public long getLong(java.lang.String key) throws java.lang.IllegalArgumentExceptionDescription 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.
-
getFloat
public float getFloat(java.lang.String key) throws java.lang.IllegalArgumentExceptionDescription 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.
-
getDouble
public double getDouble(java.lang.String key) throws java.lang.IllegalArgumentExceptionDescription 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.
-
getChar
public char getChar(java.lang.String key) throws java.lang.IllegalArgumentExceptionDescription 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.
-
getBoolean
public boolean getBoolean(java.lang.String key) throws java.lang.IllegalArgumentExceptionDescription 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:
java.lang.IllegalArgumentException- if the attribute key is not known, or it has the wrong type.
-
getByte
public byte getByte(java.lang.String key) throws java.lang.IllegalArgumentExceptionDescription 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.
-
getShort
public short getShort() throws java.lang.IllegalArgumentExceptionDescription 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.
-
getInt
public int getInt() throws java.lang.IllegalArgumentExceptionDescription 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.
-
getLong
public long getLong() throws java.lang.IllegalArgumentExceptionDescription 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.
-
getFloat
public float getFloat() throws java.lang.IllegalArgumentExceptionDescription copied from interface:LabelThe value associated to the well-known attribute, provided that the latter has a type that fits a float.
-
getDouble
public double getDouble() throws java.lang.IllegalArgumentExceptionDescription 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.
-
getChar
public char getChar() throws java.lang.IllegalArgumentExceptionDescription 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.
-
getBoolean
public boolean getBoolean() throws java.lang.IllegalArgumentExceptionDescription 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:
java.lang.IllegalArgumentException- if the attribute key is not known, or it has the wrong type.
-
-