Package net.shibboleth.shared.primitive

# Class LangBearingString

java.lang.Object
net.shibboleth.shared.collection.Pair<String,String>
net.shibboleth.shared.primitive.LangBearingString

public class LangBearingString extends Pair<String,String>
An object that represents a string associated with a language tag/locale.

## Constructor Summary

Constructors
Constructor
Description
`LangBearingString(String value)`
Constructor.
`LangBearingString(String value, String lang)`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`String`
`getLang()`
Get the language.
`String`
`getValue()`
Get the string value.
`void`
`setSecond(String newSecond)`
Sets the second object in the pair.
`String`
`toString()`

### Methods inherited from class net.shibboleth.shared.collection.Pair

`equals, getFirst, getSecond, hashCode, setFirst`

### Methods inherited from class java.lang.Object

`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

## Constructor Details

### LangBearingString

public LangBearingString(@Nullable String value)
Constructor.

Parameters:
  `value` - the value

### LangBearingString

public LangBearingString(@Nullable String value, @Nullable @NotEmpty String lang)
Constructor.

Parameters:
  `value` - the value
  `lang` - the language

## Method Details

### getValue

@Nullable public String getValue()
Get the string value.

Returns:
  value

### getLang

@Nullable @NotEmpty public String getLang()
Get the language.

Returns:
  language

### setSecond

public void setSecond(@Nullable String newSecond)
Sets the second object in the pair.

Overrides:
  `setSecond` in class `Pair<String,String>`
Parameters:
  `newSecond` - second object in the pair

### toString

public String toString()

Overrides:
  `toString` in class `Pair<String,String>`